GNU bug report logs - #71160
--fallback and (fallback #t) do not apply when receiving a corrupt nar

Previous Next

Package: guix;

Reported by: Richard Sent <richard <at> freakingpenguin.com>

Date: Fri, 24 May 2024 03:30:02 UTC

Severity: normal

To reply to this bug, email your comments to 71160 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#71160; Package guix. (Fri, 24 May 2024 03:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Richard Sent <richard <at> freakingpenguin.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 24 May 2024 03:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: bug-guix <at> gnu.org
Subject: --fallback and (fallback #t) do not apply when receiving a corrupt nar
Date: Thu, 23 May 2024 23:28:33 -0400
Hi Guix!

As part of building linux-libre-arm64-generic, Guix tries substituting
linux-libre-arm64-generic.tar.xz. Unfortunately it looks like a corrupt
nar snuck into bordeaux.

--8<---------------cut here---------------start------------->8---
root <at> lifeline ~# guix build linux-libre-arm64-generic --system=aarch64-linux --fallback
The following derivations will be built:
  /gnu/store/9626zaczwl5x4ypxmmdklvkclqx2dlpi-linux-libre-arm64-generic-6.8.10.drv
  /gnu/store/1wi10rg7236ck8k5vdrdfap5l7a9s9z0-linux-libre-6.8.10-guix.tar.xz.drv
199.7 MB will be downloaded:
# Snip
  /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz
substituting /gnu/store/0jfsx4hljddyand45z7i77ynpvr0mhb5-module-import-compiled...
downloading from https://bordeaux.guix.gnu.org/nar/lzip/0jfsx4hljddyand45z7i77ynpvr0mhb5-module-import-compiled ...
 module-import-compiled  171KiB                                                                                     676KiB/s 00:00 ▕██████████████████▏ 100.0%

substituting /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz...
downloading from https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz ...
 linux-libre-6.8.10-guix.tar.xz  136.5MiB                                                                          20.5MiB/s 00:06 ▕█████████████████▌▏  97.6%guix substitute: error: corrupt input while restoring '/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' from #<input: string 7f1190966ee0>
substitution of /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz failed
guix build: error: corrupt input while restoring archive from #<closed: file 7fea23dffaf0>
root <at> lifeline ~# 
--8<---------------cut here---------------end--------------->8---

Trying to pass --fallback on the command line has no effect, even though
both the documentation and [1] imply that should work.

Similarly with Cuirass, I have a spec that tries to build an
operating-system with a linux-libre-arm64-generic kernel. Even though
cuirass-configuration has (fallback #t), no attempt is made to recover
by building the derivation locally.

--8<---------------cut here---------------start------------->8---
;; In config
(define %rsent-cuirass-service
  (service cuirass-service-type
           (cuirass-configuration
            (specifications %rsent-cuirass-specs)
            (host "0.0.0.0")
            (fallback? #t))))

;; From /var/log/cuirass.log
2024-05-23 22:23:36 Uncaught exception in task:
2024-05-23 22:23:36 In fibers.scm:
2024-05-23 22:23:36     172:8  8 (_)
2024-05-23 22:23:36 In ice-9/boot-9.scm:
2024-05-23 22:23:36   1752:10  7 (with-exception-handler _ _ #:unwind? _ # _)
2024-05-23 22:23:36 In guix/store.scm:
2024-05-23 22:23:36    684:37  6 (thunk)
2024-05-23 22:23:36 In cuirass/base.scm:
2024-05-23 22:23:36    421:14  5 (_ _)
2024-05-23 22:23:36    267:10  4 (spawn-builds #<store-connection 256.100 7ff1213670f0> _ ?)
2024-05-23 22:23:36 In ice-9/boot-9.scm:
2024-05-23 22:23:36   1752:10  3 (with-exception-handler _ _ #:unwind? _ # _)
2024-05-23 22:23:36   1685:16  2 (raise-exception _ #:continuable? _)
2024-05-23 22:23:36   1683:16  1 (raise-exception _ #:continuable? _)
2024-05-23 22:23:36   1685:16  0 (raise-exception _ #:continuable? _)
2024-05-23 22:23:36 ice-9/boot-9.scm:1685:16: In procedure raise-exception:
2024-05-23 22:23:36 ERROR:
2024-05-23 22:23:36   1. &nar-error:
2024-05-23 22:23:36       file: #f
2024-05-23 22:23:36       port: #<closed: file 7ff1213615b0>
--8<---------------cut here---------------end--------------->8---

I'm no rocket scientist, but that error looks very similar to the error
found when building from the CLI. Given that cuirass-configuration has
fallback #t, it should be recoverable.

Possibly related: [2] and [3]

[1]: https://issues.guix.gnu.org/23103
[2]: https://issues.guix.gnu.org/55820
[3]: Guix 3f59fd6d114548480c719d4b8f8509bdf3e8dcca

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




Information forwarded to bug-guix <at> gnu.org:
bug#71160; Package guix. (Sun, 26 May 2024 02:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 71160 <at> debbugs.gnu.org (full text, mbox):

From: Richard Sent <richard <at> freakingpenguin.com>
To: 71160 <at> debbugs.gnu.org
Subject: Re: bug#71160: --fallback and (fallback #t) do not apply when
 receiving a corrupt nar
Date: Sat, 25 May 2024 22:06:26 -0400
Richard Sent <richard <at> freakingpenguin.com> writes:

> Trying to pass --fallback on the command line has no effect, even though
> both the documentation and [1] imply that should work.

This issue might have some spiciness to it. I have two machines with
identical guix commits and --fallback works on one but not the other.

--8<---------------cut here---------------start------------->8---
# Failing machine:
root <at> lifeline ~# guix describe
Generation 2    May 25 2024 21:03:46    (current)
  guix 94c8cec
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 94c8cec99969fe9f65777637fde1f05e1c576a3f

# Good machine:
Generation 3	May 25 2024 21:58:15	(current)
  guix 94c8cec
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 94c8cec99969fe9f65777637fde1f05e1c576a3f
--8<---------------cut here---------------end--------------->8---

On the failing machine, I get an error like this:

--8<---------------cut here---------------start------------->8---
root <at> lifeline ~# guix build linux-libre-arm64-generic --system=aarch64-linux --fallback
# snip
downloading from https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz ...
 linux-libre-6.8.10-guix.tar.xz  136.5MiB                                                                          19.0MiB/s 00:07 ▕█████████████████▉▏  99.9%guix substitute: error: corrupt input while restoring '/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' from #<input: string 7f558e7233f0>
substitution of /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz failed
guix build: error: corrupt input while restoring archive from #<closed: file 7f51c615b380>
root <at> lifeline ~# logout
--8<---------------cut here---------------end--------------->8---

whereas on the good machine:

--8<---------------cut here---------------start------------->8---
root <at> gibraltar ~# guix build linux-libre-arm64-generic --system=aarch64-linux --fallback
# snip
downloading from https://bordeaux.guix.gnu.org/nar/none/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz ...
 linux-libre-6.8.10-guix.tar.xz  136.5MiB                                                                          19.6MiB/s 00:07 ▕█████████████████▊▏  98.8%guix substitute: error: corrupt input while restoring '/gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz' from #<input: string 7f7b2a223b60>
substitution of /gnu/store/y813phs2n9xnb7zbcr07g0j9509bzbsb-linux-libre-6.8.10-guix.tar.xz failed
building /gnu/store/ny56fdcig9cd9bd3pssmlraz2c1q10q8-linux-libre-6.8.10-guix.tar.xz.drv...
--8<---------------cut here---------------end--------------->8---

I thought perhaps there was some hyper-odd race condition going on here
(lifeline is consistently at a higher percent than gibraltar when the
error is detected), but I just had a outlier that seems to disprove
that, where lifeline had the same error with a 97.2% download progress
bar.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




This bug report was last modified 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.