Locking bug on Mac OS X over AFP

E. Wing ewmailing at gmail.com
Mon Mar 10 07:45:48 CDT 2008


On 3/9/08, Matt Mackall <mpm at selenic.com> wrote:
> On Sat, Mar 08, 2008 at 04:34:29PM -0800, E. Wing wrote:
> > bump
> >
> > On 2/8/08, E. Wing <ewmailing at gmail.com> wrote:
> > > Hello, I believe I have found a reproducible locking bug with
> > > Mercurial (0.9.5). Using two Macs, both running Leopard, when using
> > > the Apple File Sharing Protocol (AFP), a clone from a client machine
> > > will permanently lock the original repo, which prevents further
> > > access.
> > >
> > > To reproduce:
> > >
> > > On Mac #1, create an initial repository:
> > > 1) mkdir LOCKBUG
> > > 2) cd LOCKBUG
> > > 3) echo "hello" > foo.txt
> > > 4) hg init
> > > 5) hg add
> > > 6) hg commit -m"Initial"
> > >
> > > On Mac #2, mount Mac #1 using AFP (done through SHARED discovered
> > > Bonjour list in Finder) and then run on Mac #2
> > > 7) hg clone /Volumes/ewing/LOCKBUG LOCKBUG
> > >
> > > Repository will now be locked permanently. So for example, trying to
> > > clone again on Mac #2 yields:
> > > 8) hg clone /Volumes/ewing/LOCKBUG LOCKBUG2
> > > abort: Resource busy: /Volumes/ewing/LOCKBUG/.hg/store/lock
>
> What's in .hg/store/lock? We don't actually use any operating system
> locking here, it's simply a file (usually a symlink). Does AFP support
> symlinks?
>

Yes, AFP supports symlinks. This is the directory on Mac #1:

$ ls -l LOCKBUG/.hg/store/
total 40
-rw-r--r--  1 ewing  501  181 Mar 10 05:39 00changelog.i
-rw-r--r--  1 ewing  501  114 Mar 10 05:39 00manifest.i
drwxr-xr-x  3 ewing  501  102 Mar 10 05:39 data/
lrwxr-xr-x@ 1 ewing  501   21 Mar 10 05:41 lock@ -> appleseed.local:13817
lrwxr-xr-x@ 1 ewing  501   21 Mar 10 05:41 lock.break@ -> appleseed.local:13818
-rw-r--r--  1 ewing  501   48 Mar 10 05:39 undo


(appleseed.local is the name of Mac #2)

Thanks,
Eric


More information about the Mercurial mailing list