Unable to obtain lock held by name , acquired 0 seconds ago

Bug #837515 reported by Neil Martinsen-Burrell
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar automirror plugin
Confirmed
Low
Unassigned

Bug Description

When committing in a local bound branch, it fails because it isn't able to obtain a lock. From <email address hidden>:

Hello
I installed the plugin auto-mirror into bzr according to the instructions.

When I commit in the local branch , it shows me the following message:

“Unable to obtain lock file:///NETWORK_LOCATION held by USER_NAME
at COMPUTER name [process #PROCESS_NUMBER], acquired 0 seconds ago.”

Do you know how to solve this problem? (there is no bzr or windows open on the network location)

NOTE : I don’t know if this relevant or not , but the local and network branches are bind branches.

Revision history for this message
Gil.I (gidelson) wrote :

Neil,
i've checked the additional information you requested:

1.bzr version is 2.3.4 on both locations
2. bzr info -v gives the following in local branch:

Shared repository with trees (format: 2a)
Location:
  shared repository: .

Format:
       control: Meta directory format 1
    repository: Repository format 2a - rich roots, group compression and chk inv
entories

Create working tree for new branches inside the repository.

Repository:
        38 revisions

and for network location :

Shared repository with trees (format: 2a)
Location:
  shared repository: .

Format:
       control: Meta directory format 1
    repository: Repository format 2a - rich roots, group compression and chk inv
entories

Create working tree for new branches inside the repository.

Repository:
        38 revisions

3. also i send you , by email , my workflow that created the setup.

Gil Idelson

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

I need the full output from "bzr info -v", especially the sections title "Location" and "Related branches". I need to know how the relevant branches are related to each other so that I can test this. Alternatively, you could provide a reproduction recipe with dummy branches instead of showing your live setup.

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

nmb@garble[~/tmp]$ bzr init network-branch
Created a standalone tree (format: 2a)
nmb@garble[~/tmp]$ cd network-branch
nmb@garble[~/tmp/network-branch]$ echo content > file
nmb@garble[~/tmp/network-branch]$ bzr add
adding file
nmb@garble[~/tmp/network-branch]$ bzr ci -m 'first revision'
Committing to: /Users/nmb/tmp/network-branch/
added file
Committed revision 1.
nmb@garble[~/tmp/network-branch]$ cd ..
nmb@garble[~/tmp]$ bzr branch network-branch local-branch
Branched 1 revision(s).
nmb@garble[~/tmp]$ bzr co local-branch local-tree
nmb@garble[~/tmp]$ cd local-tree
nmb@garble[~/tmp/local-tree]$ echo more content >> file
nmb@garble[~/tmp/local-tree]$ bzr config --scope=branch post_commit_mirror=file:///Users/nmb/tmp/network-branch
nmb@garble[~/tmp/local-tree]$ bzr ci -m 'auto try'
Committing to: /Users/nmb/tmp/local-branch/
modified file
All changes applied successfully.
Committed revision 2.
nmb@garble[~/tmp/local-tree]$ bzr log
------------------------------------------------------------
revno: 2
committer: Neil Martinsen-Burrell <email address hidden>
branch nick: local-branch
timestamp: Thu 2011-09-01 10:36:25 -0500
message:
  auto try
------------------------------------------------------------
revno: 1
committer: Neil Martinsen-Burrell <email address hidden>
branch nick: network-branch
timestamp: Thu 2011-09-01 10:35:00 -0500
message:
  first revision
nmb@garble[~/tmp/local-tree]$ bzr log ../network-branch
------------------------------------------------------------
revno: 2
committer: Neil Martinsen-Burrell <email address hidden>
branch nick: local-branch
timestamp: Thu 2011-09-01 10:36:25 -0500
message:
  auto try
------------------------------------------------------------
revno: 1
committer: Neil Martinsen-Burrell <email address hidden>
branch nick: network-branch
timestamp: Thu 2011-09-01 10:35:00 -0500
message:
  first revision
nmb@garble[~/tmp/local-tree]$ bzr config --scope=branch post_commit_mirror=bzr+ssh://localhost/Users/nmb/tmp/network-branch
nmb@garble[~/tmp/local-tree]$ echo over the network? >> file
nmb@garble[~/tmp/local-tree]$ bzr ci -m 'try over ssh this time'
Committing to: /Users/nmb/tmp/local-branch/
modified file
 M file 0kB/s / Uploading data to master branch - Stage:Fetching revisio..
All changes applied successfully.
Updated to revision 3 of branch /Users/nmb/tmp/network-branch
Committed revision 3.

Revision history for this message
Gil.I (gidelson) wrote :

i solved the problem.
the fact that the remote branch and local branch were bound , cause the lock problem.
i just did unbind and all is working fine.
thanks for your help

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

It seems like we could use a better error message in this case.

Changed in bzr-automirror:
status: New → Confirmed
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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