crash during fast-import

Bug #590367 reported by Hans-Peter Bock
86
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Invalid
Undecided
Unassigned
bzr-fastimport (Debian)
Fix Released
Unknown
bzr-fastimport (Ubuntu)
Fix Released
Undecided
Jelmer Vernooij

Bug Description

The fast import crashed with the error message "list index out of range":

hpbock@mc:/tmp$ bzr fast-export ~/src/SercansIII/ sercansiii.fi
13:16:42 Calculating the revisions to include ...
13:16:42 Starting export of 110 revisions ...
13:16:44 Exported 110 revisions in 0:00:02

hpbock@mc:/tmp$ bzr fast-import-filter -x doc sercansiii.fi >sercansiii.nodoc.fi

hpbock@mc:/tmp$ bzr fast-import sercansiii.nodoc.fi SercansIII -v
Creating destination repository ...
Shared repository with trees (format: 2a)
Location:
  shared repository: SercansIII
13:17:06 Collecting statistics ...
13:17:06 Starting import of 105 commits ...
ABORT: exception occurred processing commit :2
bzr: ERROR: exceptions.IndexError: list index out of range

*** 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
    attaching the crash file
        /home/hpbock/.cache/crash/bzr-20100606111706-2634.crash
    and including a description of the problem.

    The crash file is plain text and you can inspect or edit it to remove
    private information.

Revision history for this message
Hans-Peter Bock (g-launchpad-avaapgh-de) wrote :
Vincent Ladeuil (vila)
affects: bzr → bzr-fastimport
a (tuomasjjrasanen)
Changed in bzr-fastimport:
status: New → Confirmed
Revision history for this message
a (tuomasjjrasanen) wrote :

Ok, I investigated this a bit and I think I found the problem.

Here is my findings:

The problem is in the https://launchpadlibrarian.net/36923622/bzr-fastimport_0.9.0~bzr261-1.diff.gz

r261 has a function branch_mapper.BranchMapper.git_to_bzr() which expects to get a git reference name string and returns bazaar equivalent. The diff file in the lucid's package however, changes this function to expect a *list* of git reference names and returns a dict mapping.

The diff file however does not modify callers accordingly.

So the easiest (and perhaps safest) solution would be to patch the diff-file?

The patch itself would be quite trivial: just modify the callers (only 4 places?). However, I can provide this if needed. It would be a good practice to get into bug-fixing business, if someone is willing to guide me through the whole process.

Revision history for this message
a (tuomasjjrasanen) wrote :

Hmmh, I am a bit too tired it seems.

"So the easiest (and perhaps safest) solution would be to patch the diff-file?"

I meant that patching the current packaged version.

However, why the behavior of git_to_bzr() is reverted to handle a list?

Revision history for this message
Kenny Meyer (knny-myer) wrote :

I had experienced the exact same error, installing `bzr-fastimport` from the Ubuntu repositories.

In the latest trunk (revno 297) on my machine this seems to be fixed as I installed it locally, tried it, and it worked perfectly.

Revision history for this message
a (tuomasjjrasanen) wrote :

Um, the tip of the trunk is at revno 276: https://code.launchpad.net/~bzr/bzr-fastimport/trunk

And yes, it works well. But the problem is the packaged version (Version: 0.9.0~bzr261-1
) of it in Lucid.

Revision history for this message
a (tuomasjjrasanen) wrote :

The bug still exists in Maverick.

The bug is introduced by the patch in the debian package. The patch actually reverts git_to_bzr() to r260. Why this patch is introduced in the first place?

The vanilla upstream works correctly, this patch should be removed in my opinion.

Jelmer Vernooij (jelmer)
Changed in bzr-fastimport:
status: Confirmed → Fix Released
Changed in bzr-fastimport (Ubuntu):
status: New → Confirmed
Changed in bzr-fastimport (Debian):
status: Unknown → New
Changed in bzr-fastimport (Debian):
status: New → Fix Released
Jelmer Vernooij (jelmer)
Changed in bzr-fastimport (Ubuntu):
status: Confirmed → Fix Released
assignee: nobody → Jelmer Vernooij (jelmer)
Changed in bzr-fastimport:
status: Fix Released → Invalid
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.