darcs

Issue 2001 darcs: Codec.Compression.Zlib: premature end of compressed stream

Title darcs: Codec.Compression.Zlib: premature end of compressed stream
Priority Status needs-reproduction
Milestone 2.12.0 Resolved in
Superseder Nosy List andreas.abel, dmitry.kurochkin, ganesh
Assigned To
Topics

Created on 2010-11-21.23:28:30 by andreas.abel, last changed 2016-09-06.18:40:35 by asr.

Messages
msg13193 (view) Author: andreas.abel Date: 2010-11-21.23:28:29
Hi darcs team,

I am getting the above error on darcs commands like add, pull, record, 
...  Repairing does not help.

localhost:Agda2 abel$ darcs repair
The repository is already consistent, no changes made. 

localhost:Agda2 abel$ darcs add test/succeed/Issue366.agda 

darcs: Codec.Compression.Zlib: premature end of compressed stream

I noticed the problem with darcs 2.4.4, then upgraded to 2.5 (release), 
but it had no effect.

The broken repository is here:

   http://www2.tcs.ifi.lmu.de/~abel/Agda2-darcs-broken.tgz

I am using unison between different architectures (Mac / Linux) which 
also synchronizes the darcs patches.  So far I never had a problem with 
this strategy.  Could that have triggered the problem?

Anyway, how to proceed from here?  I have unrecorded changes I'd like to 
save.

Cheers,
Andreas



-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
msg13194 (view) Author: ganesh Date: 2010-11-22.00:15:14
The pristine tree seems to be corrupt in that a file is missing in 
_darcs/pristine.hashed (strace shows darcs failing to open it).

I don't know why darcs repair doesn't detect this (though one guess just 
occurs to me - it might only compare the hashes of pristine against the 
replayed repo, without checking that pristine is actually ok.) That 
seems like a real bug in darcs.

A simple workaround seems to be to rm -rf _darcs/pristine.hashed first, 
then rerun darcs repair.

It's not obvious how unison might have triggered the problem, but I 
guess if it got confused about a new or deleted file it may have got 
things wrong.
msg13195 (view) Author: andreas.abel Date: 2010-11-22.00:29:08
Thanks for the quick answer!

On 11/22/10 1:15 AM, Ganesh Sittampalam wrote:
>
> Ganesh Sittampalam<ganesh@earth.li>  added the comment:
>
> The pristine tree seems to be corrupt in that a file is missing in
> _darcs/pristine.hashed (strace shows darcs failing to open it).
>
> I don't know why darcs repair doesn't detect this (though one guess just
> occurs to me - it might only compare the hashes of pristine against the
> replayed repo, without checking that pristine is actually ok.) That
> seems like a real bug in darcs.
>
> A simple workaround seems to be to rm -rf _darcs/pristine.hashed first,
> then rerun darcs repair.

Darcs does not seem to like this:

localhost:Agda2 abel$ darcs check

darcs failed:  Pristine tree doesn't exist.

>
> It's not obvious how unison might have triggered the problem, but I
> guess if it got confused about a new or deleted file it may have got
> things wrong.
>
> ----------
> status: unknown ->  need-action
>
> __________________________________
> Darcs bug tracker<bugs@darcs.net>
> <http://bugs.darcs.net/issue2001>
> __________________________________
>

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
msg13196 (view) Author: andreas.abel Date: 2010-11-22.00:49:08
Ah ok, creating an empty _darcs/pristine.hashed directory and then darcs 
repair restores it.

Thanks, it seems to work again now!

Cheers,
Andreas

