"BzrCheckError: Internal check failed: Newly created pack file <bzrlib.repofmt.pack_repo.NewPack object at 0x2e23f90> has delta references to items not in its repository:" on pushing a stacked branch

Bug #302698 reported by Michael Hudson-Doyle
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

The traceback is in https://pastebin.canonical.com/11584/. Sorry about the private pastebin.

It seems reproducible pushing over a branch that mostly existed on the remote side. I'm trying to push it afresh now.

Tags: packs stacking
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

And I get this pushing to a new branch:

mwh@grond:manual-stacking-on-launchpad-branches-bug-272372$ bzr push bzr+ssh://bazaar.launchpad.net/~mwhudson/launchpad/manual-stacking-on-launchpad-branches-bug-272372-2
Using default stacking branch /~launchpad-pqm/launchpad/devel at bzr+ssh://bazaar.launchpad.net/%7Emwhudson/launchpad/
bzr: ERROR: Revision {('<email address hidden>',)} not present in "KnitVersionedFiles(_KnitGraphIndex(CombinedGraphIndex()), <bzrlib.knit._DirectPackAccess object at 0x1720f50>)".

Martin Pool (mbp)
Changed in bzr:
assignee: nobody → mbp
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Robert Collins (lifeless) wrote :

for the mostly-there case, I think its a damaged-by-previous-code case; it needs repair as all such cases do.

For the new push, I think there is a different problem - a backtrace would be good.

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

Robert: There's a traceback in the linked pastebin. It's occurring inside an autopack, so it seems likely to be the "damaged-by-previous-code" case?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 302698] Re: "BzrCheckError: Internal check failed: Newly created pack file <bzrlib.repofmt.pack_repo.NewPack object at 0x2e23f90> has delta references to items not in its repository:" on pushing a stacked branch

On Sun, 2008-12-14 at 21:58 +0000, Andrew Bennetts wrote:
> Robert: There's a traceback in the linked pastebin. It's occurring
> inside an autopack, so it seems likely to be the "damaged-by-previous-
> code" case?

Thats my theory; opening the repository (not the branch!) and doing an
extraction of every key in repo.texts.keys would confirm.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

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

In related news, I think I've found a (the?) major cause of this problem in newly created repositories. When pushing a new branch to Launchpad that
 a) triggers the "Using default stacking branch" logic, and
 b) has a source branch in an unstackable format,
it appears that the first push will push a stacked repository, and then put an unstackable branch format on it. A subsequent push finds an unstacked branch, and thus also finds that the target repository is almost certainly missing parents for any delta records it adds. I'll send patch to the list shortly.

Revision history for this message
Konrad Wojas (kwojas) wrote :

I don't know if this contribution is useful, but I get a similar error message when attempting a bzr merge on a repository I haven't touched for a few weeks, see attachment.

Revision history for this message
Robert Collins (lifeless) wrote :

On Tue, 2008-12-30 at 16:47 +0000, Konrad Wojas wrote:
> I don't know if this contribution is useful, but I get a similar error
> message when attempting a bzr merge on a repository I haven't touched
> for a few weeks, see attachment.

Its likely that your repository has the same issue - that you have delta
references that make the some texts in the repository only extractable
in conjunction with a basis repository; this is not the intended
behaviour but was caused by an early bug with stacking.

You can fix that by recreating the repository that you are merging into
and pulling your content into it.

-Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Stuart Bishop (stub) wrote :

I just struck this.

The repository was newly upgraded to 1.9 format. The branch was old, so was pulled from the more up to date hosted branch and a single new revision added.

Pushing to a new launchpad hosted branch worked.

Revision history for this message
Petr Viktorin (encukou) wrote :

I just ran into the same error when uploading a branch to Launchpad.
When I registered a branch first, then pushed to it with --use-existing-dir, everything seemed fine:

$ bzr push lp:~bzr-upload-devs/bzr-upload/journalled --use-existing-dir
Using default stacking branch /~bzr-upload-devs/bzr-upload/trunk at bzr+ssh://bazaar.launchpad.net/%7Ebzr-upload-devs/bzr-upload/
Created new branch.
$ bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~bzr-upload-devs/bzr-upload/journalled/
No new revisions to push.

But on Launchpad, the BzrCheckError is displayed, and branching from Launchpad fails.
See https://code.launchpad.net/~bzr-upload-devs/bzr-upload/journalled

The same happens when pushing to a new branch (not previously registered, without --use-existing-dir).

As long as my server isn't down, the branch will be available at http://encukou.cz/petr/bzr/buggy-branch if you want it to test something with it.

Revision history for this message
Petr Viktorin (encukou) wrote :

Update: I committed another revision, deleted the Launchpad branch with the error, pushed again and everything works.

Jelmer Vernooij (jelmer)
tags: added: packs
Martin Pool (mbp)
Changed in bzr:
assignee: Martin Pool (mbp) → nobody
Jelmer Vernooij (jelmer)
tags: added: stacking
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
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.