Subject: bug#67708: ‘guix system reconfigure’ crashes upon host name resolution failure

From: Ludovic Courtès <[email-masked]>
Date: Fri, 08 Dec 2023 14:14:38 +0100

On a system where DNS resolution is failing, I get:

--8<---------------cut here---------------start------------->8---
~# guix system reconfigure /etc/config.scm
Backtrace:
In ice-9/boot-9.scm:
  1752:10 19 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   661:37 18 (thunk)
   1300:8 17 (call-with-build-handler #<procedure 7f93be4bf6c0 at g…> …)
  2170:25 16 (run-with-store #<store-connection 256.99 7f93bedbc000> …)
In guix/scripts/system.scm:
  1305:15 15 (_ _)
    835:5 14 (perform-action reconfigure #<<image> name: #f format:…> …)
In guix/scripts/system/reconfigure.scm:
    344:3 13 (check-forward-update _ #:current-channels _)
In srfi/srfi-1.scm:
   691:23 12 (filter-map #<procedure 7f93cd19c920 at guix/scripts…> . #)
In guix/scripts/system/reconfigure.scm:
   351:39 11 (_ #<<channel> name: guix url: "/home/ludo/src/guix/+ve…>)
In guix/git.scm:
   475:29 10 (update-cached-checkout "https://git.savannah.gnu.org/…" …)
    376:2  9 (_ git-error #<<git-error> code: -1 message: "failed to…>)
In guix/utils.scm:
    954:8  8 (call-with-temporary-directory #<procedure 7f93c0ab6150…>)
In guix/git.scm:
   378:10  7 (_ "/tmp/guix-directory.DF11Ls")
In guix/swh.scm:
    425:0  6 (swh-download "https://git.savannah.gnu.org/git/guix.g…" …)
   255:22  5 (call "https://archive.softwareheritage.org/api/1/revi…" …)
In web/client.scm:
   476:29  4 (http-request "https://archive.softwareheritage.org/ap…" …)
   332:10  3 (open-socket-for-uri _ #:verify-certificate? _)
In unknown file:
           2 (getaddrinfo "archive.softwareheritage.org" "https" 0 # …)
In ice-9/boot-9.scm:
  1685:16  1 (raise-exception _ #:continuable? _)
  1685:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
In procedure getaddrinfo: Nom ou service inconnu
# guix describe
  guix 8e2f32c
    URL du dépôt : https://git.savannah.gnu.org/git/guix.git
    branche : master
    commit : 8e2f32cee982d42a79e53fc1e9aa7b8ff0514714
--8<---------------cut here---------------end--------------->8---

Not pretty.

Ludo’.