math domain error during commit

Bug #626496 reported by René Brandenburger
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr search plugin
New
Undecided
Unassigned

Bug Description

committing fails with an exception:

bzr commit scores/Aria.ly
not installing http[s]+webdav:// support (only supported for bzr 1.12 and above)
Committing to: /home/xy/lilypond/
modified scores/Aria.ly
bzr: ERROR: exceptions.ValueError: math domain erroring commits 2/4

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 911, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 1111, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 689, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.6/dist-packages/bzrlib/commands.py", line 704, 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 200, 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 2832, 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.1026.2010-08-29T22:02.crash
if a bug-reporting window does not automatically appear.

Revision history for this message
René Brandenburger (rene-brandenburger) wrote :

bzr crashfile

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

You have a problem with bzr-search plugin which (I believe) tried to update the search database on each commit.
As workaround, try to commit as:
bzr --no-plugins commit ...
or temporarly disable(delete) search plugin.

affects: bzr → bzr-search
Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 626496] [NEW] math domain error during commit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/29/2010 5:12 PM, René Brandenburger wrote:
> Public bug reported:
>
> committing fails with an exception:
>
> bzr commit scores/Aria.ly
> not installing http[s]+webdav:// support (only supported for bzr 1.12 and above)
> Committing to: /home/xy/lilypond/
> modified scores/Aria.ly
> bzr: ERROR: exceptions.ValueError: math domain erroring commits 2/4
...

> 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)))

It looks like bzr-search needs to handle when there are 0 total_revisions:

>>> import math
>>> math.log(0, 2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: math domain error

Probably this only happens on the first commit into a repository.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkx74OAACgkQJdeBCYSNAAMokwCgxI75QDQY2rlFpDckLxwaSl02
ZncAmQEyzVT1YaGxetxgMN9dVdZy/nPq
=46Q7
-----END PGP SIGNATURE-----

Revision history for this message
FabriceH (fabrice-fabriceh) wrote :

Hi,

I get similar problem during commit, push or pull.
The problem appear with upgrade version 2.2.0-1~bazaar4~lucid1
when I revert bazaar to version 2.1.1-1 I get no more problem

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.