Bazaar doesn't detect its own stale locks
Bug #220464 reported by
Stefan Monnier
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Martin Pool | ||
Breezy |
Fix Released
|
High
|
Unassigned |
Bug Description
Here's a sample session:
% bzr commit -m '...'
Unable to obtain lock sftp://
held by <email address hidden> on host pastel [process #4601]
locked 6 hours, 59 minutes ago
Will continue to try until 22:20:36
and then it sits there. Thing is, this is on "pastel", and there is no process 4601 running, so the lock can be determined to be stale without the need of any user interaction.
Related branches
lp:~mbp/bzr/220464-stale-locks
- John A Meinel: Approve
- Martin Packman (community): Approve
- Andrew Bennetts: Approve
-
Diff: 1034 lines (+488/-135)10 files modifiedbzrlib/commit.py (+0/-1)
bzrlib/config.py (+7/-4)
bzrlib/help_topics/en/configuration.txt (+8/-0)
bzrlib/lockdir.py (+246/-97)
bzrlib/osutils.py (+27/-0)
bzrlib/tests/__init__.py (+7/-3)
bzrlib/tests/test_lockdir.py (+139/-27)
bzrlib/ui/__init__.py (+5/-3)
bzrlib/win32utils.py (+38/-0)
doc/en/release-notes/bzr-2.4.txt (+11/-0)
lp:~jelmer/brz/steal-dead-default
- Martin Packman: Approve
-
Diff: 70 lines (+10/-7)4 files modifiedbreezy/config.py (+1/-1)
breezy/help_topics/en/configuration.txt (+2/-2)
breezy/tests/test_lockdir.py (+4/-4)
doc/en/release-notes/brz-3.1.txt (+3/-0)
tags: | added: lockdir locking |
Changed in brz: | |
status: | New → Fix Released |
importance: | Undecided → High |
To post a comment you must log in.
If the holder hostname is the same as the new process's hostname we could check if the process still exists.
I have some concern that the hostname may not be unique to a physical machine, such as if it was never set (so is "localhost"), or if it's set to a static value (like "ubuntu") by a boot cd. But it's probably unlikely that the username will also match in this case.