Permission denied when deleting releasing lockdir: in use by another process

Bug #394976 reported by Dr Paul Gorman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Medium
Unassigned

Bug Description

Using the simple windows installer with bzr 15.1 (I also tried with 16.1 with the same results) on Windows XP SP3 I have tried creating a repository with:
bzr init
bzr add
bzr commit -m "Initial commit"

below is the log output. I have Tortoise Bazaar installed too so maybe that is the process in question.
Being new to Bazaar I have no idea if my repository is in a valid state. From bzr check it seems to be OK.

==============================

Fri 2009-07-03 11:26:35 +1000
[ 3756] 2009-07-03 11:26:35.660 INFO: tbzrcache running...

Fri 2009-07-03 11:27:01 +1000
0.047 bzr arguments: [u'help']
0.063 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
0.063 looking for plugins in C:/Program Files/Bazaar/plugins
0.172 encoding stdout as sys.stdout encoding 'cp437'
0.172 return code 0

Fri 2009-07-03 11:27:14 +1000
0.046 bzr arguments: [u'init']
0.062 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files/Bazaar/plugins
0.171 encoding stdout as sys.stdout encoding 'cp437'
0.218 creating repository in file:///C:/repositories/Claims/mainline/.bzr/.
0.265 creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x012C3F30> in file:///C:/repositories/Claims/mainline/.bzr/
0.312 trying to create missing lock 'C:/repositories/Claims/mainline/.bzr/checkout/dirstate'
0.327 opening working tree 'C:/repositories/Claims/mainline'
0.515 opening working tree 'C:/repositories/Claims/mainline'
0.546 return code 0

Fri 2009-07-03 11:27:20 +1000
0.046 bzr arguments: [u'add']
0.062 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
0.062 looking for plugins in C:/Program Files/Bazaar/plugins
0.171 encoding stdout as sys.stdout encoding 'cp437'
0.202 opening working tree 'C:/repositories/Claims/mainline'
0.218 skip control directory '.bzr'
2.466 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 729, in exception_to_return_code
  File "bzrlib\commands.pyo", line 924, in run_bzr
  File "bzrlib\commands.pyo", line 560, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 598, in run
  File "bzrlib\mutabletree.pyo", line 54, in tree_write_locked
  File "bzrlib\workingtree_4.pyo", line 1176, in unlock
  File "bzrlib\lockable_files.pyo", line 318, in unlock
  File "bzrlib\lockdir.pyo", line 313, in unlock
  File "bzrlib\transport\local.pyo", line 513, in rmdir
  File "bzrlib\transport\__init__.pyo", line 316, in _translate_error
PermissionDenied: Permission denied: "C:/repositories/Claims/mainline/.bzr/checkout/lock/releasing.ft60nk0plglfcpe2z0el.tmp": [Error 32] The process cannot access the file because it is being used by another process: u'C:/repositories/Claims/mainline/.bzr/checkout/lock/releasing.ft60nk0plglfcpe2z0el.tmp'

2.466 return code 3

Fri 2009-07-03 11:27:45 +1000
0.063 bzr arguments: [u'commit', u'-m', u'Initial commit']
0.078 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
0.078 looking for plugins in C:/Program Files/Bazaar/plugins
0.188 encoding stdout as sys.stdout encoding 'cp437'
0.235 opening working tree 'C:/repositories/Claims/mainline'
0.250 preparing to commit
[ 4972] 2009-07-03 11:27:45.309 INFO: Committing to: C:/repositories/Claims/mainline/
0.266 Selecting files for commit with filter []
[ 4972] 2009-07-03 11:27:45.323 INFO: added ....

INFO messages of files added removed...

[ 4972] 2009-07-03 11:27:53.457 INFO: Committed revision 1.
8.445 return code 0
85.586 opening working tree 'C:/repositories/Claims/mainline'
87.584 opening working tree 'C:/repositories/Claims/mainline'
87.584 opening working tree 'C:/repositories/Claims/mainline'
87.584 opening working tree 'C:/repositories/Claims/mainline'
87.600 opening working tree 'C:/repositories/Claims/mainline'
87.600 opening working tree 'C:/repositories/Claims/mainline'
87.600 opening working tree 'C:/repositories/Claims/mainline'
88.708 opening working tree 'C:/repositories/Claims/mainline'
90.268 opening working tree 'C:/repositories/Claims/mainline'
90.284 opening working tree 'C:/repositories/Claims/mainline'
90.284 opening working tree 'C:/repositories/Claims/mainline'
90.284 opening working tree 'C:/repositories/Claims/mainline'
90.300 opening working tree 'C:/repositories/Claims/mainline'
90.300 opening working tree 'C:/repositories/Claims/mainline'
90.752 opening working tree 'C:/repositories/Claims/mainline'
[ 3756] 2009-07-03 11:28:08.612 INFO: Executing taskbar command u'"C:\\Program Files\\Bazaar\\tbzrcommandw.exe" --command=settings'

