You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Balthaus <c_...@gmx.net> on 2011/01/26 18:05:26 UTC

java-process blocks cpu core to 100%

Hello!

We are running
tomcat6 - Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API
6.0.18-20.3.1
on Suse Linux Enterprise 11
JVM is java-1_6_0-ibm - Java(TM) 6 Runtime Environment  1.6.0_sr7.0-1.6.21
cpu is a quad core cpu with ht (xeon 5500)

The problem is that directly after startup, the java process blocks 1 core
to 100% (seen by 'top').
There are no additional webapps deployed, not even the manager application.

I'm using apache2 2.2.10-2.24.5 with mod_proxy and mod_proxy_ajp, not sure
if I'm also using APR.

Connected by eclipse I discovered the following:
when I suspend thread by thread, the load dropped when I suspend *
"Daemon Thread [Attach handler] (Suspended)".*


... [Remote Java Application]
    IBM J9 VM[localhost:19999]
        Thread [main] (Suspended)
        Daemon Thread [Signal Dispatcher] (Suspended)
   *     Daemon Thread [Attach handler] (Suspended)    *
            AttachHandler.
setlastException(Exception) line: 449
            AttachHandler.run() line: 165
        Daemon Thread
[ContainerBackgroundProcessor[StandardEngine[Catalina]]] (Suspended)
        Daemon Thread [TP-Processor1] (Suspended)
        Daemon Thread [TP-Processor2] (Suspended)
        Daemon Thread [TP-Processor3] (Suspended)
        Daemon Thread [TP-Processor4] (Suspended)
        Daemon Thread [TP-Monitor] (Suspended)
        Daemon Thread [TP-Processor1] (Suspended)
        Daemon Thread [TP-Processor2] (Suspended)
        Daemon Thread [TP-Processor3] (Suspended)
        Daemon Thread [TP-Processor4] (Suspended)
        Daemon Thread [TP-Monitor] (Suspended)


The in the context of that thread I discovered that there occured an
exception:

Context @AttachHandler.setlastException(Exception) line: 449

this    AttachHandler  (id=1972)
lastException    IOException  (id=1803)
    cause    IOException  (id=1803)
        cause    IOException  (id=1803)
        detailMessage    "wait error on semaphore _notifier status = -151"
(id=1870)
        stackTrace    null
        walkback     (id=1876)
    detailMessage    "wait error on semaphore _notifier status = -151"
(id=1870)
    stackTrace    null
    walkback     (id=1876)



What can I do?

Your help is appreciated ;)

greetings,
Chris

Re: java-process blocks cpu core to 100%

Posted by Pid * <pi...@pidster.com>.
On 28 Jan 2011, at 14:32, Christopher Schultz
<ch...@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> On 1/28/2011 9:16 AM, Christoph Balthaus wrote:
>> Sorry, not possible - it's running on a remote machine where I can just use
>> the ibm package and in theirs JDK jstack is not included.
>> Are there any other ways to get it via network?
>
> You could use JConsole remotely, but you need to have remote JMX
> configured for the JVM which would probably require a JVM restart.

Does this JRE support the Attach API? if so it's possible to enable
JMX for remote access dynamically.


p

> You
> can also send the process the SIGQUIT and it will emit a thread dump to
> stdout. If you don't have shell access, that might be difficult, too.
>
> This might be a good time to start testing a new Tomcat release for your
> environment: 6.0.18 is more than 2 years old and many performance and
> security fixes have gone into Tomcat since then. Warning: the NIO
> connector appears to be broken in 6.0.30 and looks like it will be in
> 6.0.31. Consider using 6.0.29 or waiting for 6.0.32 if you are using the
> NIO connector.
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1C01wACgkQ9CaO5/Lv0PDSNgCgwGMWTsJWrnY8KKeupYK6aif2
> adQAoK4e+Vj1hscTXP8Xt2jewD/bLr2p
> =/PRp
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

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


Re: java-process blocks cpu core to 100%

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chuck,

On 1/28/2011 10:34 AM, Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
>> Subject: Re: java-process blocks cpu core to 100%
> 
>> Warning: the NIO connector appears to be broken in 6.0.30 
>> and looks like it will be in 6.0.31.
> 
> Clarification: the NIO connector is quite usable in 6.0.31, but will
> likely produce numerous spurious log entries; 6.0.32 should get rid of
> those.

