[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-nio (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-nio has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-nio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-NIO
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-NIO/logs



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 17 mins 52 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-NIO 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dtest.reports=output/logs-NIO 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 -Dtest.relaxTiming=true -Dexecute.test.nio=true -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190124.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-util.jar:/srv/gump/public/workspace/tomcat-7.0.x/output

[Bug 63104] As per servlet api doc ServletContext.getResource should throw MalformedURLException but for some urls tomcat 8 is throwing IllegalArgumentException which is deviation for api.

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63104

Gajendra  changed:

   What|Removed |Added

 Resolution|WONTFIX |REMIND

--- Comment #2 from Gajendra  ---
This scenario works well on tomcat 7 or earlier, why not stick to same behavior
as even small change at container level can have huge impact on applications.
Also in this scenario tomcat can throw MalformedURLException or it's subclass
to be more specific.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1852005 - in /tomcat/trunk: java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java java/org/apache/catalina/mbeans/LocalStrings.properties res/tomcat-maven/README.md res/tomcat-m

2019-01-24 Thread remm
Author: remm
Date: Thu Jan 24 09:15:03 2019
New Revision: 1852005

URL: http://svn.apache.org/viewvc?rev=1852005&view=rev
Log:
Add a bit more docs and a yaml example for the image.

Added:
tomcat/trunk/res/tomcat-maven/tomcat.yaml   (with props)
Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
tomcat/trunk/java/org/apache/catalina/mbeans/LocalStrings.properties
tomcat/trunk/res/tomcat-maven/README.md

Modified: 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1852005&r1=1852004&r2=1852005&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
Thu Jan 24 09:15:03 2019
@@ -31,11 +31,7 @@ import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
-import java.security.NoSuchAlgorithmException;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
 import java.util.Map;
 
 import javax.management.remote.JMXConnectorServer;
@@ -45,6 +41,7 @@ import javax.management.remote.rmi.RMIJR
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLServerSocketFactory;
+import javax.net.ssl.SSLSessionContext;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 import javax.rmi.ssl.SslRMIServerSocketFactory;
 
@@ -53,6 +50,9 @@ import org.apache.catalina.LifecycleEven
 import org.apache.catalina.LifecycleListener;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.net.SSLHostConfig;
+import org.apache.tomcat.util.net.SSLHostConfigCertificate;
+import org.apache.tomcat.util.net.jsse.JSSEUtil;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -62,7 +62,9 @@ import org.apache.tomcat.util.res.String
  * the listener. The remainder of the configuration is via the standard system
  * properties for configuring JMX.
  */
-public class JmxRemoteLifecycleListener implements LifecycleListener {
+public class JmxRemoteLifecycleListener extends SSLHostConfig implements 
LifecycleListener {
+
+private static final long serialVersionUID = 1L;
 
 private static final Log log = 
LogFactory.getLog(JmxRemoteLifecycleListener.class);
 
@@ -74,9 +76,6 @@ public class JmxRemoteLifecycleListener
 protected int rmiServerPortPlatform = -1;
 protected boolean rmiRegistrySSL = true;
 protected boolean rmiServerSSL = true;
-protected String ciphers[] = null;
-protected String protocols[] = null;
-protected boolean clientAuth = true;
 protected boolean authenticate = true;
 protected String passwordFile = null;
 protected String loginModuleName = null;
@@ -156,48 +155,138 @@ public class JmxRemoteLifecycleListener
 this.useLocalPorts = useLocalPorts;
 }
 
-private void init() {
+/**
+ * @return the rmiRegistrySSL
+ */
+public boolean isRmiRegistrySSL() {
+return rmiRegistrySSL;
+}
+
+/**
+ * @param rmiRegistrySSL the rmiRegistrySSL to set
+ */
+public void setRmiRegistrySSL(boolean rmiRegistrySSL) {
+this.rmiRegistrySSL = rmiRegistrySSL;
+}
+
+/**
+ * @return the rmiServerSSL
+ */
+public boolean isRmiServerSSL() {
+return rmiServerSSL;
+}
+
+/**
+ * @param rmiServerSSL the rmiServerSSL to set
+ */
+public void setRmiServerSSL(boolean rmiServerSSL) {
+this.rmiServerSSL = rmiServerSSL;
+}
+
+/**
+ * @return the authenticate
+ */
+public boolean isAuthenticate() {
+return authenticate;
+}
+
+/**
+ * @param authenticate the authenticate to set
+ */
+public void setAuthenticate(boolean authenticate) {
+this.authenticate = authenticate;
+}
+
+/**
+ * @return the passwordFile
+ */
+public String getPasswordFile() {
+return passwordFile;
+}
+
+/**
+ * @param passwordFile the passwordFile to set
+ */
+public void setPasswordFile(String passwordFile) {
+this.passwordFile = passwordFile;
+}
+
+/**
+ * @return the loginModuleName
+ */
+public String getLoginModuleName() {
+return loginModuleName;
+}
+
+/**
+ * @param loginModuleName the loginModuleName to set
+ */
+public void setLoginModuleName(String loginModuleName) {
+this.loginModuleName = loginModuleName;
+}
+
+/**
+ * @return the accessFile
+ */
+public String getAccessFile() {
+return accessFile;
+}
+
+/**
+ * @param accessFile the accessFile to set
+ */
+  

svn commit: r1852006 - in /tomcat/trunk/java/org/apache/catalina/mbeans: JmxRemoteLifecycleListener.java LocalStrings.properties

2019-01-24 Thread remm
Author: remm
Date: Thu Jan 24 09:20:50 2019
New Revision: 1852006

URL: http://svn.apache.org/viewvc?rev=1852006&view=rev
Log:
Revert unintended commit (this is for making regular JMX more friendly as an 
alternative to Jolokia).

Modified:
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
tomcat/trunk/java/org/apache/catalina/mbeans/LocalStrings.properties

Modified: 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java?rev=1852006&r1=1852005&r2=1852006&view=diff
==
--- 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
(original)
+++ 
tomcat/trunk/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java 
Thu Jan 24 09:20:50 2019
@@ -31,7 +31,11 @@ import java.rmi.registry.LocateRegistry;
 import java.rmi.registry.Registry;
 import java.rmi.server.RMIClientSocketFactory;
 import java.rmi.server.RMIServerSocketFactory;
+import java.security.NoSuchAlgorithmException;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
 import java.util.Map;
 
 import javax.management.remote.JMXConnectorServer;
@@ -41,7 +45,6 @@ import javax.management.remote.rmi.RMIJR
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLServerSocket;
 import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSessionContext;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 import javax.rmi.ssl.SslRMIServerSocketFactory;
 
@@ -50,9 +53,6 @@ import org.apache.catalina.LifecycleEven
 import org.apache.catalina.LifecycleListener;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
-import org.apache.tomcat.util.net.SSLHostConfig;
-import org.apache.tomcat.util.net.SSLHostConfigCertificate;
-import org.apache.tomcat.util.net.jsse.JSSEUtil;
 import org.apache.tomcat.util.res.StringManager;
 
 /**
@@ -62,9 +62,7 @@ import org.apache.tomcat.util.res.String
  * the listener. The remainder of the configuration is via the standard system
  * properties for configuring JMX.
  */
-public class JmxRemoteLifecycleListener extends SSLHostConfig implements 
LifecycleListener {
-
-private static final long serialVersionUID = 1L;
+public class JmxRemoteLifecycleListener implements LifecycleListener {
 
 private static final Log log = 
LogFactory.getLog(JmxRemoteLifecycleListener.class);
 
@@ -76,6 +74,9 @@ public class JmxRemoteLifecycleListener
 protected int rmiServerPortPlatform = -1;
 protected boolean rmiRegistrySSL = true;
 protected boolean rmiServerSSL = true;
+protected String ciphers[] = null;
+protected String protocols[] = null;
+protected boolean clientAuth = true;
 protected boolean authenticate = true;
 protected String passwordFile = null;
 protected String loginModuleName = null;
@@ -155,138 +156,48 @@ public class JmxRemoteLifecycleListener
 this.useLocalPorts = useLocalPorts;
 }
 
-/**
- * @return the rmiRegistrySSL
- */
-public boolean isRmiRegistrySSL() {
-return rmiRegistrySSL;
-}
-
-/**
- * @param rmiRegistrySSL the rmiRegistrySSL to set
- */
-public void setRmiRegistrySSL(boolean rmiRegistrySSL) {
-this.rmiRegistrySSL = rmiRegistrySSL;
-}
-
-/**
- * @return the rmiServerSSL
- */
-public boolean isRmiServerSSL() {
-return rmiServerSSL;
-}
-
-/**
- * @param rmiServerSSL the rmiServerSSL to set
- */
-public void setRmiServerSSL(boolean rmiServerSSL) {
-this.rmiServerSSL = rmiServerSSL;
-}
-
-/**
- * @return the authenticate
- */
-public boolean isAuthenticate() {
-return authenticate;
-}
-
-/**
- * @param authenticate the authenticate to set
- */
-public void setAuthenticate(boolean authenticate) {
-this.authenticate = authenticate;
-}
-
-/**
- * @return the passwordFile
- */
-public String getPasswordFile() {
-return passwordFile;
-}
-
-/**
- * @param passwordFile the passwordFile to set
- */
-public void setPasswordFile(String passwordFile) {
-this.passwordFile = passwordFile;
-}
-
-/**
- * @return the loginModuleName
- */
-public String getLoginModuleName() {
-return loginModuleName;
-}
-
-/**
- * @param loginModuleName the loginModuleName to set
- */
-public void setLoginModuleName(String loginModuleName) {
-this.loginModuleName = loginModuleName;
-}
-
-/**
- * @return the accessFile
- */
-public String getAccessFile() {
-return accessFile;
-}
-
-/**
- * @param accessFile the accessFile to set
- */
-public void setAccessFile(String accessFile) {
-this.accessFile = accessFile;
- 

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Addition:

- running the same tests just replacing tcnative 1.2.20 by 1.2.19 does 
not crash


- running the same 1.2.20 test on Linux (SLES11) also crashes, but this 
time not in TestCustomSsl for NIO and NIO2, but instead a few TLS tests 
only NIO2:


[junit] Test org.apache.tomcat.util.net.TestClientCert FAILED (crashed)
[junit] Test org.apache.tomcat.util.net.TestCustomSsl FAILED (crashed)
[junit] Test 
org.apache.tomcat.websocket.TestWebSocketFrameClientSSL FAILED (crashed)
[junit] Test org.apache.tomcat.websocket.TestWsWebSocketContainer 
FAILED (crashed)


The crashes here are always segmentation faults in the finalizer, stacks 
vary a bit:


C  [libapr-1.so.0+0x1fcdd]  apr_pool_destroy+0xd
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
J 1667 C1 
java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62 
bytes) @ 0x7fc1349059a4 [0x7fc134905440+0x564]
J 1666 C1 
java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V 
(6 bytes) @ 0x7fc1348bb09b [0x7fc1348bb040+0x5b]

j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub
V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*, 
methodHandle*, JavaCallArguments*, Thread*)+0xddb
V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*, 
KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle, 
KlassHandle, Symbol*, Symbol*, Thread*)+0x47

V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
V  [libjvm.so+0xa7bb6b]  JavaThread::thread_main_inner()+0xdb
V  [libjvm.so+0xa7be71]  JavaThread::run()+0x2d1
V  [libjvm.so+0x90d922]  java_start(Thread*)+0x102
C  [libpthread.so.0+0x75f0]  start_thread+0xd0


Stack: [0x7fb3f5e74000,0x7fb3f5f75000],  sp=0x7fb3f5f73788, 
free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, 
C=native code)

C  [libapr-1.so.0+0x1efb0]  apr_allocator_mutex_get+0x0
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
J 1633 C1 
java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62 
bytes) @ 0x7fb3f763a964 [0x7fb3f763a400+0x564]
J 1460 C1 
java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V 
(6 bytes) @ 0x7fb3f71bfd1b [0x7fb3f71bfcc0+0x5b]

j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub
V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*, 
methodHandle*, JavaCallArguments*, Thread*)+0xddb
V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*, 
KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle, 
KlassHandle, Symbol*, Symbol*, Thread*)+0x47

