Java 6 JVM Hang

Apologies for the long post, but I wonder if I can get more eyeballs before I submit a bug report to Sun.

JVM: 6u11
O / S: Windows XP SP3
Hardware: AMD Athlon 64 X2 4600+ @ 2.41GHz, with 3.25 GB of RAM.

I believe that I encountered an error in the JVM where the thread did not point to the monitor. In the following traces, the monitor <0x12a8f9f8> was received by RelayedMessages-0000000001 , which turned out to be pending on it; this thread was subsequently notified. However, despite the fact that all of the topics listed are competing for the monitor, no one gets it.

I promise that the stream dump is completed for each stream that belongs to the monitor <0x12a8f9f8> . The dump was obtained using Java VisualVM three times within 16 hours and was shown as sequential each time (these threads did not change).

Does someone disagree with my assessment that the JVM cannot deliver the monitor to any of the suitable threads, when should it deliver it to one of them?

 "RelayedMessages-0000000001" daemon prio=6 tid=0x03694400 nid=0x1750 waiting for monitor entry [0x05e1f000..0x05e1fc94] java.lang.Thread.State: BLOCKED (on object monitor) at java.lang.Object.wait(Native Method) at com.companyremoved.thd.EzWaiter.ezWait(EzWaiter.java:249) - locked <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.waitWithinMessage(IsolatedObject.java:352) - locked <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.system.coms.ComsSender.waitForAvailablePipe(ComsSender.java:219) at com.companyremoved.system.coms.ComsSender.sendObject(ComsSender.java:185) at com.companyremoved.system.coms.ComsSender.processIocMessage(ComsSender.java:98) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:311) - locked <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.iocMessage(IsolatedObject.java:265) at com.companyremoved.ioc.IocTarget.iocMessage(IocTarget.java:138) at com.companyremoved.ioc.IocBinding.iocMessage(IocBinding.java:105) at com.companyremoved.system.coms.ComsSender$Messages.sendObject(ComsSender.java:333) at com.companyremoved.system.coms.ComsSender$Messages.sendObject(ComsSender.java:316) at com.companyremoved.system.coms.RelayedMessage.run(RelayedMessage.java:104) - locked <0x130fe8e0> (a com.companyremoved.system.coms.RelayedMessage) at com.companyremoved.thd.RunQueue.runEntry(RunQueue.java:293) at com.companyremoved.thd.RunQueue.run(RunQueue.java:273) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None "ScbPipe Writer" daemon prio=6 tid=0x4fff0c00 nid=0xf14 waiting for monitor entry [0x0594f000..0x0594fc14] java.lang.Thread.State: BLOCKED (on object monitor) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:293) - waiting to lock <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.iocMessage(IsolatedObject.java:265) at com.companyremoved.ioc.IocTarget.iocMessage(IocTarget.java:138) at com.companyremoved.coms.stm.ioc.ComsPipe$Receiver.scbPipeDefaultProcessor(ComsPipe.java:403) at com.companyremoved.scb.ScbPipe.processObject(ScbPipe.java:915) - locked <0x131a4ea0> (a java.lang.Object) at com.companyremoved.scb.ScbPipe.writerRun(ScbPipe.java:817) at com.companyremoved.scb.ScbPipe.run(ScbPipe.java:728) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None "ScbPipe Writer" daemon prio=6 tid=0x4c647400 nid=0xe00 waiting for monitor entry [0x059ef000..0x059efb94] java.lang.Thread.State: BLOCKED (on object monitor) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:293) - waiting to lock <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.iocMessage(IsolatedObject.java:265) at com.companyremoved.ioc.IocTarget.iocMessage(IocTarget.java:138) at com.companyremoved.coms.stm.ioc.ComsPipe$Receiver.scbPipeDefaultProcessor(ComsPipe.java:403) at com.companyremoved.scb.ScbPipe.processObject(ScbPipe.java:915) - locked <0x13188bb8> (a java.lang.Object) at com.companyremoved.scb.ScbPipe.writerRun(ScbPipe.java:817) at com.companyremoved.scb.ScbPipe.run(ScbPipe.java:728) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None "ScbPipe Writer" daemon prio=6 tid=0x035f7800 nid=0x1130 waiting for monitor entry [0x0726f000..0x0726fc94] java.lang.Thread.State: BLOCKED (on object monitor) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:293) - waiting to lock <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.iocMessage(IsolatedObject.java:265) at com.companyremoved.ioc.IocTarget.iocMessage(IocTarget.java:138) at com.companyremoved.coms.stm.ioc.ComsPipe$Receiver.scbPipeDefaultProcessor(ComsPipe.java:403) at com.companyremoved.scb.ScbPipe.processObject(ScbPipe.java:915) - locked <0x12a8a478> (a java.lang.Object) at com.companyremoved.scb.ScbPipe.writerRun(ScbPipe.java:817) at com.companyremoved.scb.ScbPipe.run(ScbPipe.java:728) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None "IOC Signals-0000000001" daemon prio=6 tid=0x03673000 nid=0x1434 waiting for monitor entry [0x0415f000..0x0415fd94] java.lang.Thread.State: BLOCKED (on object monitor) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:293) - waiting to lock <0x12a8f9f8> (a com.companyremoved.system.coms.ComsSender) at com.companyremoved.ioc.IsolatedObject.iocMessage(IsolatedObject.java:265) at com.companyremoved.ioc.IocTarget.iocMessage(IocTarget.java:138) at com.companyremoved.ioc.IocBinding.iocMessage(IocBinding.java:105) at com.companyremoved.system.coms.ComsSender$Messages.removePipe(ComsSender.java:302) at com.companyremoved.system.coms.ConnectionController.disconnect(ConnectionController.java:712) at com.companyremoved.system.coms.ConnectionController.shutdown(ConnectionController.java:224) at com.companyremoved.system.coms.ConnectionController.processIocMessage(ConnectionController.java:168) at com.companyremoved.ioc.IsolatedObject.deliver(IsolatedObject.java:311) - locked <0x12a8b798> (a com.companyremoved.system.coms.ConnectionController) at com.companyremoved.ioc.IsolatedObject.access$100(IsolatedObject.java:36) at com.companyremoved.ioc.IsolatedObject$SignalProxy.run(IsolatedObject.java:526) at com.companyremoved.thd.RunQueue.runEntry(RunQueue.java:293) at com.companyremoved.thd.RunQueue.run(RunQueue.java:273) at java.lang.Thread.run(Unknown Source) Locked ownable synchronizers: - None 