On 11/22/10 1:22 AM, Andreas Abel wrote:
> Thanks for the quick answer!
>
> On 11/22/10 1:15 AM, Ganesh Sittampalam wrote:
>>
>> Ganesh Sittampalam<ganesh@earth.li> added the comment:
>>
>> The pristine tree seems to be corrupt in that a file is missing in
>> _darcs/pristine.hashed (strace shows darcs failing to open it).
>>
>> I don't know why darcs repair doesn't detect this (though one guess just
>> occurs to me - it might only compare the hashes of pristine against the
>> replayed repo, without checking that pristine is actually ok.) That
>> seems like a real bug in darcs.
>>
>> A simple workaround seems to be to rm -rf _darcs/pristine.hashed first,
>> then rerun darcs repair.
>
> Darcs does not seem to like this:
>
> localhost:Agda2 abel$ darcs check
>
> darcs failed: Pristine tree doesn't exist.
>
>>
>> It's not obvious how unison might have triggered the problem, but I
>> guess if it got confused about a new or deleted file it may have got
>> things wrong.
>>
>> ----------
>> status: unknown -> need-action
>>
>> __________________________________
>> Darcs bug tracker<bugs@darcs.net>
>> <http://bugs.darcs.net/issue2001>
>> __________________________________
>>
>

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel@ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/
msg13282 (view) Author: pepeiborra Date: 2010-12-03.19:29:29
I ran into this problem with darcs 2.5, and managed to fix it thanks to 
the instructions in this page. Thanks!

However the error message could be more helpful, and the fact that darcs 
check does not notice the problem looks like a real bug to me.
msg13286 (view) Author: ganesh Date: 2010-12-03.22:50:18
Pepe, do you have any idea how you got into that situation? Just trying to 
get some sense of how it might happen.
msg19258 (view) Author: asr Date: 2016-09-06.00:05:56
FWIW, we had the same issue in Agda. It seems that problem was too many
files open

  https://github.com/agda/agda/issues/1814

The same issue is also reported in Cabal

  https://github.com/haskell/cabal/issues/2001

(The issue number in Cabal and Darcs are the same, what a coincidence!)
msg19260 (view) Author: gh Date: 2016-09-06.17:58:09
Hi Andrés,

could you describe the situation that leads to this error message, and
confirm that this occurs with the current Darcs version ?

thanks

Guillaume

2016-09-05 21:05 GMT-03:00 Andrés Sicard-Ramírez <bugs@darcs.net>:
>
> Andrés Sicard-Ramírez <asr@eafit.edu.co> added the comment:
>
> FWIW, we had the same issue in Agda. It seems that problem was too many
> files open
>
>   https://github.com/agda/agda/issues/1814
>
> The same issue is also reported in Cabal
>
>   https://github.com/haskell/cabal/issues/2001
>
> (The issue number in Cabal and Darcs are the same, what a coincidence!)
>
> __________________________________
> Darcs bug tracker <bugs@darcs.net>
> <http://bugs.darcs.net/issue2001>
> __________________________________
> _______________________________________________
> darcs-devel mailing list
> darcs-devel@darcs.net
> http://lists.osuosl.org/mailman/listinfo/darcs-devel
msg19261 (view) Author: asr Date: 2016-09-06.18:40:33
I'm not reporting the error in Darcs. I only said we had an issue with
the *same error message* in Agda.
History
Date User Action Args
2010-11-21 23:28:30andreas.abelcreate
2010-11-22 00:15:15ganeshsetstatus: unknown -> needs-reproduction
messages: + msg13194
2010-11-22 00:29:09andreas.abelsetmessages: + msg13195
title: darcs: Codec.Compression.Zlib: premature end of compressed stream -> darcs: Codec.Compression.Zlib: premature end of compressed stream
2010-11-22 00:49:09andreas.abelsetmessages: + msg13196
2010-12-03 19:29:30pepeiborrasetmessages: + msg13282
2010-12-03 22:50:19ganeshsetnosy: + ganesh
messages: + msg13286
2016-04-01 20:10:00ghsetmilestone: 2.12.0
2016-09-06 00:05:57asrsetmessages: + msg19258
2016-09-06 17:58:12ghsetmessages: + msg19260
title: darcs: Codec.Compression.Zlib: premature end of compressed stream -> darcs: Codec.Compression.Zlib: premature end of compressed stream
2016-09-06 18:40:35asrsetmessages: + msg19261