tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Adamović <mladen.adamo...@gmail.com>
Subject Re: CPU high usage, the reason org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run
Date Sun, 24 Nov 2019 14:08:36 GMT
Hi Manna,

I didn't copied full stack, it seems most threads are actually in
TaskQueue.poll, see the full thread trace:

Thread 1714: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information
may be imprecise)
 - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long)
@bci=20, line=215 (Compiled frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long)
@bci=78, line=2078 (Compiled frame)
 - java.util.concurrent.LinkedBlockingQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=62, line=467 (Compiled frame)

* - org.apache.tomcat.util.threads.TaskQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=3, line=85 (Compiled frame)* -
org.apache.tomcat.util.threads.TaskQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=3, line=31 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.getTask() @bci=134, line=1066
(Compiled frame)
 -
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker)
@bci=26, line=1127 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617
(Compiled frame)
 - org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run() @bci=4,
line=61 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=745 (Compiled frame)

Thread 1707: (state = BLOCKED)
 - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information
may be imprecise)
 - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object, long)
@bci=20, line=215 (Compiled frame)
 -
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long)
@bci=78, line=2078 (Compiled frame)
 - java.util.concurrent.LinkedBlockingQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=62, line=467 (Compiled frame)
 - org.apache.tomcat.util.threads.TaskQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=3, line=85 (Compiled frame)
 - org.apache.tomcat.util.threads.TaskQueue.poll(long,
java.util.concurrent.TimeUnit) @bci=3, line=31 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor.getTask() @bci=134, line=1066
(Compiled frame)
 -
java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker)
@bci=26, line=1127 (Compiled frame)
 - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=617
(Compiled frame)
 - org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run() @bci=4,
line=61 (Compiled frame)
 - java.lang.Thread.run() @bci=11, line=745 (Compiled frame)


etc. (many more like these)

On Sun, Nov 24, 2019 at 12:13 PM M. Manna <manmedia@gmail.com> wrote:

> I’m suspecting it’s the same issue that we found out for 8.5.45 where the
> commit didn’t get reverted out in Poll.java
>
> Or maybe not.
>
> Thanks,
>
> On Sun, 24 Nov 2019 at 10:36, Mark Thomas <markt@apache.org> wrote:
>
> > Tomcat version?
> >
> > Operating system?
> >
> > Java version?
> >
> > Mark
> >
> >
> > On 24/11/2019 09:57, Mladen Adamović wrote:
> > > I couldn't find the explanation of this in other threads, I've tried to
> > > search the archive.
> > >
> > > I have a high load average on a server and the reason for that is
> kernel
> > > function futex_wait invoked by java thread.
> > >
> > > By doing jstack, I see a lot of BLOCKED threads like these:
> > > Thread 1725: (state = BLOCKED)
> > >  - sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame;
> > information
> > > may be imprecise)
> > >  - java.util.concurrent.locks.LockSupport.parkNanos(java.lang.Object,
> > long)
> > > @bci=20, line=215 (Compiled frame)
> > >  -
> > >
> >
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(long)
> > > @bci=78, line=2078 (Compiled frame)
> > >  - java.util.concurrent.LinkedBlockingQueue.poll(long,
> > > java.util.concurrent.TimeUnit) @bci=62, line=467 (Compiled frame)
> > >  - org.apache.tomcat.util.threads.TaskQueue.poll(long,
> > > java.util.concurrent.TimeUnit) @bci=3, line=85 (Compiled frame)
> > >  - org.apache.tomcat.util.threads.TaskQueue.poll(long,
> > > java.util.concurrent.TimeUnit) @bci=3, line=31 (Compiled frame)
> > >  - java.util.concurrent.ThreadPoolExecutor.getTask() @bci=134,
> line=1066
> > > (Compiled frame)
> > >  -
> > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker)
> > > @bci=26, line=1127 (Compiled frame)
> > >  - java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5,
> line=617
> > > (Compiled frame)
> > >  - org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()
> > @bci=4,
> > > line=61 (Compiled frame)
> > >  - java.lang.Thread.run() @bci=11, line=745 (Compiled frame)
> > >
> > >
> > >
> > > What does this
> > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run()
> actually
> > > does when BLOCKED?
> > >
> > > Should I perhaps lower some tomcat config values or just forget about
> > > measuring system resources if the server works? My tomcat is configured
> > as
> > > follows:
> > >
> > >
> > > my Tomcat is configured as follows:
> > >   <Connector port="8181"
> > > protocol="org.apache.coyote.http11.Http11AprProtocol"
> > >               SSLCertificateFile="/etc/letsencrypt/live/
> > numbeo.com/cert.pem"
> > >               SSLCertificateKeyFile="/etc/letsencrypt/live/
> > > numbeo.com/privkey.pem"
> > >               SSLCertificateChainFile="/etc/letsencrypt/live/
> > > numbeo.com/chain.pem"
> > >               SSLVerifyClient="optional"
> > SSLProtocol="TLSv1+TLSv1.1+TLSv1.2"
> > >               connectionTimeout="20000" acceptCount="30000"
> > >               acceptorThreadCount="2"
> > >               compression="on" maxConnections="50000" maxThreads="500"
> > >
> > >
> >
> compressableMimeType="text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,image/svg+xml,image/svg,image/png,image/jpeg"
> > >
> > >               useSendfile="false"
> > >               maxHttpHeaderSize="16392" SSLEnabled="true"
> > >               enableLookups="false"
> > >               scheme="https" secure="true"   clientAuth="false"
> > >  useBodyEncodingForURI="true"
> > >               URIEncoding="UTF-8"
> > >               />
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message