From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jason McMullan <jason.mcmullan@gmail.com>
Cc: git@vger.kernel.org, bfields@fieldses.org
Subject: Re: "failed to read delta base object at..."
Date: Wed, 27 Aug 2008 10:05:54 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.1.10.0808270937340.3363@nehalem.linux-foundation.org> (raw)
In-Reply-To: <48B46F46.9090302@gmail.com>
On Tue, 26 Aug 2008, Jason McMullan wrote:
>
> All bets are off when data=writeback.
Not the way git writes pack-files. It does a fsync() before moving them
into place (at least newer git versions do), so the data is stable.
I do worry about wild pointers. I can't recognize the data, and it
definitely doesn't look like any git internal data structures, but 16-bit
data _is_ what zlib internally uses for things like the decoding tables.
So if there is some use-after-free issue, I could imagine things like this
happening inside of git. People do occasionally run valgrind on git,
though, and it's been clean in the past, but I don't know if that has ever
been done on the threaded packing, for example.
For example, the corrupting data had patterns like this:
00 f8 bf fe 6b 57 fe ff 55 57 fe ff 97 57 fe ff
where the pattern _could_ be something like
{ 00 f8 febf },
{ 6b 57 fffe },
{ 55 57 fffe },
{ 97 57 fffe },
assuming that the "fe ff" pattern really is meaningful and is a 16-bit
little-endian word.
And the thign is, zlib "code" tables look exactly like that:
typedef struct {
unsigned char op; /* operation, extra bits, table bits */
unsigned char bits; /* bits in this part of the code */
unsigned short val; /* offset in table or code value */
} code;
/* op values as set by inflate_table():
00000000 - literal
0000tttt - table link, tttt != 0 is the number of table index bits
0001eeee - length or distance, eeee is the number of extra bits
01100000 - end of block
01000000 - invalid code
*/
but those particular op/val things don't make sense in that context
either. But I don't know zlib that well, maybe the deflate routines use
some other model.
Linus
next prev parent reply other threads:[~2008-08-27 17:07 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 16:46 "failed to read delta base object at..." J. Bruce Fields
2008-08-25 18:58 ` Nicolas Pitre
2008-08-25 21:18 ` J. Bruce Fields
2008-08-25 19:01 ` Linus Torvalds
2008-08-25 21:31 ` J. Bruce Fields
2008-08-25 21:37 ` Linus Torvalds
2008-08-25 22:13 ` J. Bruce Fields
2008-08-25 23:59 ` Linus Torvalds
2008-08-26 20:43 ` Jason McMullan
2008-08-26 21:01 ` Jason McMullan
2008-08-27 17:05 ` Linus Torvalds [this message]
2008-08-27 19:17 ` Nicolas Pitre
2008-08-27 19:48 ` Linus Torvalds
2008-08-27 20:46 ` Nicolas Pitre
2008-08-29 2:05 ` [PATCH 0/3] don't let disk corruptions escape pack SHA1 checksum Nicolas Pitre
2008-08-29 2:07 ` [PATCH 1/3] improve reliability of fixup_pack_header_footer() Nicolas Pitre
2008-08-29 2:07 ` [PATCH 2/3] pack-objects: use fixup_pack_header_footer()'s validation mode Nicolas Pitre
2008-08-29 2:07 ` [PATCH 3/3] index-pack: " Nicolas Pitre
2008-08-29 4:44 ` [PATCH 1/3] improve reliability of fixup_pack_header_footer() Shawn O. Pearce
2008-08-29 13:08 ` Nicolas Pitre
2008-08-29 14:30 ` Shawn O. Pearce
2008-08-29 20:07 ` [PATCH 0/5] pack header rewriting improvements Nicolas Pitre
2008-08-29 20:07 ` [PATCH 1/5] pack-objects: improve returned information from write_one() Nicolas Pitre
2008-08-29 20:07 ` [PATCH 2/5] improve reliability of fixup_pack_header_footer() Nicolas Pitre
2008-08-29 20:08 ` [PATCH 3/5] pack-objects: use fixup_pack_header_footer()'s validation mode Nicolas Pitre
2008-08-29 20:08 ` [PATCH 4/5] index-pack: " Nicolas Pitre
2008-08-29 20:08 ` [PATCH 5/5] fixup_pack_header_footer(): use nicely aligned buffer sizes Nicolas Pitre
2008-08-31 7:10 ` Junio C Hamano
2008-08-29 20:14 ` [PATCH 1/3] improve reliability of fixup_pack_header_footer() Nicolas Pitre
2008-08-29 4:55 ` [PATCH 0/3] don't let disk corruptions escape pack SHA1 checksum Shawn O. Pearce
2008-08-26 20:55 ` "failed to read delta base object at..." J. Bruce Fields
2008-08-27 20:14 ` Junio C Hamano
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=alpine.LFD.1.10.0808270937340.3363@nehalem.linux-foundation.org \
--to=torvalds@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=git@vger.kernel.org \
--cc=jason.mcmullan@gmail.com \
/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).