最近有一个应用程序停顿。转储中有一个线程如下所示。这是否意味着该线程中存在死锁?还是这是正常状态?
"DispatchThread: [com.ibm.mq.jmqi.remote.impl.RemoteSession[:/28dd1d5b][connectionId=414D5143424E535341434920202020205DD7618B2D0AD502]]" daemon prio=3 tid=0x0000000008001800 nid=0x56 in Object.wait() [0xfffffc7fde379000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0xfffffc7bc3b048b8> (a com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread$SleepingEventSync)
at com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread.waitOnSleepingEvent(RemoteDispatchThread.java:122)
- locked <0xfffffc7bc3b048b8> (a com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread$SleepingEventSync)
at com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread.sleepPhase(RemoteDispatchThread.java:605)
at com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread.run(RemoteDispatchThread.java:359)
...
at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1227)
Locked ownable synchronizers:
- None
该代码在应用程序使用的MQ JMS驱动程序中。最后两种方法是:
private void sleepPhase() {
if (Trace.isOn) {
Trace.entry(this, "com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread", "sleepPhase()");
}
if (this.flightRecorder.isOn) {
this.flightRecorder.entry("RemoteDispatchThread.sleepPhase");
}
do {
boolean posted;
if (posted = this.noMsgsWait != 0 ? this.waitOnSleepingEvent(this.noMsgsWait) : (this.hconnActive ? this.waitOnSleepingEvent(2000) : this.waitOnSleepingEvent(30000))) {
if (this.flightRecorder.isOn) {
this.flightRecorder.exit("RemoteDispatchThread.sleepPhase (posted)");
}
if (!Trace.isOn) break;
Trace.data(this, "sleepPhase (return (posted))", (Object)null);
break;
}
if (this.noMsgsWait != 0) {
if (this.flightRecorder.isOn) {
this.flightRecorder.exit("RemoteDispatchThread.sleepPhase (noMsgsWait)");
}
if (!Trace.isOn) break;
Trace.data(this, "sleepPhase (return (noMsgsWait))", (Object)null);
break;
}
this.hconn.requestThreadLock();
try {
if (this.savedDispatchSeq != this.dispatchSeq) {
if (Trace.isOn) {
Trace.exit((Object)this, "com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread", "sleepPhase()", 1);
}
return;
}
if (this.hconnActive) continue;
if (this.flightRecorder.isOn) {
this.flightRecorder.exit("RemoteDispatchThread.sleepPhase (hconn inactive)");
}
if (Trace.isOn) {
Trace.data(this, "sleepPhase (hconn inactive)", (Object)null);
}
this.hconn.setDispatchThread(null);
this.exitThread = true;
}
finally {
if (Trace.isOn) {
Trace.finallyBlock(this, "com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread", "sleepPhase()");
}
this.hconn.releaseThreadLock();
continue;
}
break;
} while (true);
if (Trace.isOn) {
Trace.exit((Object)this, "com.ibm.mq.jmqi.remote.impl.RemoteDispatchThread", "sleepPhase()", 2);
}
}
private class SleepingEventSync {
SleepingEventSync() {
if (Trace.isOn) {
Trace.entry(this, "com.ibm.mq.jmqi.remote.impl.SleepingEventSync", "<init>()");
}
if (Trace.isOn) {
Trace.exit(this, "com.ibm.mq.jmqi.remote.impl.SleepingEventSync", "<init>()");
}
}
}
最近进行了MQ升级,我将MQ客户端jar复制到了应用程序中。