jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-672) Deadlock on concurrent save/checkin operations possible
Date Sun, 18 Mar 2007 09:13:09 GMT

    [ https://issues.apache.org/jira/browse/JCR-672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481921
] 

Jukka Zitting commented on JCR-672:
-----------------------------------

> Is there anything a non-Jackrabbit-developer can do to help?

I'm afraid there's relatively little to do. Reporting all known deadlock occurrences with
as much detail as possible would help, but in the end someone needs to bite the bullet and
start rethinking the locking behaviour within jackrabbit-core.

Some people have workarounds that explicitly synchronize all the versioning operations of
concurrent sessions. Documenting such a workaround with example code on the Jackrabbit wiki
would be appreciated, but of course it's still just a workaround.

> Deadlock on concurrent save/checkin operations possible
> -------------------------------------------------------
>
>                 Key: JCR-672
>                 URL: https://issues.apache.org/jira/browse/JCR-672
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: versioning
>            Reporter: Przemo Pakulski
>
> Save and checkin operations are trying to acquire 2 locks in different order, what leads
to deadlock.
> ->save
> 1.SharedItemStateManager.acquireWriteLock
> 2.AbstractVersionManager.acquireWriteLock	->	locked
> ->checkin
> 1.AbstractVersionManager.acquireWriteLock
> 2.SharedItemStateManager.acquireReadLock	->	locked
> "Thread-4" prio=6 tid=0x0312d840 nid=0x824 in Object.wait() [0x03cef000..0x03cefa68]
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x23210968> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock)
> 	at java.lang.Object.wait(Unknown Source)
> 	at EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire(Unknown
Source)
> 	- locked <0x23210968> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock)
> 	at org.apache.jackrabbit.core.version.AbstractVersionManager.acquireWriteLock(AbstractVersionManager.java:124)
> 	at org.apache.jackrabbit.core.version.VersionManagerImpl.setNodeReferences(VersionManagerImpl.java:413)
> 	at org.apache.jackrabbit.core.version.VersionItemStateProvider.setNodeReferences(VersionItemStateProvider.java:125)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:699)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:810)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:313)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:302)
> 	at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:295)
> 	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1204)
> 	- locked <0x2332eaa0> (a org.apache.jackrabbit.core.XASessionImpl)
> 	at JrTestDeadlock.run(JrTestDeadlock.java:87)
> "Thread-3" prio=6 tid=0x0312db18 nid=0xa04 in Object.wait() [0x03caf000..0x03cafae8]
> 	at java.lang.Object.wait(Native Method)
> 	- waiting on <0x232d1360> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$ReaderLock)
> 	at java.lang.Object.wait(Unknown Source)
> 	at EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$ReaderLock.acquire(Unknown
Source)
> 	- locked <0x232d1360> (a EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$ReaderLock)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager.acquireReadLock(SharedItemStateManager.java:1361)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager.hasItemState(SharedItemStateManager.java:270)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.hasItemState(LocalItemStateManager.java:180)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.hasItemState(XAItemStateManager.java:252)
> 	at org.apache.jackrabbit.core.state.SessionItemStateManager.hasItemState(SessionItemStateManager.java:188)
> 	at org.apache.jackrabbit.core.ItemManager.itemExists(ItemManager.java:256)
> 	at org.apache.jackrabbit.core.NodeImpl.hasProperty(NodeImpl.java:1509)
> 	at org.apache.jackrabbit.core.version.InternalFrozenNodeImpl.checkin(InternalFrozenNodeImpl.java:276)
> 	at org.apache.jackrabbit.core.version.InternalFrozenNodeImpl.checkin(InternalFrozenNodeImpl.java:248)
> 	at org.apache.jackrabbit.core.version.InternalVersionHistoryImpl.checkin(InternalVersionHistoryImpl.java:440)
> 	at org.apache.jackrabbit.core.version.AbstractVersionManager.checkin(AbstractVersionManager.java:397)
> 	at org.apache.jackrabbit.core.version.VersionManagerImpl$2.run(VersionManagerImpl.java:289)
> 	at org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced(VersionManagerImpl.java:611)
> 	- locked <0x2320c5d8> (a org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory)
> 	at org.apache.jackrabbit.core.version.VersionManagerImpl.checkin(VersionManagerImpl.java:285)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.checkin(XAVersionManager.java:161)
> 	at org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2944)
> 	at JrTestDeadlock.run(JrTestDeadlock.java:103)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message