Skip to contentSkip to conversation

Problem with pack

DISCUSSION Sergio Callegari 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw
Quoted 33 lines
Quoted 6 lines · Junio C Hamano

Earlier you said "unpack-objects <$that-pack.pack" fails with "error code -3 in inflate..." What exact error do you get? I am guessing that it is get_data() which says:

"inflate returned %d\n"

Quoted 7 lines

(side note: we should not say \n there).
...
This pattern appears practically everywhere...
... I've been
wondering if it is possible for inflate to eat some input but that was not enough to produce one byte of output, and what [it] would return in such a case...

I do not think this fear does not apply to this particular case; return value -3 is Z_DATA_ERROR, so the deflated stream is corrupt.

Quoted 2 lines

So there are only a few ways you can get that error message.
...

I just realized there is another not so inplausible explanation.

When the problematic pack was made on the mothership, csum-file.c::sha1write_compressed() gave the data for the base object to zlib, an alpha particle hit a memory cell that contained zlib output buffer (resulting in a corrupt deflated stream in variable "out"), and sha1write() wrote it out while computing the right checksum.

Quoted 4 lines

Is the memory on your mothership reliable (I do not want to make this message sound like one on the kernel list, but memtest86 might be in order)?

For sure you can never say, but so far I have never had any problem with that machine nor I had any after this incident...

Sergio

Quoted 4 lines