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

Re: fatal: serious inflate inconsistency

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 8, 2007, 17:01 UTC
Message-ID
<alpine.LFD.0.98.0706080959570.4205@woody.linux-foundation.org>
In-Reply-To
<20070608153722.GL2335@cip.informatik.uni-erlangen.de>
On Fri, 8 Jun 2007, Thomas Glanzmann wrote:
> 
> yes, it is reproducable. Again I am off the net for an hour.

Could you compile your own git? If so, please try this patch on top of current git, to make the error message a bit more informative.

It does sound like a corrupt stream, but maybe debian has some strange zlib version that git doesn't like.

		Linus
---
 index-pack.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/index-pack.c b/index-pack.c
index 82c8da3..542687b 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -277,9 +277,13 @@ static void *get_data_from_pack(struct object_entry *obj)
 	stream.avail_in = len;
 	inflateInit(&stream);
 	while ((st = inflate(&stream, Z_FINISH)) == Z_OK);
+	if (st != Z_STREAM_END)
+		die("serious inflate inconsistency: %d (%s)",
+			st, stream.msg ? stream.msg : "no message");
+	if (stream.total_out != obj->size)
+		die("serious inflate inconsistency: got %lu bytes, expected %lu",
+			stream.total_out, obj->size);
 	inflateEnd(&stream);
-	if (st != Z_STREAM_END || stream.total_out != obj->size)
-		die("serious inflate inconsistency");
 	free(src);
 	return data;
 }
Previous: Nicolas PitreNext: Thomas Glanzmann
Message 7 of 17 in “fatal: serious inflate inconsistency”
  1. Thomas GlanzmannJun 8, 2007
  2. Nicolas PitreJun 8, 2007
  3. Thomas GlanzmannJun 8, 2007
  4. Thomas GlanzmannJun 8, 2007
  5. Thomas GlanzmannJun 8, 2007
  6. Nicolas PitreJun 8, 2007
  7. Linus TorvaldsJun 8, 2007
  8. Thomas GlanzmannJun 8, 2007
  9. Linus TorvaldsJun 8, 2007
  10. Linus TorvaldsJun 8, 2007
  11. Thomas GlanzmannJun 8, 2007
  12. Marco RoelandJun 8, 2007
  13. Thomas GlanzmannJun 9, 2007
  14. Thomas GlanzmannJun 9, 2007
  15. Linus TorvaldsJun 10, 2007
  16. Martin LanghoffJun 10, 2007
  17. Thomas GlanzmannJun 17, 2007

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.