ValueError: need more than 1 value to unpack in _last_revision_info

Bug #623152 reported by Peter Schachte
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned
bzr (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

bzr update, bzr commit, bzr status all give me this error:

bzr: ERROR: exceptions.ValueError: need more than 1 value to unpack

 Traceback (most recent call last):
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 853, in exception_to_return_code
     return the_callable(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1055, in run_bzr
     ret = run(*run_argv)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 661, in run_argv_aliases
     return self.run_direct(**all_cmd_args)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 665, in run_direct
     return self._operation.run_simple(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 122, in run_simple
     self.cleanups, self.func, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
     result = func(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3138, in run
     exclude=safe_relpath_files(tree, exclude))
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 194, in write_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/workingtree_4.py", line 197, in commit
     result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 194, in write_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/mutabletree.py", line 225, in commit
     *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 257, in commit
     possible_master_transports=possible_master_transports)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 118, in run
     self.cleanups, self.func, self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
     result = func(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 332, in _commit
     self._check_bound_branch(operation, possible_master_transports)
   File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 493, in _check_bound_branch
     local_info = self.branch.last_revision_info()
   File "/usr/lib/python2.6/dist-packages/bzrlib/decorators.py", line 140, in read_locked
     result = unbound(self, *args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 862, in last_revision_info
     self._last_revision_info_cache = self._last_revision_info()
   File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 2485, in _last_revision_info
     revno, revision_id = revision_string.rstrip('\n').split(' ', 1)
 ValueError: need more than 1 value to unpack

BzrVersion: 2.1.1

Platform: Linux-2.6.32-24-generic-x86_64-with-Ubuntu-10.04-lucid

Tags: integrity
Revision history for this message
Peter Schachte (schachte) wrote :
Revision history for this message
Andrew Bennetts (spiv) wrote :

That traceback suggests the .bzr/branch/last-revision file is corrupt, probably blank. What does it contain?

description: updated
Martin Pool (mbp)
summary: - bzr crashes on most operations
+ ValueError: need more than 1 value to unpack in _last_revision_info
Changed in bzr:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

Changed in bzr:
status: Incomplete → Expired
Revision history for this message
Martin Pool (mbp) wrote :

stewart hit this too. Basically this seems to be due to the file being lost after a machine crash:

Some things we could do here:

1- have an option to globally fsync after all file operations, which would at least save people hitting this twice. (bug 343427)
2- report this more cleanly.
3- perhaps have a way to recover, though since the branch has lost its idea of where its tip is, that's not trivial.

Changed in bzr:
importance: Undecided → Medium
status: Expired → Confirmed
Revision history for this message
Andrew Bennetts (spiv) wrote : Re: [Bug 623152] Re: ValueError: need more than 1 value to unpack in _last_revision_info

> 3- perhaps have a way to recover, though since the branch has lost its
> idea of where its tip is, that's not trivial.

For branches colocated with a checkout, the dirstate probably contains
the right revid for the tip, assuming it isn't damaged also.

Jelmer Vernooij (jelmer)
Changed in bzr (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: added: integrity
removed: check-for-breezy
Changed in brz:
importance: Undecided → Medium
status: New → Triaged
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.