You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/08/22 09:42:20 UTC

[jira] [Commented] (OAK-4687) Issue with backgroundOperationLock handling in exception case

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

Chetan Mehrotra commented on OAK-4687:
--------------------------------------

Added ignored test in 1757127

> Issue with backgroundOperationLock handling in exception case
> -------------------------------------------------------------
>
>                 Key: OAK-4687
>                 URL: https://issues.apache.org/jira/browse/OAK-4687
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: documentmk
>            Reporter: Chetan Mehrotra
>            Assignee: Marcel Reutegger
>            Priority: Minor
>             Fix For: 1.6
>
>
> If in a commit some exception occurs then that exception gets hidden due to error in exception handling code path in DocumentNodeStore
> Instead of original exception following exception is seen
> {noformat}
> Caused by: java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:447)
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:431)
> 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340)
> 	at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:883)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore.canceled(DocumentNodeStore.java:767)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:303)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.persist(DocumentNodeStoreBranch.java:268)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch.access$300(DocumentNodeStoreBranch.java:58)
> 	at org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreBranch$InMemory.merge(DocumentNodeStoreBranch.java:513)
> 	... 36 more
> {noformat}
> This happens because the lock is released twice
> # Once in DocumentNodeStore#done
> # Second in DocumentNodeStore#canceled. Invoked in case of failure in DocumentNodeStoreBranch#persist



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