KeyError in remove_index should be handled as a cleanup

Bug #423015 reported by heretoo
76
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Andrew Bennetts
Bazaar Subversion Plugin
Fix Released
Undecided
Unassigned

Bug Description

After running svn-import on a reasonably large repository (80k+ revisions), i receive a KeyError.

D:\Baselines\bzr>"c:\Program Files (x86)\Bazaar\bzr.exe" svn-import svn://svnserver11/myproject

Using repository layout: trunk0

bzr: ERROR: exceptions.KeyError: GraphIndex('file:///D:/Baselines/bzr/myproject/.bzr/repository/indices/3fdd06405c0bc92c4

Traceback (most recent call last):

  File "bzrlib\commands.pyo", line 835, in exception_to_return_code

  File "bzrlib\commands.pyo", line 1030, in run_bzr

  File "bzrlib\commands.pyo", line 647, in run_argv_aliases

  File "C:/Program Files (x86)/Bazaar/plugins\svn\commands.py", line 176, in run

  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 365, in convert_repository

  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 242, in __init__

  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 290, in _fetch_to_shared_repo

  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 1285, in fetch

  File "bzrlib\repofmt\pack_repo.pyo", line 2322, in unlock

  File "bzrlib\repository.pyo", line 931, in abort_write_group

  File "bzrlib\repofmt\pack_repo.pyo", line 2216, in _abort_write_group

  File "bzrlib\repofmt\pack_repo.pyo", line 2039, in _abort_write_group

  File "bzrlib\repofmt\pack_repo.pyo", line 1816, in _remove_pack_indices

  File "bzrlib\repofmt\pack_repo.pyo", line 643, in remove_index

KeyError: GraphIndex('file:///D:/Baselines/bzr/myproject/.bzr/repository/indices/3fdd06405c0bc92c4760c87cb6396396.rix')

bzr 1.18rc1 on python 2.5.4 (win32)

arguments: ['c:\\Program Files (x86)\\Bazaar\\bzr.exe', 'svn-import', 'svn://svnserver11/myproject']

encoding: 'cp1252', fsenc: 'mbcs', lang: None

plugins:

  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [1.18]

  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [1.18rc1]

  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [1.18rc1]

  pipeline C:\Users\ts\AppData\Roaming\bazaar\2.0\plugins\pipeline [unknown]

  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.13.1]

  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.3]

  svn C:\Program Files (x86)\Bazaar\plugins\svn [0.6.4]

*** Bazaar has encountered an internal error.

    Please report a bug at https://bugs.launchpad.net/bzr/+filebug

    including this traceback, and a description of what you

    were doing when the error occurred.

Related branches

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is probably masking some other error.

Is the repository you're trying to import public?

Revision history for this message
heretoo (tristanstraub) wrote : Re: [Bug 423015] Re: svn-import raises KeyError on large repository

Unfortunately it's a repository at work which isn't public. Is there
anything I can try to narrow it down?

