Interrupting pull with ctrl-C left stale locks that cannot be removed - even with bzr break-lock
John Arbash Meinel
john at arbash-meinel.com
Tue Oct 31 17:54:22 GMT 2006
Nicholas Allen wrote:
>
>> Well, there are still a few things we could check. Like:
>>
>> Is there a .bzr/repository/lock/held directory? (And
>> .bzr/branch/lock/held, and .bzr/checkout/lock/held).
>>
> Yes this directory exists. After rebooting the locks on the working tree
> and branch were removed but the shared repository lock still remains.
That says to me that you still had a process running (somewhere) which
was holding the locks open. It isn't like windows would be deleting
directories without being asked.
>> If we have to force it, you can just delete those directories, and it
>> breaks the locks. But I'd really like to figure out why bzr is hanging
>> first, so we can avoid running into this in the future.
>>
>> Also, did you hit ^C more than 1 time? In general, we cleanup locks as
>> we are exiting, but sometimes it can take long enough that a second ^C
>> will kill it during cleanup. (I run into this more when I'm over a slow
>> SSH connection)
>>
> It could be that I hit it twice because I got impatient ;-)
>> It might be nice if we printed: "^C caught, cleaning up locks", or
>> something like that. As is, you can hit ^C, and it seems like nothing
>> has happened.
>
> I think that would be a good idea. Could you not ignore the control-c
> when cleaning up locks to ensure that they don't get left behind?
We could. Though if you lost connection with a remote machine, or it is
being really slow, it can be kind of nice to stop things. Perhaps a
SIGINT handler which just reports that we are currently cleaning up
locks, use ^C again to stop.
So you would have ^C => stop what you are doing and start cleanup. ^C =>
report to the user that you are currently cleaning up. ^C => stopped.
>
> But I'm still curious as to why break-lock is still hanging...
>
> Cheers,
>
> Nick
>
I don't know of anything we are doing that would cause it to hang. So
I'm also *very* interested in why it would hang.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061031/e62ff5d4/attachment.pgp
More information about the bazaar
mailing list