[jbosscache-issues] [JBoss JIRA] (JBCACHE-1620) Race condition when automatically creating parent nodes during locking fails to get lock

Dennis Reed (JIRA) jira-events at lists.jboss.org
Thu Aug 2 17:07:07 EDT 2012


    [ https://issues.jboss.org/browse/JBCACHE-1620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709582#comment-12709582 ] 

Dennis Reed commented on JBCACHE-1620:
--------------------------------------

After PessimisticNodeBasedLockManager calls PessimisticUnversionedNode#addChildAndAcquireLock, it now verifies it owns the lock (and therefore created the node) instead of just assuming it does.

                
> Race condition when automatically creating parent nodes during locking fails to get lock
> ----------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-1620
>                 URL: https://issues.jboss.org/browse/JBCACHE-1620
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Locking
>    Affects Versions: 3.2.9.GA
>            Reporter: Dennis Reed
>            Assignee: Dennis Reed
>
> Bug/race condition in PessimisticUnversionedNode#addChildAndAcquireLock.
> If two threads try to create the same node at the exact same time, one thread creates it and gets a write lock.  
> The other thread does not create a node, but returns the previously created node and does not lock it.
> The only caller PessimisticNodeBasedLockManager assumes the node was both created and locked after the call returns.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosscache-issues mailing list