unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: bug-Guix@gnu.org
Subject: bug#37762: ‘guix offload’ sets too short a timeout
Date: Tue, 15 Oct 2019 12:22:04 +0200	[thread overview]
Message-ID: <87lftmwboz.fsf@inria.fr> (raw)

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’.

             reply	other threads:[~2019-10-15 10:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 10:22 Ludovic Courtès [this message]
2019-10-15 12:21 ` bug#37762: ‘guix offload’ sets too short a timeout Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lftmwboz.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=bug-Guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).