bzr crashed with ValueError in _add_index()

Bug #706163 reported by Marius Gedminas
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
bzr (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: bzr

I did a 'bzr ci' and quickly hit Ctrl-C when I realized I forgot to specify the path:

mg@platonas:~/src/bookserv $ bzr ci
Committing to: /home/mg/src/bookserv/
modified development.ini
modified src/bookserv/controllers/book.py
^Cbzr: interrupted

I then repeated the bzr ci with a path, and *foom*

$ bzr ci src
Committing to: /home/mg/src/bookserv/
modified src/bookserv/controllers/book.py
bzr: ERROR: exceptions.ValueError: math domain error

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 705, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/builtins.py", line 3200, 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 201, in commit
    *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 286, in commit
    possible_master_transports=possible_master_transports)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 131, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commit.py", line 451, in _commit
    self.branch.set_last_revision_info(new_revno, self.rev_id)
  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/branch.py", line 2827, in set_last_revision_info
    self._run_post_change_branch_tip_hooks(old_revno, old_revid)
  File "/usr/lib/python2.6/dist-packages/bzrlib/branch.py", line 1201, in _run_post_change_branch_tip_hooks
    hook(params)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/__init__.py", line 59, in auto_index_branch
    search_index.index_branch(result.branch, result.new_revid)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 321, in index_branch
    self.index_revisions(branch, revs_to_index)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 336, in index_revisions
    outer_bar)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 384, in _index_revisions
    self._add_index(builder)
  File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/search/index.py", line 440, in _add_index
    max_components = int(math.ceil(math.log(total_revisions, 2)))
ValueError: math domain error

You can report this problem to Bazaar's developers by running
    apport-bug /var/crash/bzr.1000.2011-01-22T01:54.crash
if a bug-reporting window does not automatically appear.

After that bzr told me my working tree was out of date, but that my commit was successful, according to bzr st (no modified files in src) and bzr log (last commit looks like what I tried to commit).

mg@platonas:~/src/bookserv $ bzr st
working tree is out of date, run 'bzr update'
modified:
  development.ini
  src/bookserv/controllers/book.py
unknown:
  ...
mg@platonas:~/src/bookserv $ bzr up
All changes applied successfully.
Updated to revision 469 of branch /home/mg/src/bookserv
mg@platonas:~/src/bookserv $ bzr st
modified:
  development.ini
unknown:
  ...

Every single commit now produces that ValueError.

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: bzr 2.2.1-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-25.43-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic i686
Architecture: i386
BzrDebugFlags: set()
BzrVersion: 2.2.1
CommandLine: ['/usr/bin/bzr', 'ci']
CrashDb: bzr
Date: Sat Jan 22 03:59:10 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/bzr
FileSystemEncoding: UTF-8
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
InterpreterPath: /usr/bin/python2.6
Locale: lt_LT.utf8
Platform: Linux-2.6.35-25-generic-i686-with-Ubuntu-10.10-maverick
ProcCmdline: /usr/bin/python /usr/bin/bzr ci
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=lt_LT.utf8
 LANGUAGE=lt_LT:lt:en_GB:en
 LC_CTYPE=lt_LT.UTF-8
PythonVersion: 2.6.6
SourcePackage: bzr
Title: bzr crashed with ValueError in _add_index()
UserEncoding: UTF-8
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare

Revision history for this message
Marius Gedminas (mgedmin) wrote :
tags: removed: need-duplicate-check
Martin Pool (mbp)
visibility: private → public
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.