jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (Assigned) (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (JCR-3226) stateCreated deadlock
Date Fri, 02 Mar 2012 16:05:56 GMT

     [ https://issues.apache.org/jira/browse/JCR-3226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jukka Zitting reassigned JCR-3226:
----------------------------------

    Assignee: Jukka Zitting
    
> 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: Jukka Zitting
>              Labels: deadlock
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message