Hi Florian, (Cc: Chris who’s also familiar with (guix http-client).) "pelzflorian (Florian Pelz)" skribis: > It still gets stuck (sometimes with enlightenment, one time with > udisks, restarting the install fixed it once). After getting stuck, > this different error message is shown now; no TLS error (copied by > manual typing, there may be typos): > > gtk-doc-1.28 653KiB 2.4MiB/s 00:00 [####################] 100.0% > udisks-2.8.4 842KiB 1.6MiB/s 00:00 [####################] 100.0% > > substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%Backtrace: > substitute: In ice-9/boot-9.scm: > substitute: 1736:10 17 (with-exception-handler _ _ #:unwind? _ # _) > substitute: In unknown file: > substitute: 16 (apply-smob/0 #) > substitute: In ice-9/boot-9.scm: > substitute: 718:2 15 (call-with-prompt _ _ #) > substitute: In ice-9/eval.scm: > substitute: 619:8 14 (_ #(#(#))) > substitute: In guix/ui.scm: > substitute: 2164:12 13 (run-guix-command _ . _) > substitute: In ice-9/boot-9.scm: > substitute: 1736:10 12 (with-exception-handler _ _ #:unwind? _ # _) > substitute: 1736:10 11 (with-exception-handler _ _ #:unwind? _ # _) > substitute: 1731:15 10 (with-exception-handler _ _ #:unwind? _ # _) > substitute: In guix/scripts/substitute.scm: > substitute: 745:18 9 (_) > substitute: 346:26 8 (process-query # _ #:cache-urls _ #:acl _) > substitute: In guix/substitutes.scm: > substitute: 358:27 7 (lookup-narinfos/diverse _ _ # > substitute: 315:31 6 (lookup-narinfos _ _ #:open-connection _ # _) > substitute: 238:26 5 (fetch-narinfos _ _ #:open-connection _ # _) > substitute: In ice-9/boot-9.scm: > substitute: 1669:16 4 (raise-exception _ #:continuable? _) > substitute: 1669:16 3 (raise-exception _ #:continuable? _) > substitute: 1764:13 2 (_ #<&compound-exception _ components: assertion-fail…>) > substitute: 1669:16 1 (raise-exception _ #:continuable? _) > substitute: 1669:16 0 (raise-exception _ #:continuable? _) > substitute: > substitute: In ice-9/boot-9.scm:1669:16 In procedure raise-exception: > substitute: In procedure %read-line: Wrong type argument in position 1 (expecting open input port): # > guix system: error: `/gnu/store/k3n98i1fk9awd5ydv4ry4k4rlpp7i13m7-guix-1.2.0-22.c467718/bin/guix substitute' died unexpectedly I think I got it: commit 205833b72c5517915a47a50dbe28e7024dc74e57 (then carried over in 45fce38fb0b6c6796906149ade145b8d3594c1c6) introduced a call to ‘connect’ in non-tail position. Once that recursive call to ‘connect’ had completed, ‘http-multiple-get’ would go on in ‘loop’ trying to re-process responses, but at that point there aren’t any responses left to process. This problem could only happen if a networking exception would occur while sending HTTP requests for narinfos. Thus, it was most likely to occur when interleaving substitutions and queries, as in the snippet you provided above, because then ‘http-multiple-get’ was more likely to be passed a stale reused connection. Florian, could you try again with the attached patch? If you have the courage, it would be awesome if you could also try the patch without the ‘error/again’ bits. It’s possible that they aren’t needed now. I double-checked and the GnuTLS Guile bindings already handle GNUTLS_E_AGAIN and GNUTLS_E_INTERRUPTED, so my guess is that this was just a side effect of dealing with stale TLS sessions: https://gitlab.com/gnutls/gnutls/-/blob/master/guile/src/core.c#L1042 Thanks a lot for your help! Ludo’.