jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3226) stateCreated deadlock
Date Tue, 21 Jul 2015 09:23:04 GMT

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

Thomas Mueller commented on JCR-3226:
-------------------------------------

Please note the repository.xml file in the patch needs to be copied to ./target/repository
before running the test. This is needed to disable the cluster config (I couldn't reproduce
the problem with the cluster enabled).

> stateCreated deadlock
> ---------------------
>
>                 Key: JCR-3226
>                 URL: https://issues.apache.org/jira/browse/JCR-3226
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.2, 2.4
>            Reporter: Jukka Zitting
>            Assignee: Thomas Mueller
>              Labels: deadlock
>         Attachments: JCR-3226-test-2.patch, JCR-3226-test.patch
>
>
> In JCR-2650 a potential deadlock in SessionItemStateManager.stateModified() got fixed
by postponing the work to the save() call.
> Unfortunately this still leaves the stateCreated() method vulnerable to a similar (though
much less likely) deadlock scenario (observed in Jackrabbit 2.2.x):
> Thread A:
> 	at org.apache.jackrabbit.core.state.NodeState.copy(NodeState.java:118)
> 	- waiting to lock <0x00007ffec8ddfa18> (a org.apache.jackrabbit.core.state.NodeState)
> 	- locked <0x00007ffec8ddf9d8> (a org.apache.jackrabbit.core.state.NodeState)
> 	at org.apache.jackrabbit.core.state.ItemState.pull(ItemState.java:152)
> 	- locked <0x00007ffec8ddf9d8> (a org.apache.jackrabbit.core.state.NodeState)
> 	at org.apache.jackrabbit.core.state.SessionItemStateManager.stateCreated(SessionItemStateManager.java:791)
> 	at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:94)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.stateCreated(LocalItemStateManager.java:428)
> 	at org.apache.jackrabbit.core.state.StateChangeDispatcher.notifyStateCreated(StateChangeDispatcher.java:94)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager.stateCreated(SharedItemStateManager.java:398)
> 	at org.apache.jackrabbit.core.state.ItemState.notifyStateCreated(ItemState.java:231)
> 	at org.apache.jackrabbit.core.state.ChangeLog.persisted(ChangeLog.java:309)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:777)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:1488)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:351)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.update(XAItemStateManager.java:354)
> 	at org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:326)
> 	at org.apache.jackrabbit.core.state.SessionItemStateManager.update(SessionItemStateManager.java:289)
> 	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:258)
> 	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
> 	at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
> 	at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
> Thread B:
> 	at org.apache.jackrabbit.core.state.NodeState.copy(NodeState.java:119)
> 	- waiting to lock <0x00007ffec8ddf9d8> (a org.apache.jackrabbit.core.state.NodeState)
> 	- locked <0x00007ffec8ddfa18> (a org.apache.jackrabbit.core.state.NodeState)
> 	at org.apache.jackrabbit.core.NodeImpl.makePersistent(NodeImpl.java:869)
> 	- locked <0x00007ffec8ddfa18> (a org.apache.jackrabbit.core.state.NodeState)
> 	at org.apache.jackrabbit.core.ItemSaveOperation.persistTransientItems(ItemSaveOperation.java:836)
> 	at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:243)
> 	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
> 	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:42)
> 	at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
> 	at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:355)
> 	at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:758)
> IIUC this can only occur when two sessions are concurrently importing a node with the
same UUID.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message