Subject: bug#56980: "corrupt input while restoring [...] from [...]" when it's just a network timeout

From: Maxime Devos <[email-masked]>
Date: Thu, 4 Aug 2022 18:07:40 +0200

X-Debbugs-CC: [email-masked]

Hi,

I recently got the following output:

> substitutie van 
> /gnu/store/yzswm5i0l0rvc01lfkb5z5lz4a85p6z8-rust-proc-macro-error-attr-1.0.4-lib 
> is klaar
> /gnu/store/zi1yc0fmq7yi564sv23h13qc97s445bb-rust-prost-derive-0.9.0-lib 
> vervangen...
> guix substitute: waarschuwing: tijdens het binnenhalen van 
> https://ci.guix.gnu.org/nar/lzip/6p12gnwvfmqbfhdhcak71dcwkgd10ir7-rust-codespan-reporting-0.11.0-[..]
> guix substitute: waarschuwing: probeer ‘--no-substitutes’ als het 
> probleem hardnekkig is
> guix substitute: fout: connect*: Verbinding is verlopen
> vervanging van 
> /gnu/store/6p12gnwvfmqbfhdhcak71dcwkgd10ir7-rust-codespan-reporting-0.11.0-lib 
> mislukt
> guix build: fout: beschadigde invoer tijdens het terugplaatsen van het 
> archief uit #<closed: file 7f80ab995e00>

i.e.:

guix substitute: warning: while fetching ~a: server is somewhat slow~%
guix substitute: warning: try `--no-substitutes' if the problem persists~%
guix substitute: error: connect*: Connection timed out
substitution of ~a failed
guix build: error: corrupt input while restoring archive from ~s~%"

Two remarks:

  * I don't think a timeout counts as "corrupted", "corrupted" sounds
    like a bit flip or such happened or that there is a bug in the nix
    archive code that causes the archive to be (non-deterministically?)
    misparsed.
  * The name of the procedure 'connect*' sounds like an implementation
    detail, could the error message be changed to plainly state it's
    just a timeout?

Maybe a duplicate of <https://issues.guix.gnu.org/23557>.

Possibly the same issue as <https://issues.guix.gnu.org/55820>?

Greetings,
Maxime