You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Przemo Pakulski (JIRA)" <ji...@apache.org> on 2008/03/07 14:17:46 UTC

[jira] Created: (JCR-1461) Deadlock on concurrent commit/checkin operations

Deadlock on concurrent commit/checkin operations
------------------------------------------------

                 Key: JCR-1461
                 URL: https://issues.apache.org/jira/browse/JCR-1461
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 1.3.3, 1.3.4
            Reporter: Przemo Pakulski


Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578720#action_12578720 ] 

Marcel Reutegger commented on JCR-1461:
---------------------------------------

> would there be a need to get the path within the locked region?

according to dominique pfister this is not needed. based on his statement I've moved the call further up, outside the locked region.

Feel free to commit the patch or let me know if I should do it.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4
>
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578663#action_12578663 ] 

Marcel Reutegger commented on JCR-1461:
---------------------------------------

I thought there was another thread holding the write lock on the SISM of the version manager, but it is in fact the grinder thread 1. The  So, you're right those are the only two threads than can be involved.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Updated: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting updated JCR-1461:
-------------------------------

    Affects Version/s:     (was: 1.3.4)
        Fix Version/s: 1.3.4

The patch seems correct enough to me (would there be a need to get the path within the locked region?), so I'd like to commit it to trunk and the 1.3 branch for proceeding with a 1.3.4 release candidate.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4
>
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12576936#action_12576936 ] 

Marcel Reutegger commented on JCR-1461:
---------------------------------------

Can you please provide a test case?

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>         Attachments: thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12577929#action_12577929 ] 

Przemo Pakulski commented on JCR-1461:
--------------------------------------

Hm, deadlock occured when running 2 threads only. How do you know that another thread was involved ?

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Resolved: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-1461.
--------------------------------

       Resolution: Fixed
    Fix Version/s: core 1.4.2

Patch applied in revision 637106. Merged to 1.4 in revision 637107, and to 1.3 in revision 637110.

Resolving as Fixed, as it seems obvious that at least the specific deadlock issue shown in the thread dump can not occur after this fix. Please reopen only if there's a regression caused by this issue, and file separate issues if other deadlocks occur.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4, core 1.4.2
>
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Updated: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Przemo Pakulski updated JCR-1461:
---------------------------------

    Attachment: thread-dump.txt

Thread dump attached (2 threads only)

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>         Attachments: thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Updated: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-1461:
----------------------------------

    Attachment: thread-dump-random-ops.txt

I've finally been able to reproduce the deadlock with new random operation tests. I'll commit them soon.

Btw, that's without the patch that Jukka recently applied.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4, core 1.4.2
>
>         Attachments: JCR-1461.patch, thread-dump-random-ops.txt, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578737#action_12578737 ] 

Jukka Zitting commented on JCR-1461:
------------------------------------

> Could we wait for feedback from Przemo re re-runnig his test using the patched jackrabbit 1.3.4rc?

Sure. Przemo, any update?

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4
>
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Updated: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Marcel Reutegger (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcel Reutegger updated JCR-1461:
----------------------------------

    Attachment: JCR-1461.patch

So far I haven't been able to reproduce the deadlock with a test.

Just looking at the thread dump we can avoid the deadlock by pulling the getPath() in LockManagerImpl.getLockInfo() out of the acquire/release() scope.

I've attached a patch with that change.

Przemo, can you please build jackrabbit-core-1.3.4-rc1 again with this patch applied and check if the deadlock still occurs?

It also seems that there's another thread involved in the deadlock. Can you please attach the complete thread dump? Stripping off application specific stack frames is of course OK.

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Updated: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Przemo Pakulski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Przemo Pakulski updated JCR-1461:
---------------------------------

    Priority: Critical  (was: Major)

> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3, 1.3.4
>            Reporter: Przemo Pakulski
>            Priority: Critical
>         Attachments: thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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


[jira] Commented: (JCR-1461) Deadlock on concurrent commit/checkin operations

Posted by "Greg Klebus (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-1461?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578735#action_12578735 ] 

Greg Klebus commented on JCR-1461:
----------------------------------

Could we wait for feedback from Przemo re re-runnig his test using the patched jackrabbit 1.3.4rc? 


> Deadlock on concurrent commit/checkin operations
> ------------------------------------------------
>
>                 Key: JCR-1461
>                 URL: https://issues.apache.org/jira/browse/JCR-1461
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.3.3
>            Reporter: Przemo Pakulski
>            Priority: Critical
>             Fix For: 1.3.4
>
>         Attachments: JCR-1461.patch, thread-dump.txt
>
>
> Running concurrently jackrabbit transactions including checkin operations leads to deadlock.

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