From: "Magnus Bäck" <magnus.back@sonyericsson.com>
To: git@vger.kernel.org
Subject: Inspecting a corrupt git object
Date: Wed, 4 Aug 2010 11:25:30 +0200 [thread overview]
Message-ID: <20100804092530.GA30070@jpl.local> (raw)
We recently discovered a git tree object corruption in one of our
busiest gits on the master server. From what I can tell "git cat-file -p"
output looked just fine, but "git gc" complained loudly about the object
being corrupt. I had the same git cloned on my machine and found (after
unpacking the packfiles) that my object was different from the one on
the server. Same size and everything, but the second byte (and only the
second byte) differed between good and bad object.
$ head -n 5 /tmp/hexdump_corrupt.txt
00000000 78 9c 2b 29 4a 4d 55 30 32 36 62 30 34 30 30 33 |x.+)JMU026b04003|
00000010 31 51 70 cc 4b 29 ca cf 4c d1 cb cd 66 a8 38 dd |1Qp.K)..L...f.8.|
00000020 76 77 82 ba af da a1 66 06 b9 b4 03 66 9d 27 18 |vw.....f....f.'.|
00000030 93 ec 50 55 f9 26 e6 65 a6 a5 16 97 e8 55 e4 e6 |..PU.&.e.....U..|
00000040 30 d8 98 fe a9 93 98 cc be 24 a4 ac 93 3b 43 b7 |0........$...;C.|
$ head -n 5 /tmp/hexdump_okay.txt
00000000 78 01 2b 29 4a 4d 55 30 32 36 62 30 34 30 30 33 |x.+)JMU026b04003|
00000010 31 51 70 cc 4b 29 ca cf 4c d1 cb cd 66 a8 38 dd |1Qp.K)..L...f.8.|
00000020 76 77 82 ba af da a1 66 06 b9 b4 03 66 9d 27 18 |vw.....f....f.'.|
00000030 93 ec 50 55 f9 26 e6 65 a6 a5 16 97 e8 55 e4 e6 |..PU.&.e.....U..|
00000040 30 d8 98 fe a9 93 98 cc be 24 a4 ac 93 3b 43 b7 |0........$...;C.|
From what I gather from the community book and Pro Git, a git object
file is a deflated representation of the object type as a string, the
payload size, a null byte, and the payload. Is there a standard tool for
inflating the file back so that I can inspect what the actual difference
between these two are? Short of writing a tool utilizing zlib, at least.
Any other ideas why we would see such a difference? Hardware
malfunction or memory corruption I guess, but something else?
I can supply the actual object files if necessary.
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
next reply other threads:[~2010-08-04 9:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-04 9:25 Magnus Bäck [this message]
2010-08-04 9:48 ` Inspecting a corrupt git object Alejandro Riveira Fernández
2010-08-04 13:09 ` Magnus Bäck
2010-08-04 9:48 ` Thomas Rast
2010-08-04 13:02 ` Magnus Bäck
2010-08-04 11:11 ` Holger Hellmuth
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=20100804092530.GA30070@jpl.local \
--to=magnus.back@sonyericsson.com \
--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).