GNU bug report logs - #63634
nar 404 leads to hard ‘guix substitute’ crash

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Sun, 21 May 2023 22:13:02 UTC

Severity: important

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#63634: closed (Re: bug#63646: [PATCH] substitute: If a
 server's nar URL is 404, try the next one(s).)
Date: Mon, 29 May 2023 22:20:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#63634: nar 404 leads to hard ‘guix substitute’ crash

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 63634 <at> debbugs.gnu.org.

-- 
63634: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63634
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: 63646-done <at> debbugs.gnu.org, 63634-done <at> debbugs.gnu.org
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Christopher Baines <mail <at> cbaines.net>,
 Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>,
 Tobias Geerinckx-Rice <me <at> tobias.gr>, Ricardo Wurmus <rekado <at> elephly.net>
Subject: Re: bug#63646: [PATCH] substitute: If a server's nar URL is 404,
 try the next one(s).
Date: Tue, 30 May 2023 00:19:07 +0200
Hi,

Ludovic Courtès <ludo <at> gnu.org> skribis:

> Ludovic Courtès <ludo <at> gnu.org> skribis:
>
>> +  (define (try-fetch choices)
>> +    (match choices
>> +      (((uri compression file-size) rest ...)
>> +       (guard (c ((and (pair? rest) (network-error? c))
>> +                  (warning (G_ "download from '~a' failed, trying next URL~%")
>> +                           (uri->string uri))
>
> I realized we can change ‘network-error?’ to ‘http-get-error?’ above.
> Otherwise, we could find ourselves trying several nar URLs on the same
> server when the error is ETIMEDOUT or ECONNREFUSED, which would be a
> waste of time.

Pushed as 8af9a2aa5fa2fa5b00234c1cbe12e9aff60888a0.

Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: nar 404 leads to hard ‘guix substitute’
 crash
Date: Mon, 22 May 2023 00:12:37 +0200
Like this:

--8<---------------cut here---------------start------------->8---
 gst-plugins-bad-minimal-1.22.2  650KiB                 6.8MiB/s 00:00 ▕██████████████████▏ 100.0%
 guile-bytestructures-1.0.10  222KiB                    4.1MiB/s 00:00 ▕██████████████████▏ 100.0%
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          18 (apply-smob/0 #<thunk 7f6df0f172a0>)
In ice-9/boot-9.scm:
    724:2 17 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 16 (_ #(#(#<directory (guile-user) 7f6df0f1cc80>)))
In guix/ui.scm:
   2300:7 15 (run-guix . _)
  2263:10 14 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1752:10 13 (with-exception-handler _ _ #:unwind? _ # _)
  1752:10 12 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/substitute.scm:
   854:15 11 (_)
    646:2 10 (process-substitution _ _ _ #:cache-urls _ #:acl _ # _ # …)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/substitute.scm:
    463:7  8 (download-nar #<<narinfo> path: "/gnu/store/dg0rm1mp9q…> …)
In ice-9/boot-9.scm:
  1747:15  7 (with-exception-handler #<procedure 7f6df0fa71e0 at ic…> …)
  1685:16  6 (raise-exception _ #:continuable? _)
  1683:16  5 (raise-exception _ #:continuable? _)
  1685:16  4 (raise-exception _ #:continuable? _)
  1780:13  3 (_ #<&compound-exception components: (#<&error> #<&irri…>)
  1685:16  2 (raise-exception _ #:continuable? _)
  1683:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
ERROR:
  1. &http-get-error:
      uri: #<<uri> scheme: https userinfo: #f host: "bordeaux.guix.gnu.org" port: #f path: "/nar/zstd/dg0rm1mp9qvjhvlwra5mc8dz5pfky4hj-guile-colorized-0.1" query: #f fragment: #f>
      code: 404
      reason: "Not Found"
      headers: ((server . "nginx") (date . #<date nanosecond: 0 second: 39 minute: 59 hour: 21 day: 21 month: 5 year: 2023 zone-offset: 0>) (content-type text/plain (charset . "utf-8")) (content-length . 3) (connection keep-alive))
  2. &message: "https://bordeaux.guix.gnu.org/nar/zstd/dg0rm1mp9qvjhvlwra5mc8dz5pfky4hj-guile-colorized-0.1: HTTP download failed: 404 (\"Not Found\")"
substitution of /gnu/store/dg0rm1mp9qvjhvlwra5mc8dz5pfky4hj-guile-colorized-0.1 failed
guix system: error: corrupt input while restoring archive from #<closed: file 7f0e7113b3f0>
$ guix describe
Generation 263  May 21 2023 23:56:04    (current)
  guix c5bc698
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: c5bc698e8922d78ed85989985cc2ceb034de2f23
  guile 36fd2b4
    repository URL: https://git.savannah.gnu.org/git/guile.git
    branch: main
    commit: 36fd2b4920ae926c79b936c29e739e71a6dff2bc
  shepherd 954742c
    repository URL: https://git.savannah.gnu.org/git/shepherd.git
    branch: master
    commit: 954742cd0d066ac4be7de4a031d7e229fd445c5d
$ guix package -p /run/current-system/profile -I guix
guix      	1.4.0-6.dc5430c	out	/gnu/store/cgjddvw9zay626z8hyxl0zmn1354c24k-guix-1.4.0-6.dc5430c
guix-icons	0.1            	out	/gnu/store/arcpwjvhp3ws1i6g1sdnfxxrxc3zq4m9-guix-icons-0.1
--8<---------------cut here---------------end--------------->8---

This might be related to 8bd4126917f59f4af9a4323c3d5699201862dca2.  The
two ‘download-nar’ calls are guarded against ‘http-get-error?’ though.

Ludo’.



This bug report was last modified 1 year and 356 days ago.

Previous Next


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