Thanks for the clarification: I hadn't read Konstantin's comments on the
subject until after I wrote my reply.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1DHggACgkQ9CaO5/Lv0PAa1wCglsfJVrTpXU/oE8tKrxbzYNtf
Qy4AnAgWfs9Xhgr1Ol/c6sy/wdK34nNO
=ItQn
-----END PGP SIGNATURE-----

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


RE: java-process blocks cpu core to 100%

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Christopher Schultz [mailto:chris@christopherschultz.net] 
> Subject: Re: java-process blocks cpu core to 100%

> Warning: the NIO connector appears to be broken in 6.0.30 
> and looks like it will be in 6.0.31.

Clarification: the NIO connector is quite usable in 6.0.31, but will likely produce numerous spurious log entries; 6.0.32 should get rid of those.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.



Re: java-process blocks cpu core to 100%

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 1/28/2011 9:16 AM, Christoph Balthaus wrote:
> Sorry, not possible - it's running on a remote machine where I can just use
> the ibm package and in theirs JDK jstack is not included.
> Are there any other ways to get it via network?

You could use JConsole remotely, but you need to have remote JMX
configured for the JVM which would probably require a JVM restart. You
can also send the process the SIGQUIT and it will emit a thread dump to
stdout. If you don't have shell access, that might be difficult, too.

This might be a good time to start testing a new Tomcat release for your
environment: 6.0.18 is more than 2 years old and many performance and
security fixes have gone into Tomcat since then. Warning: the NIO
connector appears to be broken in 6.0.30 and looks like it will be in
6.0.31. Consider using 6.0.29 or waiting for 6.0.32 if you are using the
NIO connector.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1C01wACgkQ9CaO5/Lv0PDSNgCgwGMWTsJWrnY8KKeupYK6aif2
adQAoK4e+Vj1hscTXP8Xt2jewD/bLr2p
=/PRp
-----END PGP SIGNATURE-----

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


Re: java-process blocks cpu core to 100%

Posted by Christoph Balthaus <c_...@gmx.net>.
Sorry, not possible - it's running on a remote machine where I can just use
the ibm package and in theirs JDK jstack is not included.
Are there any other ways to get it via network?


2011/1/27 Christopher Schultz <ch...@christopherschultz.net>

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> On 1/26/2011 12:05 PM, Christoph Balthaus wrote:
> > Connected by eclipse I discovered the following:
> > when I suspend thread by thread, the load dropped when I suspend *
> > "Daemon Thread [Attach handler] (Suspended)".*
> >
> >
> > ... [Remote Java Application]
> >     IBM J9 VM[localhost:19999]
> >         Thread [main] (Suspended)
> >         Daemon Thread [Signal Dispatcher] (Suspended)
> >    *     Daemon Thread [Attach handler] (Suspended)    *
> >             AttachHandler.
> > setlastException(Exception) line: 449
> >             AttachHandler.run() line: 165
>
> Can you run jstack against this process instead of Eclipse's tool? Paste
> the entire trace unless it contains some sensitive information.
>
> Thanks,
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk1ArVkACgkQ9CaO5/Lv0PBY9QCdH1DoF2KTSQUN0dDZa5cJEK52
> TC0AnjH1bsH8fa1n3bJeLeKLJ+km2cCA
> =wEUc
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: java-process blocks cpu core to 100%

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

On 1/26/2011 12:05 PM, Christoph Balthaus wrote:
> Connected by eclipse I discovered the following:
> when I suspend thread by thread, the load dropped when I suspend *
> "Daemon Thread [Attach handler] (Suspended)".*
> 
> 
> ... [Remote Java Application]
>     IBM J9 VM[localhost:19999]
>         Thread [main] (Suspended)
>         Daemon Thread [Signal Dispatcher] (Suspended)
>    *     Daemon Thread [Attach handler] (Suspended)    *
>             AttachHandler.
> setlastException(Exception) line: 449
>             AttachHandler.run() line: 165

Can you run jstack against this process instead of Eclipse's tool? Paste
the entire trace unless it contains some sensitive information.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1ArVkACgkQ9CaO5/Lv0PBY9QCdH1DoF2KTSQUN0dDZa5cJEK52
TC0AnjH1bsH8fa1n3bJeLeKLJ+km2cCA
=wEUc
-----END PGP SIGNATURE-----

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