bzr historycache crashes against the new MergeSort code

Bug #471301 reported by Patrick Regan on 2009-11-02
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar History Cache
Undecided
Unassigned

Bug Description

Some overhead information. I was trying to find when I changed out a feature in my branch, so I thought it would be a perfect job for bisect. I first did bisect start, and then said bisect no, since the HEAD did not have my feature I was looking for. I am on a Windows XP SP3 machine (wish it was Ubuntu trust me), and calling it through the PowerShell. I just ran the 2.0 installer and I don't have a full Python stack installed. Here is the traceback I've been getting.

PS Z:\HARP\mntclLoc> bzr bisect no
bzr: ERROR: exceptions.TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 371, in run
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 408, in no
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 343, in _set_state
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 267, in bisect
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 198, in _switch_wc_to_revno
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 78, in show_rev_log
  File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 60, in get_current_revno
  File "bzrlib\decorators.pyo", line 138, in read_locked
  File "bzrlib\branch.pyo", line 380, in get_revision_id_to_revno_map
  File "bzrlib\branch.pyo", line 400, in _gen_revno_map
  File "C:/Program Files/Bazaar/plugins\historycache\__init__.py", line 175, in historycache_iter_msr_method
  File "C:/Program Files/Bazaar/plugins\historycache\revnocache.py", line 149, in update
TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable

bzr 2.0.0 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'bisect', 'no']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bisect C:\Program Files\Bazaar\plugins\bisect [1.1.0.pre.0]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.1]
  diffstat C:\Program Files\Bazaar\plugins\diffstat [0.2.0]
  dns_cache C:\Program Files\Bazaar\plugins\dns_cache [unknown]
  explorer C:\Program Files\Bazaar\plugins\explorer [0.8.2]
  historycache C:\Program Files\Bazaar\plugins\historycache [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.0]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.0.0]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.14.2]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.3]
  search C:\Program Files\Bazaar\plugins\search [1.7.0dev]
  stats C:\Program Files\Bazaar\plugins\stats [unknown]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.5]

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.

I'm not sure if this problem is me or a bug, but I'm not allowed to go onto IRC at work so I didn't know where else to post.

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

Patrick Regan wrote:
> Public bug reported:
>
> Some overhead information. I was trying to find when I changed out a
> feature in my branch, so I thought it would be a perfect job for bisect.
> I first did bisect start, and then said bisect no, since the HEAD did
> not have my feature I was looking for. I am on a Windows XP SP3 machine
> (wish it was Ubuntu trust me), and calling it through the PowerShell. I
> just ran the 2.0 installer and I don't have a full Python stack
> installed. Here is the traceback I've been getting.
>
> PS Z:\HARP\mntclLoc> bzr bisect no
> bzr: ERROR: exceptions.TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable
>
> Traceback (most recent call last):
> File "bzrlib\commands.pyo", line 842, in exception_to_return_code
> File "bzrlib\commands.pyo", line 1037, in run_bzr
> File "bzrlib\commands.pyo", line 654, in run_argv_aliases
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 371, in run
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 408, in no
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 343, in _set_state
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 267, in bisect
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 198, in _switch_wc_to_revno
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 78, in show_rev_log
> File "C:/Program Files/Bazaar/plugins\bisect\__init__.py", line 60, in get_current_revno
> File "bzrlib\decorators.pyo", line 138, in read_locked
> File "bzrlib\branch.pyo", line 380, in get_revision_id_to_revno_map
> File "bzrlib\branch.pyo", line 400, in _gen_revno_map
> File "C:/Program Files/Bazaar/plugins\historycache\__init__.py", line 175, in historycache_iter_msr_method
> File "C:/Program Files/Bazaar/plugins\historycache\revnocache.py", line 149, in update
> TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable
>

^- This isn't from 'bisect', this is a bad interaction of 'historycache'
with a newer version of bzrlib. You probably want to either update
historycache or disable it entirely.

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

iEYEARECAAYFAkrvF+sACgkQJdeBCYSNAAMx0wCfRJyQwyCU5hvL0IWO/Du7Dfbx
pWEAoId1ib9+QRZXVa/EgdXXKV9RsjBF
=OFbd
-----END PGP SIGNATURE-----

affects: bzr-bisect → bzr-historycache
summary: - bzr bisect no crashes on win32
+ bzr historycache crashes against the new MergeSort code
Patrick Regan (patrick-regan) wrote :

Apologies, I should have seen the calls to the history cache plugin. Thank you for steering me in the right direction. I can at least disable that plugin for now. If you require further information, please let me know.

tags: removed: win32
GuilhemBichot (guilhem-bichot) wrote :

I have the latest historycache from lp (revno 28) and a few-days-old bzr.dev. "bzr log -n0" crashes with the same message as above; no crash without -n0. Any of
history-cache-revnos = on
history-cache-graph = on
leads to the crash.

