git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce.org>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: fact-import: failed to apply delta
Date: Tue, 10 Feb 2009 12:12:03 -0800	[thread overview]
Message-ID: <20090210201203.GU30949@spearce.org> (raw)
In-Reply-To: <alpine.LNX.1.00.0902101427300.19665@iabervon.org>

Daniel Barkalow <barkalow@iabervon.org> wrote:
> 
> Is there some easy way to tell what object it was having problems with 
> when it failed to unpack? I've got a whole lot of objects.

Can you use gdb to find it?  If so, walk up the stack into
fast-import.c's load_tree() function and look at sha1 here,
and also, *myoe.
 
> The expected size of the base is 1882, while the actual size is 151. The 
> base offset it found was 12.
> 
> I'm using "checkpoint" a lot, so I've got 24 packs. Two of them have tree 
> objects of size 1882 at offset 12; a different one has a tree object of 
> size 151 at offset 12. The one with the object of size 151 was the one 
> that was still open at the end. There's no tree of size 1882 in this pack, 
> nor in any other pack that has a tree of size 151.
> 
> So maybe it's right about the offsets and all, but it's confused about 
> which pack something was in? Maybe it cached something when the pack 
> containing the object it wants was open, and it ended up thinking it was 
> in the pack that's now open rather than the pack that was open and is now 
> closed?

fast-import keeps all of its object data in a single table of
"struct object_entry", the table is keyed by SHA-1.  Each entry
has a pack_id, which tells it which pack this object is in, and
the offset of the object within that pack.

Sounds like maybe its confusing the pack pointer in the all_packs
array (see gfi_unpack_entry).
 
> I don't suppose there would be an easy way to figure out the object it was 
> trying to unpack by applying the delta?

Not really.  You'd have to write code for this.  Or, since the pack
closes and you can index it, use "verify-pack -v" to find the object
starting at the offset you know its having trouble with, that should
tell you the object's SHA-1.

-- 
Shawn.

  reply	other threads:[~2009-02-10 20:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10  3:26 fact-import: failed to apply delta Daniel Barkalow
2009-02-10 10:28 ` Johannes Schindelin
2009-02-10 15:56   ` Shawn O. Pearce
2009-02-10 17:15     ` Daniel Barkalow
2009-02-10 17:22       ` Shawn O. Pearce
2009-02-10 17:47         ` Daniel Barkalow
2009-02-10 19:12           ` Shawn O. Pearce
2009-02-10 20:03             ` Daniel Barkalow
2009-02-10 20:12               ` Shawn O. Pearce [this message]
2009-02-10 21:19                 ` Daniel Barkalow
2009-02-10 21:25                   ` Shawn O. Pearce
2009-02-10 21:32                     ` Daniel Barkalow
2009-02-10 21:36                       ` Shawn O. Pearce
2009-02-10 21:51                         ` Daniel Barkalow
2009-02-10 22:30                         ` Junio C Hamano
2009-02-10 22:47                           ` Junio C Hamano
2009-02-10 23:09                             ` Shawn O. Pearce
2009-02-10 23:15                               ` Junio C Hamano
2009-02-10 23:16                                 ` Shawn O. Pearce
2009-02-10 23:32                                   ` Junio C Hamano
2009-02-11 18:09                             ` Daniel Barkalow
2009-02-11 18:15                               ` Shawn O. Pearce
2009-02-11 18:30                                 ` Junio C Hamano
2009-02-11 18:33                                 ` Daniel Barkalow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090210201203.GU30949@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).