jStack 的输出
Output of jStack
我们在 windows 机器上使用 Adobe AEM。
我们的 Author 实例变得非常慢,为了调查同样的情况,我们尝试使用以下命令进行线程转储
jstack.exe pid > 输出文件
问题是这个命令的输出总是不一样。
下面是获得的两个不同的输出。
这个几乎没有给出任何关于哪个线程被阻塞的信息
Deadlock Detection:
No deadlocks found.
Thread 636: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=503 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.TopicRoundRobinJobQueue.take() @bci=32, line=98 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue() @bci=14, line=454 (Compiled frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=10=]0(org.apache.sling.event.impl.jobs.queues.AbstractJobQueue) @bci=1, line=50 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run() @bci=56, line=137 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 635: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 634: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 633: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
下面是第二个输出
2015-03-12 11:53:07
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode):
"Thread-49205" daemon prio=6 tid=0x000000002cc69000 nid=0x1c48 in Object.wait() [0x000000004925f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49203" daemon prio=6 tid=0x000000002cc69800 nid=0x1f90 in Object.wait() [0x0000000048e5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49202" daemon prio=6 tid=0x000000002cc6c000 nid=0x9c0 waiting for monitor entry [0x000000004835f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49200" daemon prio=6 tid=0x000000002cc6d800 nid=0x1a34 in Object.wait() [0x0000000048d5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49168" daemon prio=6 tid=0x000000002cc67800 nid=0x1ca0 in Object.wait() [0x000000004ac5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49166" daemon prio=6 tid=0x000000002cc6c800 nid=0x1ed0 waiting for monitor entry [0x000000004965f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49121" daemon prio=6 tid=0x000000002cc6f000 nid=0x19f8 waiting for monitor entry [0x000000004935f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49111" daemon prio=6 tid=0x000000002cc6b000 nid=0x21d8 waiting for monitor entry [0x0000000048f5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49109" daemon prio=6 tid=0x000000002cc6a800 nid=0x18ac waiting for monitor entry [0x000000004875f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-48974" daemon prio=6 tid=0x000000002cc68000 nid=0x1f84 in Object.wait() [0x000000004945e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(Unknown Source)
- locked <0x0000000613135e20> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock)
at org.apache.jackrabbit.core.journal.AbstractJournal.internalLockAndSync(AbstractJournal.java:295)
at org.apache.jackrabbit.core.journal.AbstractJournal.lockAndSync(AbstractJournal.java:284)
at org.apache.jackrabbit.core.journal.DefaultRecordProducer.append(DefaultRecordProducer.java:51)
at org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updateCreated(ClusterNode.java:599)
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:565)
at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1462)
at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1492)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:400)
at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:375)
at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:275)
at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:64)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)
at com.day.crx.core.CRXSessionImpl.save(CRXSessionImpl.java:131)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:215)
- locked <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue CQ Workflows" daemon prio=6 tid=0x000000002cc6e000 nid=0x1db8 waiting for monitor entry [0x0000000048b5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.AbstractParallelJobQueue.start(AbstractParallelJobQueue.java:64)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue CQ Workflows" daemon prio=6 tid=0x000000002cc66000 nid=0x1b50 in Object.wait() [0x000000004ab5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.TopicRoundRobinJobQueue.take(TopicRoundRobinJobQueue.java:98)
- locked <0x000000066bdaf770> (a java.util.HashMap)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:454)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush8" daemon prio=6 tid=0x0000000020dc5000 nid=0x2070 in Object.wait() [0x000000004aa5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab02158> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush7" daemon prio=6 tid=0x0000000020dc6800 nid=0x15d0 waiting for monitor entry [0x000000004a15f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab004d8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush6" daemon prio=6 tid=0x0000000020dbb800 nid=0x1414 waiting for monitor entry [0x000000004a05f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab00218> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush5" daemon prio=6 tid=0x0000000020dcc800 nid=0x1d18 in Object.wait() [0x0000000049f5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066aafff58> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush4" daemon prio=6 tid=0x0000000020db8000 nid=0x1230 in Object.wait() [0x0000000049e5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab44ea8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush3" daemon prio=6 tid=0x0000000020dc2000 nid=0x1b6c waiting for monitor entry [0x0000000049d5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab451a8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush2" daemon prio=6 tid=0x0000000020db6800 nid=0x1fb0 in Object.wait() [0x0000000049c5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab01828> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush12" daemon prio=6 tid=0x0000000020dc0000 nid=0x1594 waiting for monitor entry [0x0000000049b5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab01568> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
想了解为什么会有 2 个不同的输出。
此外,第二个输出在线程转储分析器等工具中给出了非常描述性的摘要。
您观察到的差异是 normal 和 forced jstack 格式之间的差异。至少在使用 HotSpot 的 jstack
实现时,强制 format 需要通过 -F
选项明确请求。它用于由于应用程序没有响应而无法获取 normal threaddump 的情况。 forced模式使用不同的机制获取至少一些数据,因此它遗漏了很多重要信息。
如果我对问题的理解正确,那么特定的 jstack
实现会自动选择输出格式,大概是基于应用程序在给定时刻的响应能力。如果可以关闭此功能或使用其他方法获取线程转储,请参阅文档。
我们在 windows 机器上使用 Adobe AEM。 我们的 Author 实例变得非常慢,为了调查同样的情况,我们尝试使用以下命令进行线程转储 jstack.exe pid > 输出文件
问题是这个命令的输出总是不一样。 下面是获得的两个不同的输出。
这个几乎没有给出任何关于哪个线程被阻塞的信息
Deadlock Detection:
No deadlocks found.
Thread 636: (state = BLOCKED)
- java.lang.Object.wait(long) @bci=0 (Compiled frame; information may be imprecise)
- java.lang.Object.wait() @bci=2, line=503 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.TopicRoundRobinJobQueue.take() @bci=32, line=98 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue() @bci=14, line=454 (Compiled frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=10=]0(org.apache.sling.event.impl.jobs.queues.AbstractJobQueue) @bci=1, line=50 (Interpreted frame)
- org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run() @bci=56, line=137 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 635: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 634: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
Thread 633: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=186 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await() @bci=42, line=2043 (Compiled frame)
- java.util.concurrent.LinkedBlockingQueue.take() @bci=29, line=442 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.getTask() @bci=156, line=1068 (Compiled frame)
- java.util.concurrent.ThreadPoolExecutor.runWorker(java.util.concurrent.ThreadPoolExecutor$Worker) @bci=26, line=1130 (Interpreted frame)
- java.util.concurrent.ThreadPoolExecutor$Worker.run() @bci=5, line=615 (Interpreted frame)
- java.lang.Thread.run() @bci=11, line=722 (Interpreted frame)
下面是第二个输出
2015-03-12 11:53:07
Full thread dump Java HotSpot(TM) 64-Bit Server VM (23.7-b01 mixed mode):
"Thread-49205" daemon prio=6 tid=0x000000002cc69000 nid=0x1c48 in Object.wait() [0x000000004925f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49203" daemon prio=6 tid=0x000000002cc69800 nid=0x1f90 in Object.wait() [0x0000000048e5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49202" daemon prio=6 tid=0x000000002cc6c000 nid=0x9c0 waiting for monitor entry [0x000000004835f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49200" daemon prio=6 tid=0x000000002cc6d800 nid=0x1a34 in Object.wait() [0x0000000048d5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49168" daemon prio=6 tid=0x000000002cc67800 nid=0x1ca0 in Object.wait() [0x000000004ac5f000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at EDU.oswego.cs.dl.util.concurrent.LinkedQueue.poll(Unknown Source)
- locked <0x000000061148ca10> (a java.lang.Object)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor.getTask(Unknown Source)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49166" daemon prio=6 tid=0x000000002cc6c800 nid=0x1ed0 waiting for monitor entry [0x000000004965f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49121" daemon prio=6 tid=0x000000002cc6f000 nid=0x19f8 waiting for monitor entry [0x000000004935f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49111" daemon prio=6 tid=0x000000002cc6b000 nid=0x21d8 waiting for monitor entry [0x0000000048f5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-49109" daemon prio=6 tid=0x000000002cc6a800 nid=0x18ac waiting for monitor entry [0x000000004875f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:208)
- waiting to lock <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Thread-48974" daemon prio=6 tid=0x000000002cc68000 nid=0x1f84 in Object.wait() [0x000000004945e000]
java.lang.Thread.State: BLOCKED (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(Unknown Source)
- locked <0x0000000613135e20> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock)
at org.apache.jackrabbit.core.journal.AbstractJournal.internalLockAndSync(AbstractJournal.java:295)
at org.apache.jackrabbit.core.journal.AbstractJournal.lockAndSync(AbstractJournal.java:284)
at org.apache.jackrabbit.core.journal.DefaultRecordProducer.append(DefaultRecordProducer.java:51)
at org.apache.jackrabbit.core.cluster.ClusterNode$WorkspaceUpdateChannel.updateCreated(ClusterNode.java:599)
at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.begin(SharedItemStateManager.java:565)
at org.apache.jackrabbit.core.state.SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1462)
at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1492)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:400)
at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:375)
at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:275)
at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:64)
at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)
at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:812)
at com.day.crx.core.CRXSessionImpl.save(CRXSessionImpl.java:131)
at com.day.cq.audit.impl.DefaultAuditLog.internalAdd(DefaultAuditLog.java:215)
- locked <0x0000000625c66710> (a com.day.cq.audit.impl.DefaultAuditLog)
at com.day.cq.audit.impl.DefaultAuditLog.add(DefaultAuditLog.java:203)
at com.day.cq.wcm.core.impl.event.PageEventAuditListener.handleEvent(PageEventAuditListener.java:91)
at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:315)
at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:117)
at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:109)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue CQ Workflows" daemon prio=6 tid=0x000000002cc6e000 nid=0x1db8 waiting for monitor entry [0x0000000048b5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.AbstractParallelJobQueue.start(AbstractParallelJobQueue.java:64)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue CQ Workflows" daemon prio=6 tid=0x000000002cc66000 nid=0x1b50 in Object.wait() [0x000000004ab5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.TopicRoundRobinJobQueue.take(TopicRoundRobinJobQueue.java:98)
- locked <0x000000066bdaf770> (a java.util.HashMap)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:454)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush8" daemon prio=6 tid=0x0000000020dc5000 nid=0x2070 in Object.wait() [0x000000004aa5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab02158> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush7" daemon prio=6 tid=0x0000000020dc6800 nid=0x15d0 waiting for monitor entry [0x000000004a15f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab004d8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush6" daemon prio=6 tid=0x0000000020dbb800 nid=0x1414 waiting for monitor entry [0x000000004a05f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab00218> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush5" daemon prio=6 tid=0x0000000020dcc800 nid=0x1d18 in Object.wait() [0x0000000049f5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066aafff58> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush4" daemon prio=6 tid=0x0000000020db8000 nid=0x1230 in Object.wait() [0x0000000049e5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab44ea8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush3" daemon prio=6 tid=0x0000000020dc2000 nid=0x1b6c waiting for monitor entry [0x0000000049d5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab451a8> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush2" daemon prio=6 tid=0x0000000020db6800 nid=0x1fb0 in Object.wait() [0x0000000049c5f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:503)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:72)
- locked <0x000000066ab01828> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
"Apache Sling Job Queue com/day/cq/replication/job/flush12" daemon prio=6 tid=0x0000000020dc0000 nid=0x1594 waiting for monitor entry [0x0000000049b5f000]
java.lang.Thread.State: BLOCKED (on object monitor)
at org.apache.sling.event.impl.jobs.jcr.PersistenceHandler.lock(PersistenceHandler.java:1080)
- waiting to lock <0x0000000613341df0> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.jcr.JCRJobEvent.lock(JCRJobEvent.java:39)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.executeJob(AbstractJobQueue.java:473)
at org.apache.sling.event.impl.jobs.queues.OrderedJobQueue.start(OrderedJobQueue.java:67)
- locked <0x000000066ab01568> (a java.lang.Object)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.runJobQueue(AbstractJobQueue.java:461)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.access[=11=]0(AbstractJobQueue.java:50)
at org.apache.sling.event.impl.jobs.queues.AbstractJobQueue.run(AbstractJobQueue.java:137)
at java.lang.Thread.run(Thread.java:722)
想了解为什么会有 2 个不同的输出。 此外,第二个输出在线程转储分析器等工具中给出了非常描述性的摘要。
您观察到的差异是 normal 和 forced jstack 格式之间的差异。至少在使用 HotSpot 的 jstack
实现时,强制 format 需要通过 -F
选项明确请求。它用于由于应用程序没有响应而无法获取 normal threaddump 的情况。 forced模式使用不同的机制获取至少一些数据,因此它遗漏了很多重要信息。
如果我对问题的理解正确,那么特定的 jstack
实现会自动选择输出格式,大概是基于应用程序在给定时刻的响应能力。如果可以关闭此功能或使用其他方法获取线程转储,请参阅文档。