unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#37762: ‘guix offload’ sets too short a timeout
@ 2019-10-15 10:22 Ludovic Courtès
  2019-10-15 12:21 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2019-10-15 10:22 UTC (permalink / raw)
  To: bug-Guix

Hello Guix,

In (guix scripts offload) the SSH session is created like this:

       (make-session #:user (build-machine-user machine)
                     #:host (build-machine-name machine)
                     #:port (build-machine-port machine)
                     #:timeout 10       ;seconds
                     ;; …
                     )

What this means is that any connect(2), read(2), or write(2) call on the
underlying file descriptors that takes more than 10 seconds is
interpreted as EOF (at least on the Scheme side when reading from a
channel port; on the C side we might be able to distinguish.)

This was fine with libssh < 0.9.0 because that timeout was not honored
when reading from a channel due to a bug they fixed in libssh commit
e4e51ccc1340e313c203842d0180a1c4e33c95cc.

libssh 0.9.0, added in Guix commit
44941fd7dbc77a7bf84a9be63a309eca3ffdc1c2, contains this bug fix, meaning
that the 10s session timeout is actually honored now.

So in practice, if you offload a build process and that process remains
silent for 10s (which is not that much!), then ‘guix offload’ thinks
it’s done and (confusingly) goes on to fetch the result from the build
machine, which is of course unavailable.  The end result is an equally
confusing error message like this (the last two lines):

--8<---------------cut here---------------start------------->8---
starting phase `bootstrap'
running './autogen.sh'
patch-shebang: ./autogen.sh: changing `/bin/sh' to `/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/sh'
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config/m4
/gnu/store/iql3p5zvz0nwcsckdpywdkqxccx95ygx-bash-minimal-5.0.7/bin/sh: git: command not found
guix offload: error: corrupt input while restoring archive from #<input-output: channel (open) 7fc227fbc180>
guix build: error: build of `/gnu/store/dpz058x83sc7y1krpkdn84b45vl5p9cz-ucx-1.6.1.drv' failed
--8<---------------cut here---------------end--------------->8---

Working on a bug fix…

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#37762: ‘guix offload’ sets too short a timeout
  2019-10-15 10:22 bug#37762: ‘guix offload’ sets too short a timeout Ludovic Courtès
@ 2019-10-15 12:21 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2019-10-15 12:21 UTC (permalink / raw)
  To: 37762-done

Ludovic Courtès <ludovic.courtes@inria.fr> skribis:

> In (guix scripts offload) the SSH session is created like this:
>
>        (make-session #:user (build-machine-user machine)
>                      #:host (build-machine-name machine)
>                      #:port (build-machine-port machine)
>                      #:timeout 10       ;seconds
>                      ;; …
>                      )

Fixed in 00d732195812234f578a9513b32010fbe6469cd1.

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-10-15 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-15 10:22 bug#37762: ‘guix offload’ sets too short a timeout Ludovic Courtès
2019-10-15 12:21 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).