Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: understanding stack trace

Re: understanding stack trace

From: Laurenz Albe <invite_at_spam.to.invalid>
Date: 12 Dec 2006 08:56:15 GMT
Message-ID: <1165913768.581949@proxy.dienste.wien.at>


hopehope_123 <hopehope_123_at_yahoo.com> wrote:
> I use oc4j components , sometimes the java process eats all the cpu
> power and all web services returns error. During one of these times , i
> get the full stack trace. The majority of the threads are i runnable
> state , and the below threads are on waiting state.

Do I understand you right that the threads you posted below are NOT all the threads, but only the ones in waiting state? A thread that is in sleep() or wait() does not consume any CPU.

The thread that is in SocketRead0() is probably blocked too, waiting for input to come on a socket - in that case it will also not consume any CPU.

> How can i understand this stacek trace? Who waits who? Why does the
> process consume all the cpu?

For the first two questions you will have to ask the programmer who wrote the thing.
You could use a profiler which can tell you how much time is spent in which method. But if the problem only occurs occasionally, it will be difficult to trace.

Yours,
Laurenz Albe

> "ApplicationServerThread-105" prio=5 tid=0x008a39e0 nid=0x79 in
> Object.wait() [d77ff000..d77ffc30]
> at java.lang.Object.wait(Native Method)
> - waiting on <0xe7750ed8> (a
> EDU.oswego.cs.dl.util.concurrent.LinkedNode)
>
>
> "ApplicationServerThread-104" prio=5 tid=0x0084b100 nid=0x78 in
> Object.wait() [d78ff000..d78ffc30]
> at java.lang.Object.wait(Native Method)
> - waiting on <0xe6a4b000> (a
> EDU.oswego.cs.dl.util.concurrent.LinkedNode)
>
>
> "ApplicationServerThread-102" prio=5 tid=0x005e3370 nid=0x76 in
> Object.wait() [d7aff000..d7affc30]
> at java.lang.Object.wait(Native Method)
> - waiting on <0xecbe2b78> (a
> EDU.oswego.cs.dl.util.concurrent.LinkedNode)
>
>
> "OracleTimeoutPollingThread" daemon prio=10 tid=0x00819888 nid=0x3d
> waiting on condition [dadff000..dadffc30]
> at java.lang.Thread.sleep(Native Method)
>
>
> "SocketTimeout" daemon prio=10 tid=0x0023ca38 nid=0x1c waiting on
> condition [dceff000..dceffc30]
> at java.lang.Thread.sleep(Native Method)
>
>
> "DestroyJavaVM" prio=5 tid=0x00036b48 nid=0x1 waiting on condition
> [0..ffbfebe8]
>
> "OC4J Monitor Thread" daemon prio=5 tid=0x006a2ff0 nid=0x12 in
> Object.wait() [dd7ff000..dd7ffc30]
> at java.lang.Object.wait(Native Method)
> - waiting on <0xe3769430> (a java.lang.Object)
>
>
> "Thread-5" daemon prio=5 tid=0x006a08f8 nid=0x11 in Object.wait()
> [dd8ff000..dd8ffc30]
> at java.lang.Object.wait(Native Method)
> - waiting on <0xe3769518> (a java.lang.Object)
> at oracle.ons.SenderThread.run(SenderThread.java:81)
>
>
> "Thread-4" daemon prio=5 tid=0x006a1b78 nid=0x10 runnable
> [dd9ff000..dd9ffc30]
> at java.net.SocketInputStream.socketRead0(Native Method)
>
>
> "TaskManager" prio=5 tid=0x006a2518 nid=0xf waiting on condition
> [ddaff000..ddaffc30]
> at java.lang.Thread.sleep(Native Method)
Received on Tue Dec 12 2006 - 02:56:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US