Comment 18 for bug 709349

Revision history for this message
Andrew Bennetts (spiv) wrote :

A quick update on where I am:

This code is pretty racy. There's definitely the race that John describes, but I suspect there are others. The breakbzr.py script fails in a variety of different ways, depending (presumably) on timing:

 * NoSuchRevision during _walk_to_common_revisions.
 * KeyError: 0, during iter_entries in btree_index.py
 * ShortReadvErrors reading cix files that are half the expected size, also during iter_entries
 * FileExists as John reports, if using a filesystem/OS that doesn't allow renaming over existing files.
 * NoSuchFile when one process obsoletes a pack another process is concurrently adding

Doing the move to obsolete during the critical section doesn't appear to be sufficient.

I'm working making the state involved more explicit and thus more testable, so we can comprehensively test the many possible races.