V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
V  [libjvm.so+0xa7bb6b]  JavaThread::thread_main_inner()+0xdb
V  [libjvm.so+0xa7be71]  JavaThread::run()+0x2d1
V  [libjvm.so+0x90d922]  java_start(Thread*)+0x102
C  [libpthread.so.0+0x75f0]  start_thread+0xd0


Stack: [0x7f9750c1d000,0x7f9750d1e000],  sp=0x7f9750d1ba70, 
free space=1018k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, 
C=native code)

C  [libapr-1.so.0+0x1fcf0]  apr_pool_destroy+0x20
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
j 
org.apache.tomcat.util.net.openssl.OpenSSLEngine.wrap([Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;+261
J 2069 C1 
javax.net.ssl.SSLEngine.wrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult; 
(16 bytes) @ 0x7f975a1a9520 [0x7f975a1a9280+0x2a0]

j  org.apache.tomcat.util.net.SecureNio2Channel.close()V+182
j  org.apache.tomcat.util.net.SecureNio2Channel.close(Z)V+1
j  org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.close()V+156
j 
org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doClose()V+23

j  org.apache.tomcat.websocket.WsRemoteEndpointImplBase.close()V+51
j 
org.apache.tomcat.websocket.WsSession.onClose(Ljavax/websocket/CloseReason;)V+90

j  org.apache.tomcat.websocket.WsFrameBase.processDataControl()Z+243
j  org.apache.tomcat.websocket.WsFrameBase.processData()Z+11
j  org.apache.tomcat.websocket.WsFrameBase.processInputBuffer()V+88
j  org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable()V+187
j 
org.apache.tomcat.websocket.server.WsFrameServer.doOnDataAvailable()Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+1
j 
org.apache.tomcat.websocket.server.WsFrameServer.notifyDataAvailable()Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+61
j 
org.apache.tomcat.websocket.server.WsHttpUpgradeHandler.upgradeDispatch(Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;+5

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Mark Thomas
Thanks Rainer. This is all very helpful. I agree that r1851094 is the
most likely cause. Unfortunately, I haven't been able to reproduce this
reliably. Can you confirm APR and OpenSSL versions you used?

I'll leave the 1.2.20 vote open for now (in case we track the root cause
elsewhere) but I expect that it will need to be cancelled and a 1.2.21
will be required.

I'll try and figure out where r1851094 went wrong. Any help gratefully
received.

Mark


On 24/01/2019 09:41, Rainer Jung wrote:
> Addition:
> 
> - running the same tests just replacing tcnative 1.2.20 by 1.2.19 does
> not crash
> 
> - running the same 1.2.20 test on Linux (SLES11) also crashes, but this
> time not in TestCustomSsl for NIO and NIO2, but instead a few TLS tests
> only NIO2:
> 
>     [junit] Test org.apache.tomcat.util.net.TestClientCert FAILED (crashed)
>     [junit] Test org.apache.tomcat.util.net.TestCustomSsl FAILED (crashed)
>     [junit] Test org.apache.tomcat.websocket.TestWebSocketFrameClientSSL
> FAILED (crashed)
>     [junit] Test org.apache.tomcat.websocket.TestWsWebSocketContainer
> FAILED (crashed)
> 
> The crashes here are always segmentation faults in the finalizer, stacks
> vary a bit:
> 
> C  [libapr-1.so.0+0x1fcdd]  apr_pool_destroy+0xd
> j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
> j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
> J 1667 C1
> java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62
> bytes) @ 0x7fc1349059a4 [0x7fc134905440+0x564]
> J 1666 C1
> java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V
> (6 bytes) @ 0x7fc1348bb09b [0x7fc1348bb040+0x5b]
> j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
> v  ~StubRoutines::call_stub
> V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*,
> methodHandle*, JavaCallArguments*, Thread*)+0xddb
> V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*,
> KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
> V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle,
> KlassHandle, Symbol*, Symbol*, Thread*)+0x47
> V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
> V  [libjvm.so+0xa7bb6b]  JavaThread::thread_main_inner()+0xdb
> V  [libjvm.so+0xa7be71]  JavaThread::run()+0x2d1
> V  [libjvm.so+0x90d922]  java_start(Thread*)+0x102
> C  [libpthread.so.0+0x75f0]  start_thread+0xd0
> 
> 
> Stack: [0x7fb3f5e74000,0x7fb3f5f75000],  sp=0x7fb3f5f73788,
> free space=1021k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
> C=native code)
> C  [libapr-1.so.0+0x1efb0]  apr_allocator_mutex_get+0x0
> j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
> j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
> J 1633 C1
> java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62
> bytes) @ 0x7fb3f763a964 [0x7fb3f763a400+0x564]
> J 1460 C1
> java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V
> (6 bytes) @ 0x7fb3f71bfd1b [0x7fb3f71bfcc0+0x5b]
> j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
> v  ~StubRoutines::call_stub
> V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*,
> methodHandle*, JavaCallArguments*, Thread*)+0xddb
> V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*,
> KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
> V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle,
> KlassHandle, Symbol*, Symbol*, Thread*)+0x47
> V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
> V  [libjvm.so+0xa7bb6b]  JavaThread::thread_main_inner()+0xdb
> V  [libjvm.so+0xa7be71]  JavaThread::run()+0x2d1
> V  [libjvm.so+0x90d922]  java_start(Thread*)+0x102
> C  [libpthread.so.0+0x75f0]  start_thread+0xd0
> 
> 
> Stack: [0x7f9750c1d000,0x7f9750d1e000],  sp=0x7f9750d1ba70,
> free space=1018k
> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
> C=native code)
> C  [libapr-1.so.0+0x1fcf0]  apr_pool_destroy+0x20
> j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
> j
> org.apache.tomcat.util.net.openssl.OpenSSLEngine.wrap([Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;+261
> 
> J 2069 C1
> javax.net.ssl.SSLEngine.wrap(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljavax/net/ssl/SSLEngineResult;
> (16 bytes) @ 0x7f975a1a9520 [0x7f975a1a9280+0x2a0]
> j  org.apache.tomcat.util.net.SecureNio2Channel.close()V+182
> j  org.apache.tomcat.util.net.SecureNio2Channel.close(Z)V+1
> j  org.apache.tomcat.util.net.Nio2Endpoint$Nio2SocketWrapper.close()V+156
> j
> org.apache.tomcat.websocket.server.WsRemoteEndpointImplServer.doClose()V+23
> j  org.apache.tomcat.websocket.WsRemoteEndpointImplBase.close()V+51
> j
> org.apache.tomcat.websocket.WsSession.onClose(Ljavax/websocket/CloseReason;)V+90
> 
> j  org.apache.tomcat.websocket.WsFrameBase.processDataControl()Z+243
> j  org.apache.tomcat.webs

Re: [Bug 62912] Tomcat adds a space character in the Content-Type header if this one has a ; character right after

2019-01-24 Thread Mark Thomas
On 23/01/2019 22:42, Igal Sapir wrote:
> On 1/23/2019 1:56 PM, Mark Thomas wrote:
>> 
>>
>>> On 23/01/2019 21:48, bugzi...@apache.org wrote:
 https://bz.apache.org/bugzilla/show_bug.cgi?id=62912

 --- Comment #14 from Mark Thomas  ---
 Created attachment 36389
    -->
 https://bz.apache.org/bugzilla/attachment.cgi?id=36389&action=edit
 Tomcat 9 patch to retain app provided content-type

 The application provided content-type is only retained if no charset is
 present.
>>> Thoughts on applying this patch to Tomcat 9?
>>>
>>> Pros: It allows apps to work with both user agents that require spaces
>>> and user agents that require no spaces
>>>
>>> Cons: The switch to passing through the app provided value may break
>>> some user agents and an app change would be required to fix it.
>>>
>>> The risk looks to be very low but so is the scale of the problem this
>>> fixes. One bug report in a little over 8 years suggests this is an issue
>>> for a small minority of users.
>>>
>>> If anything, I am leaning towards applying the patch. Thoughts?
> 
> It looks safe to me.
> 
> While reviewing the code I noticed the use of a String[] instead of a
> simple class [1], which would make the code much more readable and more
> maintainable.  I have to admit that I reviewed it online on GitHub, it
> is probably not as bad in an IDE.
> 
> Would it make sense for me to refactor it?  The new class can be
> internal, possibly package private.

I can't remember why I did it that way. It might have been related to
GC/performance overhead. It would be worth checking the impact of any
change. It might just have been that a String array was less code.

The class will need to be public since it will be used by multiple
packages. OK, we could use an interface but really does start to look
like over engineering.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rémy Maucherat
On Thu, Jan 24, 2019 at 10:49 AM Rainer Jung 
wrote:

> The other possibility - since the crash often happens in the
> finalizer - that there is double destruction between normal code and
> finalizer code.
>

OpenSSLEngine.shutdown is obviously very risky, and after some problems it
is now fully synchronized with a check against a flag to avoid running it
twice. So this is probably not the cause of the crash (which I have not run
into).

Rémy


svn commit: r1852009 - /tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

2019-01-24 Thread markt
Author: markt
Date: Thu Jan 24 10:29:32 2019
New Revision: 1852009

URL: http://svn.apache.org/viewvc?rev=1852009&view=rev
Log:
Fix failing test after bz 63003 fix

Modified:
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java?rev=1852009&r1=1852008&r2=1852009&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
(original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/catalina/core/TestAsyncContextImpl.java 
Thu Jan 24 10:29:32 2019
@@ -2379,11 +2379,13 @@ public class TestAsyncContextImpl extend
 request.setCoyoteRequest(new org.apache.coyote.Request());
 request.setContext(context);
 final AsyncContextImpl ac = new AsyncContextImpl(request);
+context.incrementInProgressAsyncCount();
 
EasyMock.expect(context.getApplicationEventListeners()).andReturn(null);
 EasyMock.expect(context.getLoader()).andReturn(loader);
 EasyMock.expect(loader.getClassLoader()).andReturn(null);
 EasyMock.expect(Boolean.valueOf(
 
context.fireRequestDestroyEvent(request.getRequest(.andReturn(Boolean.TRUE);
+context.decrementInProgressAsyncCount();
 
 EasyMock.replay(context, loader);
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-apr (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-apr has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-apr :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-APR
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-APR/logs



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 19 mins 58 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-APR 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=true -Dexecute.test.bio=false -Dtest.reports=output/logs-APR 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native-1.2-1.0.2/dest-20190124/lib
 -Dtest.relaxTiming=true -Dexecute.test.nio=false -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190124.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-api.jar:/srv/gump/public/workspace/tomcat-7.

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 24.01.2019 um 11:09 schrieb Mark Thomas:

Thanks Rainer. This is all very helpful. I agree that r1851094 is the
most likely cause. Unfortunately, I haven't been able to reproduce this
reliably. Can you confirm APR and OpenSSL versions you used?


APR 1.6.5
OpenSSL 1.0.2q

In "java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java" in 
method destroy() there's a comment


// Guard against multiple destroyPools() calls triggered by construction 
exception and finalize() later


and an atomic is used to prevent concurrent destruction attempts. The 
pool destroyed there IMHO is the parent pool of the con->pool which 
triggers our problem.


In OpenSSLEngine the destruction marker "destroyed" is just a volatile 
boolean, so there's a gap between checking and setting.


Furthermore I wonder whether OpenSSLContext.destroy() could run before 
the finalizer of OpenSSLEngine. In that case the destruction of the pool 
aprPool in OpenSSLContext.destroy() - I guess that would be c->pool in 
tcnative - IMHO would have also destroyed its child pool con->pool and 
the finalizer must not try to destroy it again. Unfortunately i don't 
see an easy way in tcnatiev to coordinate between the c->pool 
destruction and con->pool, because con is not available from c.


I am a bit limited on time, but I'll see whether I can easily reproduce 
outside of my tcnatiev test scripts in a TC 8.5 checkout. If so, I'll 
add a bit of debug logging to OpenSSLContext.destroy() and 
OpenSSLEngine.finalize() resp. OpenSSLEngine.shutdown() to verify order 
of execution.


If the Finalizer is part of the culprit, then memory/GC behavior might 
influence reproduction.


Regards,

Rainer


I'll leave the 1.2.20 vote open for now (in case we track the root cause
elsewhere) but I expect that it will need to be cancelled and a 1.2.21
will be required.

I'll try and figure out where r1851094 went wrong. Any help gratefully
received.

Mark


On 24/01/2019 09:41, Rainer Jung wrote:

Addition:

- running the same tests just replacing tcnative 1.2.20 by 1.2.19 does
not crash

- running the same 1.2.20 test on Linux (SLES11) also crashes, but this
time not in TestCustomSsl for NIO and NIO2, but instead a few TLS tests
only NIO2:

     [junit] Test org.apache.tomcat.util.net.TestClientCert FAILED (crashed)
     [junit] Test org.apache.tomcat.util.net.TestCustomSsl FAILED (crashed)
     [junit] Test org.apache.tomcat.websocket.TestWebSocketFrameClientSSL
FAILED (crashed)
     [junit] Test org.apache.tomcat.websocket.TestWsWebSocketContainer
FAILED (crashed)

The crashes here are always segmentation faults in the finalizer, stacks
vary a bit:

C  [libapr-1.so.0+0x1fcdd]  apr_pool_destroy+0xd
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
J 1667 C1
java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62
bytes) @ 0x7fc1349059a4 [0x7fc134905440+0x564]
J 1666 C1
java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V
(6 bytes) @ 0x7fc1348bb09b [0x7fc1348bb040+0x5b]
j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub
V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*,
methodHandle*, JavaCallArguments*, Thread*)+0xddb
V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*,
KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle,
KlassHandle, Symbol*, Symbol*, Thread*)+0x47
V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
V  [libjvm.so+0xa7bb6b]  JavaThread::thread_main_inner()+0xdb
V  [libjvm.so+0xa7be71]  JavaThread::run()+0x2d1
V  [libjvm.so+0x90d922]  java_start(Thread*)+0x102
C  [libpthread.so.0+0x75f0]  start_thread+0xd0


Stack: [0x7fb3f5e74000,0x7fb3f5f75000],  sp=0x7fb3f5f73788,
free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C  [libapr-1.so.0+0x1efb0]  apr_allocator_mutex_get+0x0
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.shutdown()V+23
j  org.apache.tomcat.util.net.openssl.OpenSSLEngine.finalize()V+5
J 1633 C1
java.lang.ref.Finalizer.runFinalizer(Lsun/misc/JavaLangAccess;)V (62
bytes) @ 0x7fb3f763a964 [0x7fb3f763a400+0x564]
J 1460 C1
java.lang.ref.Finalizer.access$100(Ljava/lang/ref/Finalizer;Lsun/misc/JavaLangAccess;)V
(6 bytes) @ 0x7fb3f71bfd1b [0x7fb3f71bfcc0+0x5b]
j  java.lang.ref.Finalizer$FinalizerThread.run()V+45
v  ~StubRoutines::call_stub
V  [libjvm.so+0x68825b]  JavaCalls::call_helper(JavaValue*,
methodHandle*, JavaCallArguments*, Thread*)+0xddb
V  [libjvm.so+0x685b23]  JavaCalls::call_virtual(JavaValue*,
KlassHandle, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x263
V  [libjvm.so+0x6860e7]  JavaCalls::call_virtual(JavaValue*, Handle,
KlassHandle, Symbol*, Symbol*, Thread*)+0x47
V  [libjvm.so+0x6f225c]  thread_entry(JavaThread*, Thread*)+0x6c
V  [libjvm.so+0xa7bb6b]  JavaTh

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 24.01.2019 um 11:17 schrieb Rémy Maucherat:

On Thu, Jan 24, 2019 at 10:49 AM Rainer Jung 
wrote:


The other possibility - since the crash often happens in the
finalizer - that there is double destruction between normal code and
finalizer code.



OpenSSLEngine.shutdown is obviously very risky, and after some problems it
is now fully synchronized with a check against a flag to avoid running it
twice. So this is probably not the cause of the crash (which I have not run
into).


Saw your post only after sending my recent one. There might be 
dublication between OpenSSLContext.destroy() - destroying I think the 
parent pool of con->pool and thus automaticaly also con->pool - and 
OpenSSLEngine.finalize(), also destroying con->pool.


Regards,

Rainer


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Tomcat WebSocket client file descriptors leak

2019-01-24 Thread vtarasov

Hello!

We found the leak of Tomcat WebSocket client file descriptors. File 
descriptors are not closed when the connection between server and client 
is broken abnormally (from the server side if the server process is 
killed for example).


Test project and how to reproduce you can find in my repo on GitHub: 
https://github.com/vatarasov/wstest


Thanks!

Tarasov Vladimir,

Java Dev,  Naumen



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in on tomcat-7-trunk

2019-01-24 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-7-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-7-trunk/builds/1245

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1852009
Blamelist: markt

Build succeeded!

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung
I added some debug logging to native and the Java classes and the 
picture looks understandable now. Here the example from NIO and 
TestCustomSsl:


- test testCustomTrustManagerNone creates OpenSSLEngine 7f560c39, ssl 
4298850656 and con->pool 4309969128 from parent pool aprPool = c->pool 
4306893544


- at the end of this test OpenSSLContext.destroy() runs and destroys 
aprPool = c->pool 4306893544 and therefore also its child pools 
including con->pool 4309969128


- later during testCustomSslImplementation the Finalizer kicks in for 
the old OpenSSLEngine 7f560c39.


- The finalize() method frees the old ssl 4298850656, which was also 
created in the earlier test


- Freeing that ssl in the native code destroys the con->pool 4309969128 
which was already destroyed at the end of the first test


- kaboom.

24-Jan-2019 12:51:50.967 INFO [main] 
org.apache.catalina.startup.LoggingBaseTest.setUp Starting test case 
[testCustomTrustManagerNone]
24-Jan-2019 12:51:51.894 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR 
based Apache Tomcat Native library [1.2.20] using APR version [1.6.5].
24-Jan-2019 12:51:51.896 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR 
capabilities: IPv6 [true], sendfile [true], accept filters [false], 
random [true].
24-Jan-2019 12:51:51.897 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL 
configuration: useAprConnector [false], useOpenSSL [true]
24-Jan-2019 12:51:51.933 INFO [main] 
org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL 
successfully initialized [OpenSSL 1.0.2q  20 Nov 2018]
24-Jan-2019 12:51:53.418 INFO [main] 
org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler 
["https-openssl-nio-127.0.0.1-auto-1"]
24-Jan-2019 12:51:53.537 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created temp 
aprPool in static part of OpenSSLEngine 4306893544
24-Jan-2019 12:51:53.544 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created temp 
SSLContext in static part of OpenSSLEngine 4306893664

Created con->pool 4307758744 from c->pool 4306893544
24-Jan-2019 12:51:53.551 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created temp 
ssl in static part of OpenSSLEngine with con->pool 4307758744 and 
c->pool 4306893544
24-Jan-2019 12:51:53.727 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Freeing temp 
ssl in static part of OpenSSLEngine with con->pool 4307758744 and 
c->pool 4306893544
freeSSL destroying con->pool 430775874424-Jan-2019 12:51:53.729 SEVERE 
[main] org.apache.tomcat.util.net.openssl.OpenSSLEngine. Freeing 
temp SSLContext in static part of OpenSSLEngine 4306893664
24-Jan-2019 12:51:53.731 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Destroying 
temp aprPool in static part of OpenSSLEngine 4306893544
24-Jan-2019 12:51:55.687 SEVERE [main] 
org.apache.tomcat.util.net.openssl.OpenSSLContext. Created 
OpenSSLContext with aprPool 4306893544
24-Jan-2019 12:51:55.816 INFO [main] 
org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a 
shared selector for servlet write/read
24-Jan-2019 12:51:55.916 INFO [main] 
org.apache.catalina.core.StandardService.startInternal Starting service 
[Tomcat]
24-Jan-2019 12:51:55.919 INFO [main] 
org.apache.catalina.core.StandardEngine.startInternal Starting Servlet 
Engine: Apache Tomcat/8.5.X-rXX-dev
24-Jan-2019 12:51:56.406 INFO [main] 
org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler 
["https-openssl-nio-127.0.0.1-auto-1-36031"]

Created con->pool 4307758744 from c->pool 4306893544
24-Jan-2019 12:51:56.937 SEVERE 
[https-openssl-nio-127.0.0.1-auto-1-exec-1] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created 
OpenSSLEngine org.apache.tomcat.util.net.openssl.OpenSSLEngine@3753746, 
ssl 4305791088 with con->pool 4307758744 and c->pool 4306893544
24-Jan-2019 12:51:56.940 SEVERE 
[https-openssl-nio-127.0.0.1-auto-1-exec-1] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created 
OpenSSLEngine org.apache.tomcat.util.net.openssl.OpenSSLEngine@3753746, 
networkBIO 4305793296

Created con->pool 4309969128 from c->pool 4306893544
24-Jan-2019 12:51:58.394 SEVERE 
[https-openssl-nio-127.0.0.1-auto-1-exec-8] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created 
OpenSSLEngine org.apache.tomcat.util.net.openssl.OpenSSLEngine@7f560c39, 
ssl 4298850656 with con->pool 4309969128 and c->pool 4306893544
24-Jan-2019 12:51:58.396 SEVERE 
[https-openssl-nio-127.0.0.1-auto-1-exec-8] 
org.apache.tomcat.util.net.openssl.OpenSSLEngine. Created 
OpenSSLEngine org.apache.tomcat.util.net.openssl.OpenSSLEngine@7f560c39, 
networkBIO 4299567568
24-Jan-2019 12:51:58.689 INFO [main] 
org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler 
["https-openssl-nio-127.0.0.1-auto-1-36031"]
24-Jan-2019 12:51:58.703 INFO [main] 
org.apache.catalina.core.StandardService.stopInternal Stopping service 
[Tomcat

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 21.01.2019 um 15:49 schrieb Mark Thomas:

Version 1.2.20 includes the following changes compared to 1.2.19:

- Fixed memory leak associated with the use of OpenSSL BIO (used when
   OpenSSL provides the TLS functionality for the NIO and NIO2
   connectors)

Various other fixes and improvements. See the changelog for details.

The proposed release artefacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 1.2.20 release is
  [ ] Stable, go ahead and release
  [X] Broken because of ...


At last during unit test execution JVM crashes, eg. in TestCustomSsl. A 
new native APR pool is being freed as a child pool of aprPool during 
OpenSSLContext.destroy() at the end of a test and then there's another 
attempt to free it later when the Finalizer kicks in and finalizes the 
old OpenSSLEngine.


What I don't know though is whether this can happen for normal TC or 
embedded TC or is specific to the lifetimes of objects during unit test 
execution.


Details:

- test testCustomTrustManagerNone creates OpenSSLEngine 7f560c39, ssl 
4298850656 and con->pool 4309969128 from parent pool aprPool = c->pool 
4306893544


- at the end of this test OpenSSLContext.destroy() runs and destroys 
aprPool = c->pool 4306893544 and therefore also its child pools 
including con->pool 4309969128


- later during testCustomSslImplementation the Finalizer kicks in for 
the old OpenSSLEngine 7f560c39.


- The finalize() method frees the old ssl 4298850656, which was also 
created in the earlier test


- Freeing that ssl in the native code destroys the con->pool 4309969128 
which was already destroyed at the end of the first test


Regards,

Rainer

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rémy Maucherat
On Thu, Jan 24, 2019 at 1:29 PM Rainer Jung  wrote:

> Am 21.01.2019 um 15:49 schrieb Mark Thomas:
> > Version 1.2.20 includes the following changes compared to 1.2.19:
> >
> > - Fixed memory leak associated with the use of OpenSSL BIO (used when
> >OpenSSL provides the TLS functionality for the NIO and NIO2
> >connectors)
> >
> > Various other fixes and improvements. See the changelog for details.
> >
> > The proposed release artefacts can be found at [1],
> > and the build was done using tag [2].
> >
> > The Apache Tomcat Native 1.2.20 release is
> >   [ ] Stable, go ahead and release
> >   [X] Broken because of ...
>

Well, if you demonstrate the native code isn't at fault, but the Java code
should be fixed instead, then the 1.2.20 build isn't broken.
[but it should be delayed for a bit]

Rémy


Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Mark Thomas
On 24/01/2019 12:18, Rainer Jung wrote:
> Am 21.01.2019 um 15:49 schrieb Mark Thomas:
>> Version 1.2.20 includes the following changes compared to 1.2.19:
>>
>> - Fixed memory leak associated with the use of OpenSSL BIO (used when
>>    OpenSSL provides the TLS functionality for the NIO and NIO2
>>    connectors)
>>
>> Various other fixes and improvements. See the changelog for details.
>>
>> The proposed release artefacts can be found at [1],
>> and the build was done using tag [2].
>>
>> The Apache Tomcat Native 1.2.20 release is
>>   [ ] Stable, go ahead and release
>>   [X] Broken because of ...
> 
> At last during unit test execution JVM crashes, eg. in TestCustomSsl. A
> new native APR pool is being freed as a child pool of aprPool during
> OpenSSLContext.destroy() at the end of a test and then there's another
> attempt to free it later when the Finalizer kicks in and finalizes the
> old OpenSSLEngine.
> 
> What I don't know though is whether this can happen for normal TC or
> embedded TC or is specific to the lifetimes of objects during unit test
> execution.
> 
> Details:
> 
> - test testCustomTrustManagerNone creates OpenSSLEngine 7f560c39, ssl
> 4298850656 and con->pool 4309969128 from parent pool aprPool = c->pool
> 4306893544
> 
> - at the end of this test OpenSSLContext.destroy() runs and destroys
> aprPool = c->pool 4306893544 and therefore also its child pools
> including con->pool 4309969128
> 
> - later during testCustomSslImplementation the Finalizer kicks in for
> the old OpenSSLEngine 7f560c39.
> 
> - The finalize() method frees the old ssl 4298850656, which was also
> created in the earlier test
> 
> - Freeing that ssl in the native code destroys the con->pool 4309969128
> which was already destroyed at the end of the first test

It can happen in normal usage. I saw it once. It happens on Connector
stop so it could be worse. My memory leak fix is definitely the root
cause. Any thoughts on a possible fix?

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 24.01.2019 um 13:37 schrieb Mark Thomas:

On 24/01/2019 12:18, Rainer Jung wrote:

Am 21.01.2019 um 15:49 schrieb Mark Thomas:

Version 1.2.20 includes the following changes compared to 1.2.19:

- Fixed memory leak associated with the use of OpenSSL BIO (used when
    OpenSSL provides the TLS functionality for the NIO and NIO2
    connectors)

Various other fixes and improvements. See the changelog for details.

The proposed release artefacts can be found at [1],
and the build was done using tag [2].

The Apache Tomcat Native 1.2.20 release is
   [ ] Stable, go ahead and release
   [X] Broken because of ...


At last during unit test execution JVM crashes, eg. in TestCustomSsl. A
new native APR pool is being freed as a child pool of aprPool during
OpenSSLContext.destroy() at the end of a test and then there's another
attempt to free it later when the Finalizer kicks in and finalizes the
old OpenSSLEngine.

What I don't know though is whether this can happen for normal TC or
embedded TC or is specific to the lifetimes of objects during unit test
execution.

Details:

- test testCustomTrustManagerNone creates OpenSSLEngine 7f560c39, ssl
4298850656 and con->pool 4309969128 from parent pool aprPool = c->pool
4306893544

- at the end of this test OpenSSLContext.destroy() runs and destroys
aprPool = c->pool 4306893544 and therefore also its child pools
including con->pool 4309969128

- later during testCustomSslImplementation the Finalizer kicks in for
the old OpenSSLEngine 7f560c39.

- The finalize() method frees the old ssl 4298850656, which was also
created in the earlier test

- Freeing that ssl in the native code destroys the con->pool 4309969128
which was already destroyed at the end of the first test


It can happen in normal usage. I saw it once. It happens on Connector
stop so it could be worse. My memory leak fix is definitely the root
cause. Any thoughts on a possible fix?


Currently experimenting with a cleanup handler registered for con->pool. 
That can get an arbitrary argument and is called when the cleanup 
happens, especially useful for the problematic cleanup as a child pool. 
The handler could overwrite con->pool with NULL. But that would only 
make sense, if we are sure, that we are notgoing to use stuff after 
OpenSSLContext.destroy().


Regards,

Rainer


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Mark Thomas
On 24/01/2019 13:01, Rainer Jung wrote:
> Am 24.01.2019 um 13:37 schrieb Mark Thomas:



>> It can happen in normal usage. I saw it once. It happens on Connector
>> stop so it could be worse. My memory leak fix is definitely the root
>> cause. Any thoughts on a possible fix?
> 
> Currently experimenting with a cleanup handler registered for con->pool.
> That can get an arbitrary argument and is called when the cleanup
> happens, especially useful for the problematic cleanup as a child pool.
> The handler could overwrite con->pool with NULL. But that would only
> make sense, if we are sure, that we are notgoing to use stuff after
> OpenSSLContext.destroy().

That handler sounds like the way to go. Remove the reference to the pool
when it is cleaned up.

I'm reasonable sure that there isn't any usage of the pool after that
point else we'd be seeing crashes all over the place.

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 62695] Provide sha512 checksums for Tomcat releases published to Maven

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=62695

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |NEEDINFO

--- Comment #2 from Mark Thomas  ---
This is the INFRA ticket where the Nexus changes are being tracked:
https://issues.apache.org/jira/browse/INFRA-14923

I'm marking this issue as NEEDINFO to indicate that progress is paused waiting
on an update to that ticket. I've also added myself as a watcher to that ticket
so i can follow any progress.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 24.01.2019 um 14:16 schrieb Mark Thomas:

On 24/01/2019 13:01, Rainer Jung wrote:

Am 24.01.2019 um 13:37 schrieb Mark Thomas:





It can happen in normal usage. I saw it once. It happens on Connector
stop so it could be worse. My memory leak fix is definitely the root
cause. Any thoughts on a possible fix?


Currently experimenting with a cleanup handler registered for con->pool.
That can get an arbitrary argument and is called when the cleanup
happens, especially useful for the problematic cleanup as a child pool.
The handler could overwrite con->pool with NULL. But that would only
make sense, if we are sure, that we are notgoing to use stuff after
OpenSSLContext.destroy().


That handler sounds like the way to go. Remove the reference to the pool
when it is cleaned up.

I'm reasonable sure that there isn't any usage of the pool after that
point else we'd be seeing crashes all over the place.


I needed a few attempts due to the following complexities:

- using con as data in the cleanup handler and resetting con->pool 
didn't work, because con is allocated from that pool and when we later 
check con->pool the contents of con are already undefined. Various 
errors happen.


- so I decided to use ssl as the data. But ssl is of type SSL which can 
only be extended via app data. So I needed to introduce a new index 4 
tacking destroyCount similar to handshakeCount in index 3.


- I also moved the SSL_free(ssl_) in freeSSL() behind the pool 
destruction to ba safe, in case that SSL_free would somehow influence 
the app data stored in the ssl. con is part of that app data and so 
con->pool.


We could combine eg. handshakeCount and destroyCount in one struct and 
get ack to only 3 app data indexes, but since their use is very 
different, I prefer the 4th index.


So I ended up with the attached patch.

Regards,

Rainer



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung

Am 24.01.2019 um 15:51 schrieb Rainer Jung:

Am 24.01.2019 um 14:16 schrieb Mark Thomas:

On 24/01/2019 13:01, Rainer Jung wrote:

Am 24.01.2019 um 13:37 schrieb Mark Thomas:





It can happen in normal usage. I saw it once. It happens on Connector
stop so it could be worse. My memory leak fix is definitely the root
cause. Any thoughts on a possible fix?


Currently experimenting with a cleanup handler registered for con->pool.
That can get an arbitrary argument and is called when the cleanup
happens, especially useful for the problematic cleanup as a child pool.
The handler could overwrite con->pool with NULL. But that would only
make sense, if we are sure, that we are notgoing to use stuff after
OpenSSLContext.destroy().


That handler sounds like the way to go. Remove the reference to the pool
when it is cleaned up.

I'm reasonable sure that there isn't any usage of the pool after that
point else we'd be seeing crashes all over the place.


I needed a few attempts due to the following complexities:

- using con as data in the cleanup handler and resetting con->pool 
didn't work, because con is allocated from that pool and when we later 
check con->pool the contents of con are already undefined. Various 
errors happen.


- so I decided to use ssl as the data. But ssl is of type SSL which can 
only be extended via app data. So I needed to introduce a new index 4 
tacking destroyCount similar to handshakeCount in index 3.


- I also moved the SSL_free(ssl_) in freeSSL() behind the pool 
destruction to ba safe, in case that SSL_free would somehow influence 
the app data stored in the ssl. con is part of that app data and so 
con->pool.


We could combine eg. handshakeCount and destroyCount in one struct and 
get ack to only 3 app data indexes, but since their use is very 
different, I prefer the 4th index.




So I ended up with the following patch:

https://home.apache.org/~rjung/patches/tcnative-con-pool-lifecycle.patch

Regards,

Rainer



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1852036 - in /tomcat/native/trunk/native: include/ssl_private.h src/ssl.c src/sslutils.c

2019-01-24 Thread rjung
Author: rjung
Date: Thu Jan 24 15:20:49 2019
New Revision: 1852036

URL: http://svn.apache.org/viewvc?rev=1852036&view=rev
Log:
Fix crashes due to dublicate pool destruction,
once via the parent pool and once later via
the Finalizer.

Crash is new in 1.2.20 due to the use of a new
child pool to fix a memleak issue.

Hopefully this fix here does not introduce a
new memleak.

Modified:
tomcat/native/trunk/native/include/ssl_private.h
tomcat/native/trunk/native/src/ssl.c
tomcat/native/trunk/native/src/sslutils.c

Modified: tomcat/native/trunk/native/include/ssl_private.h
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/include/ssl_private.h?rev=1852036&r1=1852035&r2=1852036&view=diff
==
--- tomcat/native/trunk/native/include/ssl_private.h (original)
+++ tomcat/native/trunk/native/include/ssl_private.h Thu Jan 24 15:20:49 2019
@@ -360,13 +360,16 @@ typedef struct {
 /*
  *  Additional Functions
  */
-voidSSL_init_app_data2_3_idx(void);
+voidSSL_init_app_data_idx(void);
 /* The app_data2 is used to store the tcn_ssl_ctxt_t pointer for the SSL 
instance. */
 void   *SSL_get_app_data2(SSL *);
 voidSSL_set_app_data2(SSL *, void *);
 /* The app_data3 is used to store the handshakeCount pointer for the SSL 
instance. */
 void   *SSL_get_app_data3(const SSL *);
 voidSSL_set_app_data3(SSL *, void *);
+/* The app_data4 is used to store the destroyCount pointer for the SSL 
instance. */
+void   *SSL_get_app_data4(const SSL *);
+voidSSL_set_app_data4(SSL *, void *);
 int SSL_password_prompt(tcn_pass_cb_t *);
 int SSL_password_callback(char *, int, int, void *);
 voidSSL_BIO_close(BIO *);

Modified: tomcat/native/trunk/native/src/ssl.c
URL: 
http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1852036&r1=1852035&r2=1852036&view=diff
==
--- tomcat/native/trunk/native/src/ssl.c (original)
+++ tomcat/native/trunk/native/src/ssl.c Thu Jan 24 15:20:49 2019
@@ -822,8 +822,8 @@ TCN_IMPLEMENT_CALL(jint, SSL, initialize
  * low entropy seed.
  */
 SSL_rand_seed(NULL);
-/* For SSL_get_app_data2() and SSL_get_app_data3() at request time */
-SSL_init_app_data2_3_idx();
+/* For SSL_get_app_data2(), SSL_get_app_data3() and SSL_get_app_data4() at 
request time */
+SSL_init_app_data_idx();
 
 init_dh_params();
 #if OPENSSL_VERSION_NUMBER >= 0x1010L && !defined(LIBRESSL_VERSION_NUMBER)
@@ -1273,11 +1273,27 @@ static void ssl_info_callback(const SSL
 }
 }
 
+static apr_status_t ssl_con_pool_cleanup(void *data)
+{
+SSL *ssl = (SSL*) data;
+int *destroyCount;
+
+TCN_ASSERT(ssl != 0);
+
+destroyCount = SSL_get_app_data4(ssl);
+if (destroyCount != NULL) {
+++(*destroyCount);
+}
+
+return APR_SUCCESS;
+}
+
 TCN_IMPLEMENT_CALL(jlong /* SSL * */, SSL, newSSL)(TCN_STDARGS,
jlong ctx /* tcn_ssl_ctxt_t 
* */,
jboolean server) {
 tcn_ssl_ctxt_t *c = J2P(ctx, tcn_ssl_ctxt_t *);
 int *handshakeCount = malloc(sizeof(int));
+int *destroyCount = malloc(sizeof(int));
 SSL *ssl;
 apr_pool_t *p = NULL;
 tcn_ssl_conn_t *con;
@@ -1289,6 +1305,7 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
 ssl = SSL_new(c->ctx);
 if (ssl == NULL) {
 free(handshakeCount);
+free(destroyCount);
 tcn_ThrowException(e, "cannot create new ssl");
 return 0;
 }
@@ -1296,6 +1313,7 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
 apr_pool_create(&p, c->pool);
 if (p == NULL) {
 free(handshakeCount);
+free(destroyCount);
 SSL_free(ssl);
 tcn_ThrowAPRException(e, apr_get_os_error());
 return 0;
@@ -1303,6 +1321,7 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
 
 if ((con = apr_pcalloc(p, sizeof(tcn_ssl_conn_t))) == NULL) {
 free(handshakeCount);
+free(destroyCount);
 SSL_free(ssl);
 apr_pool_destroy(p);
 tcn_ThrowAPRException(e, apr_get_os_error());
@@ -1317,6 +1336,10 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
 *handshakeCount = 0;
 SSL_set_app_data3(ssl, handshakeCount);
 
+/* Store the destroyCount in the SSL instance. */
+*destroyCount = 0;
+SSL_set_app_data4(ssl, destroyCount);
+
 /* Add callback to keep track of handshakes. */
 SSL_CTX_set_info_callback(c->ctx, ssl_info_callback);
 
@@ -1333,6 +1356,11 @@ TCN_IMPLEMENT_CALL(jlong /* SSL * */, SS
 /* Store for later usage in SSL_callback_SSL_verify */
 SSL_set_app_data2(ssl, c);
 SSL_set_app_data(ssl, con);
+/* Register cleanup that prevent double destruction */
+apr_pool_cleanup_register(con->pool, (const void *)ssl,
+  ssl_con_pool_cleanup,
+

Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Rainer Jung
Checked in as 1852036. My tests looked good (no crashes), but it would 
be useful to rerun the original memleak checks against the patched code.


Regards,

Rainer

Am 24.01.2019 um 15:54 schrieb Rainer Jung:

Am 24.01.2019 um 15:51 schrieb Rainer Jung:

Am 24.01.2019 um 14:16 schrieb Mark Thomas:

On 24/01/2019 13:01, Rainer Jung wrote:

Am 24.01.2019 um 13:37 schrieb Mark Thomas:





It can happen in normal usage. I saw it once. It happens on Connector
stop so it could be worse. My memory leak fix is definitely the root
cause. Any thoughts on a possible fix?


Currently experimenting with a cleanup handler registered for 
con->pool.

That can get an arbitrary argument and is called when the cleanup
happens, especially useful for the problematic cleanup as a child pool.
The handler could overwrite con->pool with NULL. But that would only
make sense, if we are sure, that we are notgoing to use stuff after
OpenSSLContext.destroy().


That handler sounds like the way to go. Remove the reference to the pool
when it is cleaned up.

I'm reasonable sure that there isn't any usage of the pool after that
point else we'd be seeing crashes all over the place.


I needed a few attempts due to the following complexities:

- using con as data in the cleanup handler and resetting con->pool 
didn't work, because con is allocated from that pool and when we later 
check con->pool the contents of con are already undefined. Various 
errors happen.


- so I decided to use ssl as the data. But ssl is of type SSL which 
can only be extended via app data. So I needed to introduce a new 
index 4 tacking destroyCount similar to handshakeCount in index 3.


- I also moved the SSL_free(ssl_) in freeSSL() behind the pool 
destruction to ba safe, in case that SSL_free would somehow influence 
the app data stored in the ssl. con is part of that app data and so 
con->pool.


We could combine eg. handshakeCount and destroyCount in one struct and 
get ack to only 3 app data indexes, but since their use is very 
different, I prefer the 4th index.




So I ended up with the following patch:

https://home.apache.org/~rjung/patches/tcnative-con-pool-lifecycle.patch

Regards,

Rainer


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Release Apache Tomcat Native 1.2.20

2019-01-24 Thread Mark Thomas
On 24/01/2019 15:22, Rainer Jung wrote:
> Checked in as 1852036. My tests looked good (no crashes), but it would
> be useful to rerun the original memleak checks against the patched code.

Will do.

Mark

> 
> Regards,
> 
> Rainer
> 
> Am 24.01.2019 um 15:54 schrieb Rainer Jung:
>> Am 24.01.2019 um 15:51 schrieb Rainer Jung:
>>> Am 24.01.2019 um 14:16 schrieb Mark Thomas:
 On 24/01/2019 13:01, Rainer Jung wrote:
> Am 24.01.2019 um 13:37 schrieb Mark Thomas:

 

>> It can happen in normal usage. I saw it once. It happens on Connector
>> stop so it could be worse. My memory leak fix is definitely the root
>> cause. Any thoughts on a possible fix?
>
> Currently experimenting with a cleanup handler registered for
> con->pool.
> That can get an arbitrary argument and is called when the cleanup
> happens, especially useful for the problematic cleanup as a child
> pool.
> The handler could overwrite con->pool with NULL. But that would only
> make sense, if we are sure, that we are notgoing to use stuff after
> OpenSSLContext.destroy().

 That handler sounds like the way to go. Remove the reference to the
 pool
 when it is cleaned up.

 I'm reasonable sure that there isn't any usage of the pool after that
 point else we'd be seeing crashes all over the place.
>>>
>>> I needed a few attempts due to the following complexities:
>>>
>>> - using con as data in the cleanup handler and resetting con->pool
>>> didn't work, because con is allocated from that pool and when we
>>> later check con->pool the contents of con are already undefined.
>>> Various errors happen.
>>>
>>> - so I decided to use ssl as the data. But ssl is of type SSL which
>>> can only be extended via app data. So I needed to introduce a new
>>> index 4 tacking destroyCount similar to handshakeCount in index 3.
>>>
>>> - I also moved the SSL_free(ssl_) in freeSSL() behind the pool
>>> destruction to ba safe, in case that SSL_free would somehow influence
>>> the app data stored in the ssl. con is part of that app data and so
>>> con->pool.
>>>
>>> We could combine eg. handshakeCount and destroyCount in one struct
>>> and get ack to only 3 app data indexes, but since their use is very
>>> different, I prefer the 4th index.
>>>
>>
>> So I ended up with the following patch:
>>
>> https://home.apache.org/~rjung/patches/tcnative-con-pool-lifecycle.patch
>>
>> Regards,
>>
>> Rainer
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63104] As per servlet api doc ServletContext.getResource should throw MalformedURLException but for some urls tomcat 8 is throwing IllegalArgumentException which is deviation for api.

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63104

Gajendra  changed:

   What|Removed |Added

 Resolution|REMIND  |---
 Status|RESOLVED|REOPENED

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 63104] As per servlet api doc ServletContext.getResource should throw MalformedURLException but for some urls tomcat 8 is throwing IllegalArgumentException which is deviation for api.

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=63104

Mark Thomas  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |WONTFIX

--- Comment #3 from Mark Thomas  ---
Change in behaviour between major versions is to be expected.

To repeat:
Tomcat has opted to throw an IAE in an attempt to make it clear that something
has gone badly wrong. Trying to step outside the web application root can be an
indication of a path traversal attack.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [Bug 62912] Tomcat adds a space character in the Content-Type header if this one has a ; character right after

2019-01-24 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Mark,

On 1/23/19 16:55, VP Brand wrote:
> On 23/01/2019 21:48, bugzi...@apache.org wrote:
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=62912
>> 
>> --- Comment #14 from Mark Thomas  --- Created
>> attachment 36389 -->
>> https://bz.apache.org/bugzilla/attachment.cgi?id=36389&action=edit
>>
>> 
Tomcat 9 patch to retain app provided content-type
>> 
>> The application provided content-type is only retained if no
>> charset is present.
>> 
> 
> Thoughts on applying this patch to Tomcat 9?
> 
> Pros: It allows apps to work with both user agents that require
> spaces and user agents that require no spaces
> 
> Cons: The switch to passing through the app provided value may
> break some user agents and an app change would be required to fix
> it.
> 
> The risk looks to be very low but so is the scale of the problem
> this fixes. One bug report in a little over 8 years suggests this
> is an issue for a small minority of users.
> 
> If anything, I am leaning towards applying the patch. Thoughts?

This might be a rat-hole of a question, but why are we implementing
the same logic in two different places? o.a.coyote.Response and
o.a.catalina.connector.Response? Can we get away with implementing
this in only one place or the other?

Related: is this code-comment from o.a.coyote.Response#containsHeader
accurate?

/**
 * Does the response contain the given header.
 * 
 * Warning: This method always returns false for
Content-Type
 * and Content-Length.
 *
 * @param name The name of the header of interest
 *
 * @return {@code true} if the response contains the header.
 */

- -chris
-BEGIN PGP SIGNATURE-
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxKA0AACgkQHPApP6U8
pFg1dw//Vhfz1W4MLcuZ09VIxCHPTiAFwNqqfQifkWDVmndsOmqsDX+BF3LBkhOf
50n/7Hk8X9a39NJ49v7m+FivYCN8rEAhc2DGLXY3SNlxrR54CpJnMryvZgulGC5U
2CiGSWpL3OBmyW4FggWu/RnzU1xKwvtc9kBInIXn1Zh0LsaL1C/Dx3evpdKF+YLi
apft0km2757khgYsq18D4VOs7pcBpQxogwYLcHKQ56ZWJAO8+aSUcpfuemLcVgnM
UH0es2hQF6RYWUf97e0Eu+f/yUcGx2koWLa2/+vO+EnjG4n0t/+/AmOBKZ1zcLeK
I4j6ONtlaOpRbd8px56V+ZR86ymYB5KzQkYW5HNjuzh+GdUw5L95vDtXfVCItopK
PtBi0k6GeDKuYnoKYBlhv1P0hqx7ywWwv1m2NrTOkVlrhB/DL3ocdrhNpySTSJe1
gjc6TiafLZvdlqFBvAR/HnIz6uY/AVJI3VXmhl/CPpijYub1Cf6QhjNYTUzOtyJL
h2jImB4irsal0+0jaqbCe/fo2YPtPlzkWx5ci70cRdbAY85In0sKa3ygEfGuEYhD
G6UDWng5vYTp2HX6VlPwX8zON7WUFMpCJX/oDxEeZF7NSYQu8xgBTuTpgveOVrv3
r8EAZcQc62jm9xxPM7Q7goPwSF0auCB4zHBMUxhcTgqD3h1o16w=
=qOBc
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [Bug 62912] Tomcat adds a space character in the Content-Type header if this one has a ; character right after

2019-01-24 Thread Mark Thomas
On 24/01/2019 18:26, Christopher Schultz wrote:
> Mark,
> 
> On 1/23/19 16:55, VP Brand wrote:
>> On 23/01/2019 21:48, bugzi...@apache.org wrote:
>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=62912
>>>
>>> --- Comment #14 from Mark Thomas  --- Created
>>> attachment 36389 -->
>>> https://bz.apache.org/bugzilla/attachment.cgi?id=36389&action=edit
>>>
>>>
> Tomcat 9 patch to retain app provided content-type
>>>
>>> The application provided content-type is only retained if no
>>> charset is present.
>>>
> 
>> Thoughts on applying this patch to Tomcat 9?
> 
>> Pros: It allows apps to work with both user agents that require
>> spaces and user agents that require no spaces
> 
>> Cons: The switch to passing through the app provided value may
>> break some user agents and an app change would be required to fix
>> it.
> 
>> The risk looks to be very low but so is the scale of the problem
>> this fixes. One bug report in a little over 8 years suggests this
>> is an issue for a small minority of users.
> 
>> If anything, I am leaning towards applying the patch. Thoughts?
> 
> This might be a rat-hole of a question, but why are we implementing
> the same logic in two different places? o.a.coyote.Response and
> o.a.catalina.connector.Response? Can we get away with implementing
> this in only one place or the other?

Maybe. Some svn archaeology would probably be required to figure out why
it was implemented this way and if that reason was still valid.

> Related: is this code-comment from o.a.coyote.Response#containsHeader
> accurate?

Yes.

Mark


> 
> /**
>  * Does the response contain the given header.
>  * 
>  * Warning: This method always returns false for
> Content-Type
>  * and Content-Length.
>  *
>  * @param name The name of the header of interest
>  *
>  * @return {@code true} if the response contains the header.
>  */
> 
> -chris
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1852079 - in /tomcat/trunk: java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/ webapps/docs/

2019-01-24 Thread markt
Author: markt
Date: Thu Jan 24 22:54:41 2019
New Revision: 1852079

URL: http://svn.apache.org/viewvc?rev=1852079&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57974
Re-work code that supports Session.getOpenSessions() to ensure that both 
client-side and server-side calls behave as the EG intended

Added:

tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
   (with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1852079&r1=1852078&r2=1852079&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsSession.java Thu Jan 24 
22:54:41 2019
@@ -45,6 +45,7 @@ import javax.websocket.RemoteEndpoint;
 import javax.websocket.SendResult;
 import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
+import javax.websocket.server.ServerEndpointConfig;
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -416,7 +417,7 @@ public class WsSession implements Sessio
 @Override
 public Set getOpenSessions() {
 checkState();
-return webSocketContainer.getOpenSessions(localEndpoint);
+return webSocketContainer.getOpenSessions(getSessionMapKey());
 }
 
 
@@ -605,11 +606,21 @@ public class WsSession implements Sessio
 localEndpoint.onError(this, e);
 }
 } finally {
-webSocketContainer.unregisterSession(localEndpoint, this);
+webSocketContainer.unregisterSession(getSessionMapKey(), this);
 }
 }
 
 
+private Object getSessionMapKey() {
+if (endpointConfig instanceof ServerEndpointConfig) {
+// Server
+return ((ServerEndpointConfig) endpointConfig).getPath();
+} else {
+// Client
+return localEndpoint;
+}
+}
+
 /**
  * Use protected so unit tests can access this method directly.
  * @param msg The message

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1852079&r1=1852078&r2=1852079&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Thu 
Jan 24 22:54:41 2019
@@ -89,8 +89,9 @@ public class WsWebSocketContainer implem
 private final Object asynchronousChannelGroupLock = new Object();
 
 private final Log log = LogFactory.getLog(WsWebSocketContainer.class); // 
must not be static
-private final Map> endpointSessionMap =
-new HashMap<>();
+// Server side uses the endpoint path as the key
+// Client side uses the client endpoint instance
+private final Map> endpointSessionMap = new 
HashMap<>();
 private final Map sessions = new 
ConcurrentHashMap<>();
 private final Object endPointSessionMapLock = new Object();
 
@@ -578,7 +579,7 @@ public class WsWebSocketContainer implem
 return ByteBuffer.wrap(bytes);
 }
 
-protected void registerSession(Endpoint endpoint, WsSession wsSession) {
+protected void registerSession(Object key, WsSession wsSession) {
 
 if (!wsSession.isOpen()) {
 // The session was closed during onOpen. No need to register it.
@@ -588,10 +589,10 @@ public class WsWebSocketContainer implem
 if (endpointSessionMap.size() == 0) {
 BackgroundProcessManager.getInstance().register(this);
 }
-Set wsSessions = endpointSessionMap.get(endpoint);
+Set wsSessions = endpointSessionMap.get(key);
 if (wsSessions == null) {
 wsSessions = new HashSet<>();
-endpointSessionMap.put(endpoint, wsSessions);
+endpointSessionMap.put(key, wsSessions);
 }
 wsSessions.add(wsSession);
 }
@@ -599,14 +600,14 @@ public class WsWebSocketContainer implem
 }
 
 
-protected void unregisterSession(Endpoint endpoint, WsSession wsSession) {
+protected void unregisterSession(Object key, WsSession wsSession) {
 
 synchronized (endPointSessionMapLock) {
-Set wsSessions = endpointSessionMap.get(endpoint);
+ 

svn commit: r1852080 - in /tomcat/tc8.5.x/trunk: ./ java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/ webapps/docs/

2019-01-24 Thread markt
Author: markt
Date: Thu Jan 24 23:01:49 2019
New Revision: 1852080

URL: http://svn.apache.org/viewvc?rev=1852080&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57974
Re-work code that supports Session.getOpenSessions() to ensure that both 
client-side and server-side calls behave as the EG intended

Added:

tomcat/tc8.5.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
  - copied unchanged from r1852079, 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
Modified:
tomcat/tc8.5.x/trunk/   (props changed)
tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/WsSession.java

tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

tomcat/tc8.5.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/tc8.5.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc8.5.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 24 23:01:49 2019
@@ -1,2 +1,2 @@
 /tomcat/tc8.0.x/trunk:1809644
-/tomcat/trunk:1734785,1734799,1734845,1734928,1735041,1735044,1735480,1735577,1735597,1735599-1735600,1735615,1736145,1736162,1736209,1736280,1736297,1736299,1736489,1736646,1736703,1736836,1736849,1737104-1737105,1737112,1737117,1737119-1737120,1737155,1737157,1737192,1737280,1737339,1737632,1737664,1737715,1737748,1737785,1737834,1737860,1737903,1737959,1738005,1738007,1738014-1738015,1738018,1738022,1738039,1738043,1738059-1738060,1738147,1738149,1738174-1738175,1738261,1738589,1738623-1738625,1738643,1738816,1738850,1738855,1738946-1738948,1738953-1738954,1738979,1738982,1739079-1739081,1739087,1739113,1739153,1739172,1739176,1739191,1739474,1739492,1739726,1739762,1739775,1739814,1739817-1739818,1739975,1740131,1740324,1740465,1740495,1740508-1740509,1740520,1740535,1740707,1740803,1740810,1740969,1740980,1740991,1740997,1741015,1741033,1741036,1741058,1741060,1741080,1741147,1741159,1741164,1741173,1741181,1741190,1741197,1741202,1741208,1741213,1741221,1741225,1741232,1741409
 
,1741501,1741677,1741892,1741896,1741984,1742023,1742042,1742071,1742090,1742093,1742101,1742105,1742111,1742139,1742146,1742148,1742166,1742181,1742184,1742187,1742246,1742248-1742251,1742263-1742264,1742268,1742276,1742369,1742387,1742448,1742509-1742512,1742917,1742919,1742933,1742975-1742976,1742984,1742986,1743019,1743115,1743117,1743124-1743125,1743134,1743425,1743554,1743679,1743696-1743698,1743700-1743701,1744058,1744064-1744065,1744125,1744149,1744194,1744229,1744270,1744323,1744432,1744684,1744697,1744705,1744713,1744760,1744786,1745083,1745142-1745143,1745145,1745177,1745179-1745180,1745227,1745248,1745254,1745337,1745467,1745473,1745535,1745576,1745735,1745744,1746304,1746306-1746307,1746319,1746327,1746338,1746340-1746341,1746344,1746427,1746441,1746473,1746490,1746492,1746495-1746496,1746499-1746501,1746503-1746507,1746509,1746549,1746551,1746554,1746556,1746558,1746584,1746620,1746649,1746724,1746939,1746989,1747014,1747028,1747035,1747210,1747225,1747234,1747253,1747
 
404,1747506,1747536,1747924,1747980,1747993,1748001,1748253,1748452,1748547,1748629,1748676,1748715,1749287,1749296,1749328,1749373,1749465,1749506,1749508,1749665-1749666,1749763,1749865-1749866,1749898,1749978,1749980,1750011,1750015,1750056,1750480,1750617,1750634,1750692,1750697,1750700,1750703,1750707,1750714,1750718,1750723,1750774,1750899,1750975,1750995,1751061,1751097,1751173,1751438,1751447,1751463,1751702,1752212,1752737,1752745,1753078,1753080,1753358,1753363,1754111,1754140-1754141,1754281,1754310,1754445,1754467,1754494,1754496,1754528,1754532-1754533,1754613,1754714,1754874,1754941,1754944,1754950-1754951,1755005,1755007,1755009,1755132,1755180-1755181,1755185,1755190,1755204-1755206,1755208,1755214,1755224,1755227,1755230,1755629,1755646-1755647,1755650,1755653,1755675,1755680,1755683,1755693,1755717,1755731-1755737,1755812,1755828,1755884,1755890,1755918-1755919,1755942,1755958,1755960,1755970,1755993,1756013,1756019,1756039,1756056,1756083-1756114,1756175,1756288-1
 
756289,1756408-1756410,1756778,1756798,1756878,1756898,1756939,1757123-1757124,1757126,1757128,1757132-1757133,1757136,1757145,1757167-1757168,1757175,1757180,1757182,1757195,1757271,1757278,1757347,1757353-1757354,1757363,1757374,1757399,1757406,1757408,1757485,1757495,1757499,1757527,1757578,1757684,1757722,1757727,1757790,1757799,1757813,1757853,1757883,1757903,1757976,1757997,1758000,1758058,1758072-1758075,1758078-1758079,1758223,1758257,1758261,1758276,1758292,1758369,1758378-1758383,1758421,1758423,1758425-1758427,1758430,1758443,1758448,1758459,1758483,1758486-1758487,1758499,1758525,1758556,1758580,1758582,1758584,1758588,1758842,1759019,1759212,1759224,1759227,1759252,1759274,1759513-1759516,1759611,1759757,1759785-1759790,1760005,176002

svn commit: r1852082 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/ java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/ webapps/docs/

2019-01-24 Thread markt
Author: markt
Date: Thu Jan 24 23:11:32 2019
New Revision: 1852082

URL: http://svn.apache.org/viewvc?rev=1852082&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=57974
Re-work code that supports Session.getOpenSessions() to ensure that both 
client-side and server-side calls behave as the EG intended

Added:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
  - copied, changed from r1852080, 
tomcat/tc8.5.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
Modified:
tomcat/tc7.0.x/trunk/   (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsHttpUpgradeHandler.java

tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
--
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jan 24 23:11:32 2019
@@ -1,3 +1,3 @@
 
/tomcat/tc8.0.x/trunk:1636525,1637336,1637685,1637709,1638726,1640089,1640276,1640349,1640363,1640366,1640642,1640672,1640674,1640689,1640884,1641001,1641065,1641067,1641375,1641638,1641723,1641726,1641729-1641730,1641736,1641988,1642669-1642670,1642698,1642701,1643205,1643215,1643217,1643230,1643232,1643273,1643285,1643329-1643330,1643511,1643513,1643521,1643539,1643571,1643581-1643582,1643635,1643655,1643738,1643964,1644018,1644333,1644525,1644954,1644992,1645014,1645360,1645456,1645627,1645642,1645686,1645903-1645904,1645908-1645909,1645913,1645920,1646458,1646460-1646462,1646735,1646738-1646741,1646744,1646746,1646748-1646755,1646757,1646759-1646760,1647043,1648816,1651420-1651422,1651844,1652926,1652939-1652940,1652973,1653798,1653817,1653841,1654042,1654161,1654736,1654767,1654787,1656592,1659907,1662986,1663265,1663278,1663325,1663535,1663567,1663679,1663997,1664175,1664321,1664872,1665061,1665086,1666027,1666395,1666503,1666506,1666560,1666570,1666581,1666759,1666967,1666988
 
,1667553-1667555,1667558,1667617,1667633,1667637,1667747,1667767,1667873,1668028,1668137,1668634,1669432,1669801,1669840,1669895-1669896,1670398,1670435,1670592,1670605-1670607,1670609,1670632,1670720,1670725,1670727,1670731,1671114,1672273,1672285,1673759,1674220,1674295,1675469,1675488,1675595,1675831,1676232,1676367-1676369,1676382,1676394,1676483,1676556,1676635,1678178,1679536,1679988,1680256,1681124,1681182,1681703,1681730,1681840,1681864,1681869,1682010,1682034,1682047,1682052-1682053,1682062,1682064,1682070,1682312,1682325,1682331,1682386,1684367,1684385,1685759,1685774,1685827,1685892,1687341,1688904,1689358,1689657,1689921,1692850,1693093,1693108,1693324,1694060,1694115,1694291,1694427,1694431,1694503,1694549,1694789,1694873,1694881,1695356,1695372,1695823-1695825,1696200,1696281,1696379,1696468,1700608,1700871,1700897,1700978,1701094,1701124,1701608,1701668,1701676,1701766,1701944,1702248,1702252,1702314,1702390,1702723,1702725,1702728,1702730,1702733,1702735,1702737,1702
 
739,1702742,1702744,1702748,1702751,1702754,1702758,1702760,1702763,1702766,1708779,1708782,1708806,1709314,1709670,1710347,1710442,1710448,1710490,1710574,1710578,1712226,1712229,1712235,1712255,1712618,1712649,1712655,1712860,1712899,1712903,1712906,1712913,1712926,1712975,1713185,1713262,1713287,1713613,1713621,1713872,1713976,1713994,1713998,1714004,1714013,1714059,1714538,1714580,1715189,1715207,1715544,1715549,1715637,1715639-1715645,1715667,1715683,1715866,1715978,1715981,1716216-1716217,1716355,1716414,1716421,1717208-1717209,1717257,1717283,1717288,1717291,1717421,1717517,1717529,1718797,1718840-1718843,1719348,1719357-1719358,1719400,1719491,1719737,1720235,1720396,1720442,1720446,1720450,1720463,1720658-1720660,1720756,1720816,1721813,1721818,1721831,1721861,1721867,1721882,1722523,1722527,1722800,1722926,1722941,1722997,1723130,1723440,1723488,1723890,1724434,1724674,1724792,1724803,1724902,1725128,1725131,1725154,1725167,1725911,1725921,1725929,1725963-1725965,1725970,1
 
725974,1726171-1726173,1726175,1726179-1726182,1726190-1726191,1726195-1726200,1726203,1726226,1726576,1726630,1726992,1727029,1727037,1727671,1727676,1727900,1728028,1728092,1728439,1728449,1729186,1729362,1731009,1731303,1731867,1731872,1731874,1731876,1731885,1731947,1731955,1731959,1731977,1731984,1732360,1732490,1732672,1732902,1733166,1733603,1733619,1733735,1733752,1733764,1733915,1733941,1733964,1734115,1734133,1734261,1734421,1734531,1736286,1737967,1738173,1738182,1738992,1739039,1739089-1739091,1739294,1739777,1739821,1739981,1740513,1740726,1741019,1741162,1741217,1743647,1743681,1744152,1744272,1746732,1746750,1752739,1754615,1755886,1756018,1758563,1759565,1761686,1762173,1762206,1766280,1767507-1767508,1767653,1767656,1769267,1772949,1773521,1773527,17741

[Bug 57974] getOpenSessions() bug

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=57974

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #9 from Mark Thomas  ---
Thanks for the report.

Fixed in:
- trunk for 9.0.15 onwards
- 8.5.x for 8.5.38 onwards
- 7.0.x for 7.0.93 onwards

While the path works for the server side, the endpoint instance is still the
right choice for the client side. This necessitated a little refactoring as the
client and server share a session implementation.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in on tomcat-7-trunk

2019-01-24 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-7-trunk while 
building . Full details are available at:
https://ci.apache.org/builders/tomcat-7-trunk/builds/1246

Buildbot URL: https://ci.apache.org/

Buildslave for this Build: silvanus_ubuntu

Build Reason: The AnyBranchScheduler scheduler named 'on-tomcat-7-commit' 
triggered this build
Build Source Stamp: [branch tomcat/tc7.0.x/trunk] 1852082
Blamelist: markt

BUILD FAILED: failed compile_1

Sincerely,
 -The Buildbot




-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-bio (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-bio has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-bio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-BIO
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/logs-BIO]
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-BIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-BIO/logs]



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio (Type: Build)
Work ended in a state of : Failed
Elapsed: 2 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-BIO 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=true -Dtest.reports=output/logs-BIO 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 -Dtest.relaxTiming=true -Dexecute.test.nio=false -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190125.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/p

[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-nio (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-nio has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-nio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-NIO
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/logs-NIO]
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-NIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-NIO/logs]



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-nio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-nio (Type: Build)
Work ended in a state of : Failed
Elapsed: 4 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-NIO 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=false 
-Dtest.reports=output/logs-NIO 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 -Dtest.relaxTiming=true -Dexecute.test.nio=true -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190125.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/

[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-apr (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-apr has an issue affecting its community 
integration.
This issue affects 1 projects,
 and has been outstanding for 2 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-apr :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-APR
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/logs-APR]
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-APR/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-APR/logs]



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-apr/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-apr (Type: Build)
Work ended in a state of : Failed
Elapsed: 5 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-APR 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=true -Dexecute.test.bio=false -Dtest.reports=output/logs-APR 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 
-Dtest.apr.loc=/srv/gump/public/workspace/tomcat-native-1.2-1.0.2/dest-20190125/lib
 -Dtest.relaxTiming=true -Dexecute.test.nio=false -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190125.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.ja

[Bug 49159] Improve ThreadLocal memory leak clean-up

2019-01-24 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=49159

--- Comment #21 from Joker  ---
(In reply to Sylvain Laurent from comment #11)
> Created attachment 26108 [details]
> tc7 renew threads one by one in a bounded time
> 
> New patch with further improvements : now the behavior is more
> deterministic, with an upper bound to the time necessary to renew all the
> threads of the pool. The upper bound is something like
> N*max(threadKeepAliveTimeout, longestRequest + threadRenewalDelay). Where N
> is the number of threads in the pool and longestRequest is the maximum time
> a request takes to be processed (of course it depends on the application).
> This is really a worst case scenario and it should be much quicker in usual
> cases, something closer to max(threadKeepAliveTimeout, longestRequest).
> 
> I still have to make the threadRenewalDelay configurable (hardcoded to 1s
> for now) and to propose some cleanups in WebAppClassLoader since this patch
> makes the unsafe-and-disabled-by-default ThreadLocal cleaning obsolete.
> (it's still interesting to introspect the ThreadLocals to detect potential
> leaks and warn the user, it will help to improve libraries and
> applications...).
> 
> Any volunteer for a review before I continue finalizing this patch ?

now the behavior is more
> deterministic  so does the 'more' means 100%(In reply to Sylvain Laurent from 
> comment #11)
> Created attachment 26108 [details]
> tc7 renew threads one by one in a bounded time
> 
> New patch with further improvements : now the behavior is more
> deterministic, with an upper bound to the time necessary to renew all the
> threads of the pool. The upper bound is something like
> N*max(threadKeepAliveTimeout, longestRequest + threadRenewalDelay). Where N
> is the number of threads in the pool and longestRequest is the maximum time
> a request takes to be processed (of course it depends on the application).
> This is really a worst case scenario and it should be much quicker in usual
> cases, something closer to max(threadKeepAliveTimeout, longestRequest).
> 
> I still have to make the threadRenewalDelay configurable (hardcoded to 1s
> for now) and to propose some cleanups in WebAppClassLoader since this patch
> makes the unsafe-and-disabled-by-default ThreadLocal cleaning obsolete.
> (it's still interesting to introspect the ThreadLocals to detect potential
> leaks and warn the user, it will help to improve libraries and
> applications...).
> 
> Any volunteer for a review before I continue finalizing this patch ?

(In reply to Sylvain Laurent from comment #11)
> Created attachment 26108 [details]
> tc7 renew threads one by one in a bounded time
> 
> New patch with further improvements : now the behavior is more
> deterministic, with an upper bound to the time necessary to renew all the
> threads of the pool. The upper bound is something like
> N*max(threadKeepAliveTimeout, longestRequest + threadRenewalDelay). Where N
> is the number of threads in the pool and longestRequest is the maximum time
> a request takes to be processed (of course it depends on the application).
> This is really a worst case scenario and it should be much quicker in usual
> cases, something closer to max(threadKeepAliveTimeout, longestRequest).
> 
> I still have to make the threadRenewalDelay configurable (hardcoded to 1s
> for now) and to propose some cleanups in WebAppClassLoader since this patch
> makes the unsafe-and-disabled-by-default ThreadLocal cleaning obsolete.
> (it's still interesting to introspect the ThreadLocals to detect potential
> leaks and warn the user, it will help to improve libraries and
> applications...).
> 
> Any volunteer for a review before I continue finalizing this patch ?

'now the behavior is more deterministic'  ,does this 'more' means 100% ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GUMP@vmgump-vm3]: Project tomcat-tc7.0.x-test-bio (in module tomcat-7.0.x) failed

2019-01-24 Thread Bill Barker
To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at gene...@gump.apache.org.

Project tomcat-tc7.0.x-test-bio has an issue affecting its community 
integration.
This issue affects 1 projects.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
- tomcat-tc7.0.x-test-bio :  Tomcat 7.x, a web server implementing Java 
Servlet 3.0,
...


Full details are available at:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were 
provided:
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp-src.jar.
 -DEBUG- Dependency on tomcat-tc7.0.x-dbcp exists, no need to add for property 
tomcat-dbcp.home.
 -INFO- Failed with reason build failed
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/logs-BIO
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/logs-BIO]
 -INFO- Project Reports in: 
/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-BIO/logs
 -WARNING- No directory 
[/srv/gump/public/workspace/tomcat-7.0.x/output/test-tmp-BIO/logs]



The following work was performed:
http://vmgump-vm3.apache.org/tomcat-7.0.x/tomcat-tc7.0.x-test-bio/gump_work/build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio.html
Work Name: build_tomcat-7.0.x_tomcat-tc7.0.x-test-bio (Type: Build)
Work ended in a state of : Failed
Elapsed: 3 secs
Command Line: /usr/lib/jvm/java-8-oracle/bin/java -Djava.awt.headless=true 
-Dbuild.sysclasspath=only -Dsun.zip.disableMemoryMapping=true 
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml 
-Dbase.path=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-build-libs 
-Dcommons-pool.home=/srv/gump/public/workspace/commons-pool-1.x 
-Dtest.temp=output/test-tmp-BIO 
-Djunit.jar=/srv/gump/public/workspace/junit/target/junit-4.13-SNAPSHOT.jar 
-Dobjenesis.jar=/srv/gump/public/workspace/objenesis/main/target/objenesis-3.1-SNAPSHOT.jar
 -Dexamples.sources.skip=true 
-Dcommons-daemon.jar=/srv/gump/public/workspace/apache-commons/daemon/target/commons-daemon-1.1.1-SNAPSHOT.jar
 
-Dtomcat-dbcp-src.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-src.jar
 -Dtomcat-dbcp.home=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps 
-Dtest.exclude=**/TestFlushableGZIPOutputStream.java 
-Dtest.excludePerformance=true 
-Dhamcrest.jar=/srv/gump/packages/hamcrest/hamcrest-core-1.3.j
 ar -Dcommons-dbcp.home=/srv/gump/public/workspace/commons-dbcp-1.x 
-Dexecute.test.apr=false -Dexecute.test.bio=true -Dtest.reports=output/logs-BIO 
-Djdt.jar=/srv/gump/packages/eclipse/plugins/R-4.7.3a-201803300640/ecj-4.7.3a.jar
 -Dtest.relaxTiming=true -Dexecute.test.nio=false -Dtest.accesslog=true 
-Dtomcat-dbcp.jar=/srv/gump/public/workspace/tomcat-7.0.x/tomcat-deps/tomcat-dbcp-20190125.jar
 -Deasymock.jar=/srv/gump/packages/easymock3/easymock-3.6.jar 
-Dcglib.jar=/srv/gump/packages/cglib/cglib-nodep-2.2.jar test 
[Working Directory: /srv/gump/public/workspace/tomcat-7.0.x]
CLASSPATH: 
/usr/lib/jvm/java-8-oracle/lib/tools.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/webapps/examples/WEB-INF/classes:/srv/gump/public/workspace/tomcat-7.0.x/output/testclasses:/srv/gump/public/workspace/ant/dist/lib/ant.jar:/srv/gump/public/workspace/ant/dist/lib/ant-launcher.jar:/srv/gump/public/workspace/ant/dist/lib/ant-jmf.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit.jar:/srv/gump/public/workspace/ant/dist/lib/ant-junit4.jar:/srv/gump/public/workspace/ant/dist/lib/ant-swing.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-resolver.jar:/srv/gump/public/workspace/ant/dist/lib/ant-apache-xalan2.jar:/srv/gump/public/workspace/xml-commons/java/build/resolver.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/bootstrap.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/bin/tomcat-juli.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/annotations-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/servlet-api.ja
 
r:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jsp-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/el-api.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ant.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/tomcat-coyote.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/jasper-el.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-tribes.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/build/lib/catalina-ha.jar:/srv/gump/public/workspace/tomcat-7.0.x/output/bu

svn commit: r1852097 - /tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java

2019-01-24 Thread markt
Author: markt
Date: Fri Jan 25 07:51:30 2019
New Revision: 1852097

URL: http://svn.apache.org/viewvc?rev=1852097&view=rev
Log:
Ensure new test compiles under Java 6

Modified:

tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java

Modified: 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java?rev=1852097&r1=1852096&r2=1852097&view=diff
==
--- 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
 (original)
+++ 
tomcat/tc7.0.x/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainerGetOpenSessions.java
 Fri Jan 25 07:51:30 2019
@@ -355,7 +355,7 @@ public class TestWsWebSocketContainerGet
 
 public static class Tracker {
 
-private static final Map records = new 
ConcurrentHashMap<>();
+private static final Map records = new 
ConcurrentHashMap();
 private static final AtomicInteger updateCount = new AtomicInteger(0);
 
 public static void addRecord(String key, int count) {



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org