We have been getting some crashes in Tomcat 8.5.43 lately.

The environment is:
* JDK 1.8.0_202
* Windows Server 2012 R2

The logs shows a tcnative exception.

Crash Log:
Current thread JavaThread "https-openssl-apr-8081-exec-298" daemon 
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
J 15034  org.apache.tomcat.jni.Socket.sendb(JLjava/nio/ByteBuffer;II)I (0 
bytes) @ 0x0000000002962ddf [0x0000000002962d80+0x5f]
J 29164 C2 
 (242 bytes) @ 0x0000000006d6933c [0x0000000006d68b20+0x81c]
J 27479 C2 org.apache.tomcat.util.net.SocketWrapperBase.flush(Z)Z (20 bytes) @ 
0x00000000053f6144 [0x00000000053f60a0+0xa4]
J 24666 C2 
org.apache.coyote.http2.Http2OutputBuffer.doWrite(Ljava/nio/ByteBuffer;)I (28 
bytes) @ 0x0000000006b51b74 [0x0000000006b51660+0x514]
J 24689 C2 org.apache.catalina.connector.OutputBuffer.writeBytes([BII)V (38 
bytes) @ 0x00000000031c09f8 [0x00000000031c04c0+0x538]
J 27348 C2 org.apache.catalina.connector.CoyoteOutputStream.write([BII)V (26 
bytes) @ 0x00000000071d51a8 [0x00000000071d5120+0x88]

Tomcat logs:
org.apache.coyote.CloseNowException: Connection [214], Stream [279], This 
stream is not writable

I was able to cause a crash in my development environment but I do not think 
that is the same error, I got the same error with version 9.0.24
Sample app[1]
Crash logs:
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.apache.tomcat.jni.Address.get(IJ)J+0
J 4645 C1 
 (1019 bytes) @ 0x00000000024a4774 [0x000000000249f700+0x5074]
j  org.apache.catalina.connector.Request.getRemoteAddr()Ljava/lang/String;+18

Dev environment:
* Tomcat 8.5.43
* Windows Server 2012 R2
* Windows 10.0.18362.295

The keystore was created with:

keytool -genkey -keyalg RSA -alias tomcat -keystore tomcat.jks -storepass 
tomcat -validity 360 -keysize 2048

The HTTPS connector is configured with:

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
              <Certificate certificateKeystoreFile="conf/tomcat.jks" 
certificateKeystorePassword="tomcat" certificateKeyPassword="tomcat"
                         type="RSA" />

I am running the tests with Gatling 3.2.0[3] configured with requestTimeout = 
60 so it causes client disconnections.
Sample test[2]

The issue  could be fixed in the app code but I think that is also a Tomcat bug.
Any tipos or suggestions?

[2][ https://gist.github.com/lalo-mx/0a690290f6aac5017f15a65fc100eaa2]
[3][ https://gatling.io/open-source]

Eduardo Quintanilla
Software Developer

The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. Any 
review, retransmission, dissemination or other use of, or taking of any action 
in reliance upon, this information by persons or entities other than the 
intended recipient is prohibited. If you received this in error, please contact 
the sender and delete the material from any computer.
La información transmitida está destinada únicamente a la persona o entidad a 
quien que va dirigida y puede contener información confidencial y/o material 
privilegiado. Cualquier revisión, retransmisión, difusión u otros usos, o 
cualquier acción tomada por personas o entidades distintas al destinatario 
basándose en esta información está prohibida. Si usted recibe este mensaje por 
error, por favor contacte al remitente y elimine el material de cualquier 

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

Reply via email to