GNU bug report logs - #41625
Sporadic guix-offload crashes due to EOF errors

Previous Next

Package: guix;

Reported by: Marius Bakke <marius <at> gnu.org>

Date: Sun, 31 May 2020 09:52:01 UTC

Severity: normal

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 41625 <at> debbugs.gnu.org, marius <at> gnu.org
Subject: Re: bug#41625: Sporadic guix-offload crashes due to EOF errors
Date: Fri, 24 Sep 2021 00:55:30 -0400
Oh, and for completion, here's a reproducer I used here to debug with my
low power offload machine:

--8<---------------cut here---------------start------------->8---
x(use-modules (guix scripts offload)
             (guix inferior)
             ((guix ssh) #:hide (open-ssh-session))

             (ice-9 match)
             (ssh popen))

(define machine (build-machine
                 (name "tm")
                 (port 22)
                 (user "root")
                 (systems (list "armhf-linux"))
                 ;; ecdsa-sha2-nistp256
                 (host-key "ssh-ecdsa-p256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIx32IqtlUr2VMypLItGSnmKzd0eJkgnzPkVbOZbn4HFQD5KvWB98t4IkT0PESjs+DDQfI/PwRENo3yqd5GjukA=")
                 (parallel-builds 2)
                 (compression "none")
                 (private-key "/home/maxim/.ssh/id_rsa.1")))

(define open-ssh-session (@@ (guix scripts offload) open-ssh-session))

(define session (open-ssh-session machine 15))

(define repl-command '("guix" "repl" "-t" "machine"))

(define pipe (apply open-remote-pipe* session OPEN_BOTH repl-command))

;;; Hangs
;;;(port->inferior pipe)

(define rest (match (read pipe)
               (('repl-version 0 rest ...)
                rest)))

(define %inferior-packages (@@ (guix inferior) %inferior-packages))

(define %inferior-package-table (@@ (guix inferior) %inferior-package-table))

(define inferior (@@ (guix inferior) inferior))
(define inferior-socket (@@ (guix inferior) inferior-socket))

(define result (inferior 'pipe pipe close (cons 0 rest)
                         (delay (%inferior-packages result))
                         (delay (%inferior-package-table result))))

(define send-inferior-request (@@ (guix inferior) send-inferior-request))

(send-inferior-request '(() repl-version 0 1 1) result)

(inferior-eval '(use-modules (guix)) result)

;;; Hangs!
;;t(inferior-eval '(use-modules (gnu)) result)

(send-inferior-request '(use-modules (gnu)) result)

(define socket (inferior-socket result))

;;Throw to key `match-error' with args `("match" "no matching pattern" #<eof>)'
;;(read-repl-response socket result)
;; -> guix using 100% cpu, reading package modules for ~ 1m30s

;;; guile-ssh returns <eof> on timeout? (15 s) -> yes
(read socket)
--8<---------------cut here---------------end--------------->8---

I wish the Guile debugger was more capable; it'd have spared me the
above manual labor :-)

Maxim




This bug report was last modified 3 years and 53 days ago.

Previous Next


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