GNU bug report logs - #55820
Substitute server errors lead to client crashes

Previous Next

Package: guix;

Reported by: Ludovic Courtès <ludovic.courtes <at> inria.fr>

Date: Mon, 6 Jun 2022 12:49:02 UTC

Severity: important

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55820 in the body.
You can then email your comments to 55820 AT debbugs.gnu.org in the normal way.

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#55820; Package guix. (Mon, 06 Jun 2022 12:49:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ludovic Courtès <ludovic.courtes <at> inria.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 06 Jun 2022 12:49:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludovic.courtes <at> inria.fr>
To: bug-guix <at> gnu.org
Subject: Substitute server errors lead to client crashes
Date: Mon, 06 Jun 2022 14:48:22 +0200
Here’s an example of a substitute server issue that leads to ugly client
crashes:

--8<---------------cut here---------------start------------->8---
$ guix upgrade

[…]

guix substitute: warning: while fetching https://bordeaux.guix.gnu.org/nar/lzip/fan4wanq1138ds9pj0s63f2iv4qygng0-dstat-0.7.4: server is somewhat slow
guix substitute: warning: try `--no-substitutes' if the problem persists
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          18 (apply-smob/0 #<thunk 7f0e562b2f60>)
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) 7f0e562acc80>)))
In guix/ui.scm:
   2206:7 15 (run-guix . _)
  2169: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:
   771:15 11 (_)
In ice-9/exceptions.scm:
   406:15 10 (process-substitution #<output: file 4> _ "/gnu/store/â¦" â¦)
In ice-9/boot-9.scm:
  1752:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/substitute.scm:
    479:9  8 (_)
In ice-9/boot-9.scm:
  1747:15  7 (with-exception-handler #<procedure 7f0e53925f00 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/lzip/fan4wanq1138ds9pj0s63f2iv4qygng0-dstat-0.7.4" query: #f fragment: #f>
      code: 502
      reason: "Bad Gateway"
  2. &message: "https://bordeaux.guix.gnu.org/nar/lzip/fan4wanq1138ds9pj0s63f2iv4qygng0-dstat-0.7.4: HTTP download failed: 502 (\"Bad Gateway\")"
substitution of /gnu/store/fan4wanq1138ds9pj0s63f2iv4qygng0-dstat-0.7.4 failed
guix upgrade: error: corrupt input while restoring archive from socket
--8<---------------cut here---------------end--------------->8---

This should be handled gracefully.

Also, in this case, ‘--fallback’ appears to have no effect.

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#55820; Package guix. (Mon, 13 Jun 2022 02:03:02 GMT) Full text and rfc822 format available.

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

From: Maxime Devos <maximedevos <at> telenet.be>
To: Anedroid <anedroid <at> disroot.org>, 55932 <at> debbugs.gnu.org, 
 55820 <at> debbugs.gnu.org
Subject: Re: bug#55932: error report / bug#55820: Substitute server errors
 lead to client crashes
Date: Mon, 13 Jun 2022 04:02:26 +0200
[Message part 1 (text/plain, inline)]
retitle 55932 Substitute server errors lead to client crashes
merge 55820 55392
thanks

Duplicate of <https://issues.guix.gnu.org/55820>.
Also relevant: <https://issues.guix.gnu.org/50238>.
[signature.asc (application/pgp-signature, inline)]

Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Mon, 22 May 2023 07:58:02 GMT) Full text and rfc822 format available.

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Mon, 22 May 2023 15:18:02 GMT) Full text and rfc822 format available.

Notification sent to Ludovic Courtès <ludovic.courtes <at> inria.fr>:
bug acknowledged by developer. (Mon, 22 May 2023 15:18:02 GMT) Full text and rfc822 format available.

Message #15 received at 55820-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: 63634 <at> debbugs.gnu.org, 55820-done <at> debbugs.gnu.org
Subject: Re: bug#63634: nar 404 leads to hard ‘guix substitute’ crash
Date: Mon, 22 May 2023 17:16:53 +0200
Hi,

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

>     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

[...]

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

That the exception went through despite the ‘network-error?’ guard is
fixed by 3f59fd6d114548480c719d4b8f8509bdf3e8dcca.

The reason was that the ‘&http-get-error’ condition was getting wrapped
in a ‘kind-and-args’ exception upon rethrow, as illustrated here:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (catch #t
		       (lambda () (raise-exception (condition (&message (message "boo")))))
		       (lambda args args))
$5 = (%exception #<&message message: "boo">)
scheme@(guile-user)> (with-exception-handler (lambda (e) e)
		       (lambda () (apply throw $5))
		       #:unwind? #t)
$6 = #<&compound-exception components: (#<&error> #<&irritants irritants: (#<&message message: "boo">)> #<&exception-with-kind-and-args kind: %exception args: (#<&message message: "boo">)>)>
scheme@(guile-user)> (message-condition? $6)
$7 = #f
--8<---------------cut here---------------end--------------->8---

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Jun 2023 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 310 days ago.

Previous Next


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