Fri 2009-07-03 11:28:08 +1000
0.031 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
[ 3756] 2009-07-03 11:28:14.371 INFO: config change detected
[ 3756] 2009-07-03 11:28:14.371 INFO: reloading config values
[ 3756] 2009-07-03 11:28:14.371 INFO: Reqeust to reload our config
0.031 looking for plugins in C:/Program Files/Bazaar/plugins
102.114 opening working tree 'C:/repositories/Claims/mainline'

Fri 2009-07-03 11:37:25 +1000
0.047 bzr arguments: [u'check']
0.063 looking for plugins in C:/Documents and Settings/PaulGo/Application Data/bazaar/2.0/plugins
0.063 looking for plugins in C:/Program Files/Bazaar/plugins
0.188 encoding stdout as sys.stdout encoding 'cp437'
0.250 opening working tree 'C:/repositories/Claims/mainline'
[ 4840] 2009-07-03 11:37:26.155 INFO: Checking working tree at 'file:///C:/repositories/Claims/mainline/'.
[ 4840] 2009-07-03 11:37:26.640 INFO: Checking repository at 'file:///C:/repositories/Claims/mainline/'.
[ 4840] 2009-07-03 11:37:34.334 INFO: checked repository <bzrlib.transport.local.LocalTransport url=file:///C:/repositories/Claims/mainline/> format <RepositoryFormatKnitPack1>
[ 4840] 2009-07-03 11:37:34.334 INFO: 1 revisions
[ 4840] 2009-07-03 11:37:34.334 INFO: 2836 file-ids
[ 4840] 2009-07-03 11:37:34.334 INFO: 2507 unique file texts
[ 4840] 2009-07-03 11:37:34.334 INFO: 0 repeated file texts
[ 4840] 2009-07-03 11:37:34.334 INFO: 0 unreferenced text versions
[ 4840] 2009-07-03 11:37:34.334 INFO: Checking branch at 'file:///C:/repositories/Claims/mainline/'.
[ 4840] 2009-07-03 11:37:34.334 INFO: checked branch file:///C:/repositories/Claims/mainline/ format Branch format 6
8.428 return code 0

Tags: win32
Revision history for this message
Dr Paul Gorman (drpaul65) wrote :

I tried the installation again without using the Tortoise-Bazaar component and received the same messages.

Revision history for this message
Martin Pool (mbp) wrote :

Thankyou for the report.

This doesn't indicate any damage to your repository but it probably will interfere with running bzr.

As you can see from the message, bzr is finding the file's in use by some other process when it's trying to delete an internal file.

The question is, which other process? Are you using a virus scanner, and if so could you try turning it off and testing again? Is there anything unusual about your environment?

Possibly we should change this to only give a warning; leaving the temporary file behind would be undesirable but not a major problem. Eventually these files might accumulate so perhaps we'd want to automatically remove them.

summary: - Permission denied: branch/lock/releasing tmp file in use by another
+ Permission denied when deleting releasing lockdir: in use by another
process
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → Incomplete
Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Vincent Ladeuil (vila) wrote :
Revision history for this message
Dr Paul Gorman (drpaul65) wrote :

Thanks for the heads up about the virus scanning. Stupid me forgot all about that.
The issue was the various scanning software in my environment. I did the install in a virtual machine with no virus or media scanning and everything works as advertised.

BTW, the Tortoise plugin would would keep disabling the OK button so the operation could not be completed; all you can do is cancel.

Revision history for this message
Martin Pool (mbp) wrote :

I created https://answers.edge.launchpad.net/bzr/+faq/599

If you have any feedback on that please let us know.

Changed in bzr:
status: Incomplete → Invalid
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.