git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: "failed to read delta base object at..."

From
Nicolas Pitre <nico@cam.org>
Date
Aug 27, 2008, 19:17 UTC
Message-ID
<alpine.LFD.1.10.0808271458320.1624@xanadu.home>
In-Reply-To
<alpine.LFD.1.10.0808270937340.3363@nehalem.linux-foundation.org>
On Wed, 27 Aug 2008, Linus Torvalds wrote:
Show 8 quoted lines
> 
> 
> 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.

And isn't the bad data block size and alignment a bit odd for a filesystem crash corruption?

Show 9 quoted lines
> 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.

However, in the pack-objects case, it is almost impossible to have such a corruption since the data is SHA1 summed immediately before being written out. In the index-pack case, it is even less likely since the data is SHA1 summed immediately after being written out. So there is no window for random pointer access corrupting the data without also influencing the pack checksum outcome. Therefore, if the pack content doesn't match its checksum, then the corruption must have occurred outside of git, otherwise the checksum would have included corrupted data already and the pack checksum would match.

Nicolas
Previous: Linus TorvaldsNext: Linus Torvalds
Message 12 of 16 in “"failed to read delta base object at..."”
  1. J. Bruce FieldsAug 25, 2008
  2. Nicolas PitreAug 25, 2008
  3. J. Bruce FieldsAug 25, 2008
  4. Linus TorvaldsAug 25, 2008
  5. J. Bruce FieldsAug 25, 2008
  6. Linus TorvaldsAug 25, 2008
  7. J. Bruce FieldsAug 25, 2008
  8. Linus TorvaldsAug 25, 2008
  9. Jason McMullanAug 26, 2008
  10. Jason McMullanAug 26, 2008
  11. Linus TorvaldsAug 27, 2008
  12. Nicolas PitreAug 27, 2008
  13. Linus TorvaldsAug 27, 2008
  14. Nicolas PitreAug 27, 2008
  15. J. Bruce FieldsAug 26, 2008
  16. Junio C HamanoAug 27, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.