Lockdir disappeared after being renamed

Bug #498378 reported by Lelak
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Pool
2.0
Fix Released
Medium
Martin Pool

Bug Description

bzr: ERROR: exceptions.TypeError: 'NoneType' object is unsubscriptable

Traceback (most recent call last):
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commit.py", line 663, in closeEvent
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commit.py", line 658, in _save_or_wipe_commit_data
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commit.py", line 564, in wipe_commit_data
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commit_data.py", line 177, in wipe
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commit_data.py", line 202, in _set_new_commit_data
  File "bzrlib\config.pyo", line 701, in set_user_option
  File "bzrlib\config.pyo", line 968, in set_option
  File "bzrlib\branch.pyo", line 2135, in lock_write
  File "bzrlib\lockable_files.pyo", line 194, in lock_write
  File "bzrlib\lockdir.pyo", line 579, in lock_write
  File "bzrlib\lockdir.pyo", line 503, in wait_lock
  File "bzrlib\lockdir.pyo", line 464, in attempt_lock
  File "bzrlib\lockdir.pyo", line 245, in _attempt_lock
TypeError: 'NoneType' object is unsubscriptable

bzr 2.0.3 on python 2.5.4 (win32)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'qcommit', '--ui-mode']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [0.8.3]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.0.3]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.0.3]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.14.5]
  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.4]
  svn C:\Program Files (x86)\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files (x86)\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files (x86)\Bazaar\plugins\xmloutput [0.8.5]

Revision history for this message
Alexander Belchenko (bialix) wrote :

Looking at the traceback it seems like the bug in bzrlib.

affects: qbzr → bzr
Revision history for this message
Lelak (dev-lelak) wrote :

Thanks Alexander, this is the first time we from Lelak are reporting a Bug, please if you need any more information about this one we will be glad to help.
Bazaar really a great software!

Revision history for this message
Martin Pool (mbp) wrote : Re: 'NoneType' object is unsubscriptable in lockdir

There are probably other reports of this. The error indicates we're failing to read back the lock info file after writing it, which may portend some lower level flakiness in the filesystem or transport. But we should at least report it better.

summary: - ON COMMIT: bzr: ERROR: exceptions.TypeError: 'NoneType' object is
- unsubscriptable
+ 'NoneType' object is unsubscriptable in lockdir
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Martin Pool (mbp) wrote :

https://code.edge.launchpad.net/~mbp/bzr/2.0-498378-peek-lock tries to make this clearer.

To judge from the traceback what seems to have happened is: Bazaar renamed a directory, then went to look at it and saw it wasn't there! So there seems to be something strange here. Are you using a network filesystem or something similar? What's in the .bzr/branch/lock subdirectory? Could you attach a zip of it?

Changed in bzr:
status: Confirmed → Incomplete
summary: - 'NoneType' object is unsubscriptable in lockdir
+ Lockdir disappeared after being renamed
Revision history for this message
Lelak (dev-lelak) wrote :

Hi Martin!
Thanks for the quick response. Yes we use on Lelak a shared network drive for our projects. Attached is the lock folder you asked.

Thanks a lot and please let us know you need further information.

Revision history for this message
Lelak (dev-lelak) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

Hi,

In this zip file the lock does seem to be correctly held - the error would not have occurred if the directory looked like this at the time. So this may be timing related.

What actual shared network hardware or software are you using? Novell maybe? This could be like bug 338220.

Revision history for this message
Lelak (dev-lelak) wrote :

It's a normal windows network, it is working fine and fast for almost everything. This specific error appears every time after a successful commit, when I click the close button of the commit dialog. Then, on the next, commit I need to manually break the lock.

Thanks,

Tiago

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 498378] Re: Lockdir disappeared after being renamed

Lelak пишет:
> It's a normal windows network, it is working fine and fast for almost
> everything. This specific error appears every time after a successful
> commit, when I click the close button of the commit dialog. Then, on the
> next, commit I need to manually break the lock.

Are you using mapped network drive or bound branch (heavyweight
checkout) to the branch on UNC path?

John A Meinel (jameinel)
Changed in bzr:
assignee: nobody → Martin Pool (mbp)
milestone: none → 2.1.0rc1
status: Incomplete → Fix Released
Revision history for this message
Lelak (dev-lelak) wrote :

We are using a mapped network drive.

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

If I recall correctly, my branch does not necessarily totally fix the
underlying problem, but it should make the message more clear.

If the network drive is does not give us a coherent view of the disk
operations we will need to work out how to get around it. Perhaps
spinning for a while, or taking an OS lock will give it a clue, or ...
--
Martin <http://launchpad.net/~mbp/>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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