jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KÖLL Claus <C.KO...@TIROL.GV.AT>
Subject LockManager Deadlock Problem ...
Date Tue, 13 Aug 2013 08:59:45 GMT
Hi ...

I'm searching at the moment the solution for a deadlock ..
I have already opened a issue https://issues.apache.org/jira/browse/JCR-3605 but i think this
was not the right solution ...

I have a Thread Dump that looks like

3XMTHREADINFO      "RMI TCP Connection(13494)-10.10.128.151" J9VMThread:0x000000000418C600,
j9thread_t:0x0000000015FBB600, java/lang/Thread:0x00000001194CA440, state:B, prio=5
3XMTHREADINFO1            (native thread ID:0x1C88, native priority:0x5, native policy:UNKNOWN)
3XMTHREADBLOCK     Blocked on: org/apache/jackrabbit/core/state/LocalItemStateManager@0x0000000086641A18
Owned by: "jackrabbit-pool-7" (J9VMThread:0x00000000035BF200, java/lang/Thread:0x0000000083FEF008)
3XMTHREADINFO3           Java callstack:
4XESTACKTRACE                at org/apache/jackrabbit/core/state/LocalItemStateManager.getItemState(LocalItemStateManager.java:170(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/SessionItemStateManager.getItemState(SessionItemStateManager.java:161(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/ItemManager.getItemData(ItemManager.java:382(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/ItemManager.getItem(ItemManager.java:328(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/ItemManager.getItem(ItemManager.java:622(Compiled
Code))
5XESTACKTRACE                   (entered lock: org/apache/jackrabbit/core/ItemManager@0x00000000866421D8,
entry count: 1)
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/LockManagerImpl.addLockToken(LockManagerImpl.java:732(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/XALockManager.addLockToken(XALockManager.java:218(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/SessionLockManager.addLockToken(SessionLockManager.java:95(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/SessionImpl.addLockToken(SessionImpl.java:1039(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/jca/JCASessionHandle.addLockToken(JCASessionHandle.java:322(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/rmi/server/ServerSession.addLockToken(ServerSession.java:301(Compiled
Code))
....

The thread hungs because LocalItemStateManager tries to obtain a lock on itself but its already
locked by thread "jackrabbit-pool-7".


3XMTHREADINFO      "jackrabbit-pool-7" J9VMThread:0x00000000035BF200, j9thread_t:0x0000000015EF2630,
java/lang/Thread:0x0000000083FEF008, state:CW, prio=5
3XMTHREADINFO1            (native thread ID:0x3500, native priority:0x5, native policy:UNKNOWN)
3XMTHREADBLOCK     Waiting on: EDU/oswego/cs/dl/util/concurrent/WriterPreferenceReadWriteLock$ReaderLock@0x0000000082C5A7A8
Owned by: <unowned>
3XMTHREADINFO3           Java callstack:
4XESTACKTRACE                at java/lang/Object.wait(Native Method)
4XESTACKTRACE                at java/lang/Object.wait(Object.java:167(Compiled Code))
4XESTACKTRACE                at EDU/oswego/cs/dl/util/concurrent/WriterPreferenceReadWriteLock$ReaderLock.acquire(Bytecode
PC:34(Compiled Code))
5XESTACKTRACE                   (entered lock: EDU/oswego/cs/dl/util/concurrent/WriterPreferenceReadWriteLock$ReaderLock@0x0000000082C5A7A8,
entry count: 1)
4XESTACKTRACE                at org/apache/jackrabbit/core/version/VersioningLock$ReadLock.<init>(VersioningLock.java:73(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/version/VersioningLock$ReadLock.<init>(VersioningLock.java:67(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/version/VersioningLock.acquireReadLock(VersioningLock.java:38(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/version/InternalVersionManagerBase.acquireReadLock(InternalVersionManagerBase.java:203(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/version/InternalVersionManagerImpl.acquireReadLock(InternalVersionManagerImpl.java:71(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/journal/AbstractJournal.lockAndSync(AbstractJournal.java:293(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/journal/DefaultRecordProducer.append(DefaultRecordProducer.java:51(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/cluster/ClusterNode$WorkspaceUpdateChannel.updateCreated(ClusterNode.java:635(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/SharedItemStateManager$Update.begin(SharedItemStateManager.java:573(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/SharedItemStateManager.beginUpdate(SharedItemStateManager.java:1507(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/SharedItemStateManager.update(SharedItemStateManager.java:1537(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/LocalItemStateManager.update(LocalItemStateManager.java:400(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/state/LocalItemStateManager.update(LocalItemStateManager.java:375(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/LockManagerImpl.removeLockProperties(LockManagerImpl.java:950(Compiled
Code))
5XESTACKTRACE                   (entered lock: org/apache/jackrabbit/core/state/LocalItemStateManager@0x0000000086641A18,
entry count: 1)
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/LockManagerImpl.unlock(LockManagerImpl.java:588(Compiled
Code))
4XESTACKTRACE                at org/apache/jackrabbit/core/lock/LockManagerImpl$TimeoutHandlerVisitor.elementVisited(LockManagerImpl.java:189(Compiled
Code))

The problem I think is that LockManagerImpl.writeLockProperties() and removeLockProperties()
uses the ItemStateManager for locking. I think it's no good idea to create
a lock on LocalItemStateManager outside of it self ...

It's a old code .. maybe angela can help here because the code comes from her ...

Thanks for help
claus

I have attached the whole stacktrace ...

Mime
View raw message