LockContention just says "(remote lock)" not a useful url

Bug #159589 reported by James Westby
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Low
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

LockContention gives you this:

bzr: ERROR: Could not acquire lock "(remote lock)"

Which is unhelpful. It should say the lock is held.

Also it could possibly suggest break-lock.

Thanks,

James

Revision history for this message
John A Meinel (jameinel) wrote :

I think LockContention can also occur when there are permission issues.

It just depends on the specific case. But certainly when it is a lock already held, it should be reported as such to the user.

Changed in bzr:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Andrew Bennetts (spiv) wrote :

Suggesting break-lock is bug 139202.

What's the context of this bug? I.e. when does the user see a bare LockContention rather than the usual verbose "Unable to obtain lock..." message?

(Another issue here is that the "(remote lock)" text isn't particularly helpful, but that ought to be tracked in a separate bug report, if it isn't already...)

description: updated
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 159589] Re: LockContention has unhelpful text

On Tue, 2008-06-03 at 02:31 +0000, Andrew Bennetts wrote:
> Suggesting break-lock is bug 139202.
>
> What's the context of this bug? I.e. when does the user see a bare
> LockContention rather than the usual verbose "Unable to obtain lock..."
> message?

I can't remember now. I think the bug report may have stemmed from
helping a user on IRC when they got this message.

Thanks,

James

Revision history for this message
Martin Pool (mbp) wrote : [merge][#159589] Re: LockContention has unhelpful text

This makes LockContention include the lock file name in more cases, so
that you get some clue as to what's happening. I reproduced this
earlier while trying to branch from a branch while pushing it. (I
think that in turn is another instance of the shortcomings of
write-locking the dirstate to update the cache while doing a readonly
operation, but giving a better message here will make it more
obvious.)

This includes a bonus fix for the repr of SmartClientStreamMedium; see
the comment.

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Andrew Bennetts (spiv) wrote : Re: LockContention has unhelpful text

That patch looks reasonable to me... and I'd really like the repr fix to land ;)

Revision history for this message
Andrew Bennetts (spiv) wrote :

I believe Martin landed this in bzr.dev r4114.

Changed in bzr:
assignee: nobody → mbp
status: Triaged → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

So there are a couple of problems here and I only fixed one of them. I think my particular fix was actually for dirstate contention, not remote branches as in James's original example.

For remote branches we still just say "(remote lock)".

Also per bug 342102 we're apparently not polling the lock as we should be.

Changed in bzr:
status: Fix Released → Confirmed
Martin Pool (mbp)
summary: - LockContention has unhelpful text
+ LockContention just says "(remote lock)" not a useful url
Changed in bzr:
assignee: Martin Pool (mbp) → nobody
importance: Medium → Low
Revision history for this message
Robert Collins (lifeless) wrote :

I think Parth has done a lot of work on this, and this is a likely duplicate now. Subscribing him for his comment.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: error-reporting
removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
Jelmer Vernooij (jelmer)
tags: added: locking
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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