Eli Zaretskii (eliz) wrote :

Here, too (Windows XP SP2, bzr 2.0.3, latest revno 28 of historycache. "bzr log -n N" for any N except 1 crashes. In fact, it crashes even if I remove the history-cache-* settings from branch.conf; only removing the plugins/historycache directory stops the crashes.

Here's my traceback from .bzr.log, in case it helps:

Sat 2010-01-23 11:38:04 +0200
0.125 bzr arguments: [u'log', u'--short', u'-n1']
0.156 looking for plugins in C:/Documents and Settings/Zaretzky/Application Data/bazaar/2.0/plugins
0.156 looking for plugins in D:/usr/Bazaar/plugins
0.531 encoding stdout as sys.stdout encoding 'cp1252'
2.281 return code 0

Sat 2010-01-23 11:38:08 +0200
0.110 bzr arguments: [u'log', u'--short', u'-n2']
0.125 looking for plugins in C:/Documents and Settings/Zaretzky/Application Data/bazaar/2.0/plugins
0.125 looking for plugins in D:/usr/Bazaar/plugins
0.500 encoding stdout as sys.stdout encoding 'cp1252'
0.844 failed to open D:/gnu/bzr/emacs/trunk/.bzr/branch/historycache/graph-cache: [Errno 2] No such file or directory: u'D:/gnu/bzr/emacs/trunk/.bzr/branch/historycache/graph-cache'
8.735 load of revno-cache (0 entries) took 0.00 secs
8.735 Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "D:/usr/Bazaar/plugins\historycache\__init__.py", line 225, in run
  File "bzrlib\commands.pyo", line 1052, in ignore_pipe
  File "bzrlib\builtins.pyo", line 2355, in run
  File "bzrlib\log.pyo", line 330, in show
  File "bzrlib\log.pyo", line 354, in _show_body
  File "bzrlib\log.pyo", line 389, in iter_log_revisions
  File "bzrlib\log.pyo", line 871, in _make_revision_objects
  File "bzrlib\log.pyo", line 896, in _make_batch_filter
  File "bzrlib\log.pyo", line 725, in _convert
  File "bzrlib\log.pyo", line 648, in _graph_view_revisions
  File "D:/usr/Bazaar/plugins\historycache\__init__.py", line 175, in historycache_iter_msr_method
  File "D:/usr/Bazaar/plugins\historycache\revnocache.py", line 149, in update
TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable

8.750 couldn't find apport bug-reporting library: No module named apport
8.782 Traceback (most recent call last):
  File "bzrlib\plugin.pyo", line 407, in _get__version__
  File "bzrlib\lazy_import.pyo", line 125, in __call__
  File "bzrlib\__init__.pyo", line 112, in _format_version_tuple
ValueError: version_info (1, 1, 0, 'pre', 0) not valid

8.797 return code 4

Eli Zaretskii (eliz) wrote :

More than a year later, the crash is still happening (with bzr 2.3.3 on Windows XP).

TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not iterable

It's a pity such a serious performance enhancement cannot be used.

Is it possible to fix this, please?

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

On 5/24/2011 7:37 AM, Eli Zaretskii wrote:
> More than a year later, the crash is still happening (with bzr 2.3.3 on
> Windows XP).
>
> TypeError: 'bzrlib._known_graph_pyx._MergeSortNode' object is not
> iterable
>
> It's a pity such a serious performance enhancement cannot be used.
>
> Is it possible to fix this, please?
>

I'm not 100% sure, but I think bzr-historydb does everything that
bzr-historycache did, only does it better (more scalable, etc).

You have to configure that plugin a bit, but feedback from there would
be useful.

John
=:->

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

iEYEARECAAYFAk3biWoACgkQJdeBCYSNAAPrxQCeN4ufoO4UlCVEJiX8fMPSgnjo
kCgAnjBdtY565fgOxyB9FpdsnyM9d6rn
=/PEH
-----END PGP SIGNATURE-----

Eli Zaretskii (eliz) wrote :

Thanks, I installed it.

However, could someone "in the know" please post some minimal documentation forf it? All I have is what "bzr help history_db" shows, which isn't much:

  D:\gnu\bzr>bzr help history_db
  Store history information in a database.

  Set "history_db_path" (in branch.conf, locations.conf, etc) to the location
  where you would like to store your history database. Then use
  history-db-create to import the branch's history into the database. The
  database will be created if it does not already exist.

That's it! It doesn't say what will happen after the db is created, nor which commands are expected to be affected, nothing. bzr-historycache, by contrast, was quite explicit wrt to what ops it tries to speed up.

Likewise, "bzr help history-db-create" leaves virtually unexplained some of its options: --incremental
and --expand-all, at least.

Any additional info will be appreciated.

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

Other bug subscribers