dirstate IndexError in update_minimal

Bug #455696 reported by Neil Martinsen-Burrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

I'm seeing the following traceback from dirstate while driving bzrlib to manipulate a tree. The application has a stochastic component, so this condition is reproducible, but not every time.

Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "transition.py", line 46, in evolve
    tree = transition.step(tree)
  File "transition.py", line 66, in step
    tree = mutator.mutate(tree)
  File "mutators.py", line 241, in mutate
    _move(f, choice(directories))
  File "mutators.py", line 235, in _move
    input_tree.move(fromfile, to_path)
  File "bzrtreebranch.py", line 201, in move
    self._tree.rename_one(path, destination)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1245, in rename_one
    WorkingTree.rename_one(self, from_rel, to_rel, after)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1535, in rename_one
    self._write_inventory(inv)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 52, in tree_write_locked
    return unbound(self, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 1270, in _write_inventory
    self.current_dirstate().set_state_from_inventory(inv)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/dirstate.py", line 2629, in set_state_from_inventory
    fullscan=True)
  File "/Library/Frameworks/Python.framework/Versions/5.0.0/lib/python2.5/site-packages/bzrlib/dirstate.py", line 2797, in update_minimal
    other_key = list(existing_keys)[0]
IndexError: list index out of range

I can provide any necessary debugging info, including a copy of the application if necessary.

Tags: dirstate
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 455696] [NEW] dirstate IndexError

What bzrlib version?

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

On 2009-10-19 14:28 , Robert Collins wrote:
> What bzrlib version?

bzr.dev r4757. I'm working on getting the program that can reproduce
this online.

Revision history for this message
John A Meinel (jameinel) wrote :

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

Neil Martinsen-Burrell wrote:
> Public bug reported:
>
> I'm seeing the following traceback from dirstate while driving bzrlib to
> manipulate a tree. The application has a stochastic component, so this
> condition is reproducible, but not every time.
>

Since this is based on a 'rename_one', my guess is that it is a bug that
Robert Collins recently fixed. Which has to do with:

 add foo/b
 rename foo/b foo/a

(renaming a directory to a name that sorts earlier, inbetween adding
that directory and before you commit.)

I don't have a bug offhand, but I recall it was fixed recently.

John
=:->

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

iEYEARECAAYFAkrd3ScACgkQJdeBCYSNAANvjQCdEKjdwjNXQtv892hLhIP/qyFD
HnwAoIUEIcbk5/bqdlJCspcnsW8+qaTQ
=jrdT
-----END PGP SIGNATURE-----

Revision history for this message
Matthew Fuller (fullermd) wrote : Re: dirstate IndexError

You're thinking of bug 403322. But that landed in bzr.dev:4723.

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote : Re: [Bug 455696] [NEW] dirstate IndexError

On 2009-10-20 10:54 , John A Meinel wrote:
>> I'm seeing the following traceback from dirstate while driving bzrlib to
>> manipulate a tree. The application has a stochastic component, so this
>> condition is reproducible, but not every time.
>>
>
> Since this is based on a 'rename_one', my guess is that it is a bug that
> Robert Collins recently fixed. Which has to do with:
>
> add foo/b
> rename foo/b foo/a
>
> (renaming a directory to a name that sorts earlier, inbetween adding
> that directory and before you commit.)
>
> I don't have a bug offhand, but I recall it was fixed recently.

Unfortunately, I still see this with the latest bzr.dev. To reproduce:

1. pull my current project, MCREPOGEN: bzr pull lp:~nmb/+junk/mcrepogen
2. Make sure you have Numpy and Ian's bzr-fastimport plugin installed.
3. Do ./mcrepogen.py -r 1500 -o test.fi

This will generate 1500 random revisions and output them in fast-export
format to test.fi. I see the bug usually within the first 200 revisions.

Martin Pool (mbp)
summary: - dirstate IndexError
+ dirstate IndexError in update_minimal
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: dirstate
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.