Interrupting commit to smart server leaves branch locked

Bug #495011 reported by Gareth White
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

When you interrupt a commit to a smart server using ctrl-C, occasionally it will leave the branch locked. This is difficult to reproduce as it seems to depend on exactly when you hit ctrl-C, but I can get it to happen roughtly 1 in 10 times. See the attached log for the traceback you get when it happens, plus the subsequent error about the lock.

I've reproduced this with Bazaar 2.0.1 and 2.1.0b3 using Python 2.5 on Windows XP SP3, as well as with 2.0.3 on OS X.

To reproduce:
bzr init-repo --no-trees testrepo
bzr init testrepo/branch1
bzr serve --allow-writes &
bzr checkout --lightweight bzr://localhost/testrepo/branch1
cd branch1

Now repeat the following and eventually you'll get an error "Could not acquire lock":
    bzr commit -m "test" --unchanged
    Hit ctrl-C sometime before the "Committing to:" message appears.

(Also, the error message is wrong as it does not say how to break the lock. However, that's already covered by bug 250451.)

Revision history for this message
Gareth White (gwhite-deactivatedaccount) wrote :
description: updated
Revision history for this message
Martin Pool (mbp) wrote :

The wrong break lock message is bug 250451.

Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Gareth White (gwhite-deactivatedaccount) wrote :

I can also reproduce this on OS X, so it's not windows specific. The key seems to be to interrupt the commit while it's displaying a progress bar. This happens once before the "Committing to:" message, and later on towards the end of the commit. Using a large repository where commits takes several seconds makes it easier to reproduce.

description: updated
Revision history for this message
Phillip Ball (phillip-oicgroup) wrote :

I have the same issue. I'm now with a locked branch, and really unsure how to unlock it:

https://bugs.launchpad.net/bzr/+bug/250451/comments/17

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 495011] Re: Interrupting commit to smart server leaves branch locked

From the look of your comment in that other bug, you don't have the same
problem at all. In general we prefer that people file *new* bugs if there is
any doubt that the bugs are the same: Launchpad lets us combine bugs easily,
but doesn't let us split bugs apart.

Jelmer Vernooij (jelmer)
tags: added: hpss locking
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.