bzr pull crashes with exceptions.AttributeError: 'NoneType' object has no attribute 'as_dict' after system upgrade

Bug #537127 reported by bernij
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

On a debian squeeze system running 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux
After upgrading a couple of packages (among which wpasupplicant) did a bzr pull:

Thu 2010-03-11 06:38:03 +0100
0.768 bazaar version: 2.1.0
0.768 bzr arguments: [u'pull']
1.067 looking for plugins in /home/berni/.bazaar/plugins
1.068 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
3.003 encoding stdout as sys.stdout encoding 'UTF-8'
4.110 opening working tree '/home/berni/prj/tools/simplon-tool'
5.354 ssh implementation is OpenSSH
9.944 Using fetch logic to copy between KnitPackRepository('sftp://odie.dynalias.net/home/berni/prj/tools/simplon-tool/.bzr/repository/')(<RepositoryFormatKnitPack1>) and KnitPackRepository('file:///home/berni/prj/tools/simplon-tool/.bzr/repository/')(<RepositoryFormatKnitPack1>)
9.944 fetch up to rev {bjoss@chpcxp-bjoss-20100310163317-37a77zi3govxr1rn}

.. but the system froze (including window manager) before bzr pull was finished.
Then I rebooted the netbook, by pressing the on/off button for >10s as the system was not responding to keyboard nor mouse.
After reboot I now get bzr pull to crash with the following log:

Thu 2010-03-11 06:46:29 +0100
0.550 bazaar version: 2.1.0
0.550 bzr arguments: [u'pull']
0.712 looking for plugins in /home/berni/.bazaar/plugins
0.713 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
1.782 encoding stdout as sys.stdout encoding 'UTF-8'
2.310 opening working tree '/home/berni/prj/tools/simplon-tool'
3.077 ssh implementation is OpenSSH
3.962 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1004, in run
    branch_to.lock_write()
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2144, in lock_write
    return self.control_files.lock_write(token=token)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockable_files.py", line 193, in lock_write
    token_from_lock = self._lock.lock_write(token=token)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 594, in lock_write
    return self.wait_lock()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 525, in wait_lock
    new_info = self.peek()
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 438, in peek
    info = self._read_info_file(self._held_info_path)
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 428, in _read_info_file
    return self._parse_info(self.transport.get_bytes(path))
  File "/usr/lib/python2.5/site-packages/bzrlib/lockdir.py", line 463, in _parse_info
    return rio.read_stanza(osutils.split_lines(info_bytes)).as_dict()
AttributeError: 'NoneType' object has no attribute 'as_dict'

3.987 couldn't find apport bug-reporting library: No module named apport
4.010 Transferred: 0KiB (0.4K/s r:0K w:0K)
4.011 return code 4

bzr pull crashes consistentely, as above, while bzr status and missing both work fine.

Revision history for this message
bernij (bernij) wrote :

Just confirmed that the crash is specific to the one project being pulled when the system froze.
bzr pull works fine on other projects.

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

This appears to be a duplicate of bug 185103. It's still present in 2.1.0, but has been fixed in 2.0.5 and will be fixed in 2.1.1.

As a workaround, delete the 'held' directory inside the .bzr/branch/lock directory (or maybe .bzr/repostiory/lock or .bzr/checkout/lock).

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.