+4
source share
2 answers

The presented flow trace is completed relative to the castle in question. The other two people I work with agree that there is a clear JVM error, as are jProfiler (ej-technologies) programmers.

+2
source

Are you sure the RelayedMessages-0000000001 stream will receive a notification? This is normal when other threads are blocked, since the first thread still gets the lock for <0x12a8f9f8>. In order for other threads to obtain a lock, the first thread must be removed from the waiting list and scheduled to restart, and then release the lock it received.

There may be other threads waiting for the same object as the first thread, and when you report that these threads are selected for waking up. If possible, be sure to use notifyAll ().

It may also be possible to release the lock before putting the thread on the wait list or call wait by specifying a timeout value. it doesn't make sense that the thread has been on the waiting list for 16 hours. If you can also post other topics that will also be helpful.

Update:

You are right, I should have taken into account Thread.State. As you commented, it is not in a waiting state since it has been notified. Being on a waitlist is not a reason for not releasing the lock <0x12a8f9f8>. However, it is in a locked state. This means that he is trying to get the lock that he acquired before the object. Wait, but this is not possible. So it seems that there is another thread (not on the list you provided), blocking it.

I think you think that object.wait should have released the lock <0x12a8f9f8>. But object.wait only releases the lock on this object monitor and retains the other locks. And I think lock <0x12a8f9f8> is not a lock for an object monitor (for which a wait is called)

This may not be true, of course, and it can really be a mistake. I'm just trying to find possible reasons.

+1
source

All Articles