2009/9/8 Jelmer Vernooij <email address hidden>:
> This is probably masking some other error.
>
> Is the repository you're trying to import public?
>
> --
> svn-import raises KeyError on large repository
> https://bugs.launchpad.net/bugs/423015
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Subversion branch support for Bazaar: New
>
> Bug description:
>
>
> After running svn-import on a reasonably large repository (80k+ revisions), i receive a KeyError.
>
> D:\Baselines\bzr>"c:\Program Files (x86)\Bazaar\bzr.exe" svn-import svn://svnserver11/myproject
>
> Using repository layout: trunk0
>
> bzr: ERROR: exceptions.KeyError: GraphIndex('file:///D:/Baselines/bzr/myproject/.bzr/repository/indices/3fdd06405c0bc92c4
>
> Traceback (most recent call last):
>
>  File "bzrlib\commands.pyo", line 835, in exception_to_return_code
>
>  File "bzrlib\commands.pyo", line 1030, in run_bzr
>
>  File "bzrlib\commands.pyo", line 647, in run_argv_aliases
>
>  File "C:/Program Files (x86)/Bazaar/plugins\svn\commands.py", line 176, in run
>
>  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 365, in convert_repository
>
>  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 242, in __init__
>
>  File "C:/Program Files (x86)/Bazaar/plugins\svn\convert.py", line 290, in _fetch_to_shared_repo
>
>  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 1285, in fetch
>
>  File "bzrlib\repofmt\pack_repo.pyo", line 2322, in unlock
>
>  File "bzrlib\repository.pyo", line 931, in abort_write_group
>
>  File "bzrlib\repofmt\pack_repo.pyo", line 2216, in _abort_write_group
>
>  File "bzrlib\repofmt\pack_repo.pyo", line 2039, in _abort_write_group
>
>  File "bzrlib\repofmt\pack_repo.pyo", line 1816, in _remove_pack_indices
>
>  File "bzrlib\repofmt\pack_repo.pyo", line 643, in remove_index
>
> KeyError: GraphIndex('file:///D:/Baselines/bzr/myproject/.bzr/repository/indices/3fdd06405c0bc92c4760c87cb6396396.rix')
>
> bzr 1.18rc1 on python 2.5.4 (win32)
>
> arguments: ['c:\\Program Files (x86)\\Bazaar\\bzr.exe', 'svn-import', 'svn://svnserver11/myproject']
>
> encoding: 'cp1252', fsenc: 'mbcs', lang: None
>
> plugins:
>
>  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [1.18]
>
>  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [1.18rc1]
>
>  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [1.18rc1]
>
>  pipeline C:\Users\ts\AppData\Roaming\bazaar\2.0\plugins\pipeline [unknown]
>
>  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.13.1]
>
>  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.3]
>
>  svn C:\Program Files (x86)\Bazaar\plugins\svn [0.6.4]
>
> *** Bazaar has encountered an internal error.
>
>    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
>
>    including this traceback, and a description of what you
>
>    were doing when the error occurred.
>

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: svn-import raises KeyError on large repository

reassigning to bzr - this seems like a bug in Repository.abort_write_group()

affects: bzr-svn → bzr
Revision history for this message
Martin Pool (mbp) wrote :

See bug 429747 for handling of errors in cleanup

Vincent Ladeuil (vila)
affects: bzr → bzr-svn
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

heretoo, can you perhaps comment out the cleanup code (call to Repository.abort_write_group()) and see what error you get then?

Revision history for this message
Martin Pool (mbp) wrote :

bug 504715 seems to reproduce this in 2.0.1 - or at least the same secondary exception.

Perhaps we can use bzrlib.cleanup to make this more transparent.

summary: - svn-import raises KeyError on large repository
+ KeyError in remove_index branching from svn
Martin Pool (mbp)
Changed in bzr:
status: New → In Progress
assignee: nobody → Martin Pool (mbp)
Martin Pool (mbp)
summary: - KeyError in remove_index branching from svn
+ KeyError in remove_index should be handled as a cleanup
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → Medium
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

the bzr-svn part of this seems to have been fixed.

Changed in bzr-svn:
status: New → Fix Released
Revision history for this message
Martin Pool (mbp) wrote :

I didn't actually do anything on this. Spiv, it may be easiest for you to pick it up because you fixed some similar bugs.

Changed in bzr:
assignee: Martin Pool (mbp) → nobody
status: In Progress → Confirmed
Revision history for this message
Andrew Bennetts (spiv) wrote :

Sure, I'll look at this.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
status: Confirmed → In Progress
Revision history for this message
Andrew Bennetts (spiv) wrote :

I've just pushed up a branch that should thoroughly addresses the bzr part of this, although I think 2.1.0b1 may have already addressed this adequately with the addition of the "@only_raises(errors.LockNotHeld, errors.LockBroken)" decorator for Repository.unlock.

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

Fixed in bzr's 2.1 branch.

Changed in bzr:
status: In Progress → Fix Released
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.