On 06/04/18 22:10, dharmon wrote:
> environment:
> tomcat 8.5.23
> CentOS 6.9
> jdk8u162 b12
> 
> I recently upgraded from tomcat 7.0.61/jdk8u92 to tomcat 8.5.23/jdk8u162.
> Our application war file on tomcat7 has cpu >75% idle per vmstat several
> hours after tomcat start. Same war file on same server with tomcat8.5.23 has
> cpu 0% idle per vmstat several hours after restart. Same server with similar
> request load. Server has 4 CPUs. War file processes https REST web service
> requests.  
> 
> I used jvisualvm to perform CPU profiling and the method with most self time
> is org.apache.tomcat.util.buf.Utf8Decoder.decodeHasArray. jstack shows there
> are 12 https-jsse-nio-8443-exec-### threads always in runnable state[1].
> They have been in this state for several hours. It appears as if it's stuck
> in infinite loop. Using the thread's nid and lsof, I believe the tcp/https
> connection associated with these threads are no longer
> connected/established.
> 
> Any known issues that could be causing this problem? I also tried using the
> NIO2 connector with same issue.

None I am aware of. I wouldn't expect the connector to make any difference.

> I'm on a closed network, thus unable to show jvisualvm screen shots or
> verbose stack traces.
I've taken a good look at the relevant code and nothing immediately
jumps out as a potential cause of this.

It sounds as if this is fairly easy to reproduce so I would suggest
configuring your Tomcat instance to support remote debugging and when it
happens again step through the relevant code to see why /exactly where
it is looping. The aim is to provide us with enough information to
ideally reproduce it but - as a minimum - provide an explanation that
can be used to support a change to fix it.

Mark


> 
> 
> [1] 
> java.lang.Thread.State: RUNNABLE
> at
> org.apache.tomcat.util.buf.Utf8Decoder.decodeHasArray(Utf8Decoder.java:159)
> at org.apache.tomcat.util.buf.Utf8Decoder.decodeLoop(Utf8Decoder.java:78)
> at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:579)
> at org.apache.tomcat.util.buf.B2CConverter.convert(B2CConverter.java:273)
> at
> org.apache.catalina.connector.InputBuffer.realReadChars(InputBuffer.java:426)
> at
> org.apache.catalina.connector.InputBuffer.checkCharBufferEof(InputBuffer.java:652)
> at org.apache.catalina.connector.InputBuffer.read(InputBuffer.java:468)
> at org.apache.catalina.connector.CoyoteReader.read(CoyoteReader.java:101)
> <groovy classes>
> <my application code with is attempting to read http request>
> 
> 
> 
> 
> 
> 
> --
> Sent from: http://tomcat.10.x6.nabble.com/Tomcat-User-f1968778.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


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

Reply via email to