[Bug 4858] New: Share extension can cause wlock vs lock deadlock

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Mon Sep 28 18:57:42 CDT 2015


http://bz.selenic.com/show_bug.cgi?id=4858

            Bug ID: 4858
           Summary: Share extension can cause wlock vs lock deadlock
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Mac OS
            Status: UNCONFIRMED
          Severity: bug
          Priority: normal
         Component: share
          Assignee: bugzilla at selenic.com
          Reporter: durham at fb.com
                CC: mercurial-devel at selenic.com

If you have repos foo and bar, where bar is a shared working copy of foo, it's
possible to enter a deadlock when doing a rebase in one working copy, and a hg
book -d in the other.

The problem is that shared tries to write bookmarks back to the source repo
after it has already taken the source repo lock but before it has taken the
source repo wlock.

Example:
hg init foo
hg share foo bar
hg -R bar rebase ...  &
hg -R foo book -d ...

What happens
1) rebase wlock's bar
2) rebase lock's foo
3) book-d wlock's foo
4.a) book-d hangs trying to lock foo
4.b) rebase hangs trying to wlock foo  (so it can copy the bookmark writes from
foo to bar)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list