From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id mLxfMlwnvWEGVAEAgWs5BA (envelope-from ) for ; Sat, 18 Dec 2021 01:12:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id QOPvLVwnvWFCbgAAbx9fmQ (envelope-from ) for ; Sat, 18 Dec 2021 00:12:12 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 383E62F21B for ; Sat, 18 Dec 2021 01:12:12 +0100 (CET) Received: from localhost ([::1]:47524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myNKd-0005e4-Ek for larch@yhetil.org; Fri, 17 Dec 2021 19:12:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58166) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myNKV-0005dl-B4 for bug-guix@gnu.org; Fri, 17 Dec 2021 19:12:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:57588) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myNKT-0004mw-Rq for bug-guix@gnu.org; Fri, 17 Dec 2021 19:12:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myNKT-0005XU-Nd for bug-guix@gnu.org; Fri, 17 Dec 2021 19:12:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#24496: offloading should fall back to local build after n tries Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 18 Dec 2021 00:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24496 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 24496-submit@debbugs.gnu.org id=B24496.163978626821221 (code B ref 24496); Sat, 18 Dec 2021 00:12:01 +0000 Received: (at 24496) by debbugs.gnu.org; 18 Dec 2021 00:11:08 +0000 Received: from localhost ([127.0.0.1]:40901 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myNJc-0005WD-C5 for submit@debbugs.gnu.org; Fri, 17 Dec 2021 19:11:08 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:44890) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myNJa-0005VT-KQ for 24496@debbugs.gnu.org; Fri, 17 Dec 2021 19:11:07 -0500 Received: by mail-wr1-f43.google.com with SMTP id t18so6909827wrg.11 for <24496@debbugs.gnu.org>; Fri, 17 Dec 2021 16:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=tsaZh84wsHq6MMH3Nu4Uvg48VLQZAeLNIOsPsY8NQWE=; b=F2/oyswl08GS9Z30LtHHIwzVWzGXVsFQeeP+WfRShe9+o04yZebcA55fK+vNml9JsI SQtluV/yk5r0ZA7Y1gIHuxglJJCPgj6pqxXx2aOVNP4uZXZuaFJTmYYsxNJv9stU9jrx a9qGCRE+id28LgUMUkGmAZWP3V8CjM83QPNOU2O+p5W9ewco2rX7Zvsjk+xxCx9EY+pH f5/YZa1MZGz/x/v/O4LPZbxH+9N1KXPzjRzJkBH8Yag+nV2e81AH7XOcurFP0vQtTfdh lK8HFILgYO7O3zE8ze/1WnFSrtdqGMPvjP3dLAOGT7Cifws0M+F0L2o54Cfz75pZGBGL VONw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=tsaZh84wsHq6MMH3Nu4Uvg48VLQZAeLNIOsPsY8NQWE=; b=f40IJQ+RJzFlT9lXjsvt22ISapihrdHaaiWEdhLud9NHjj2a75fpo8PNro9iKucpMA hqsp13SMnQsoyxtd0Kaky1GmHEZC/0vvFTazVLZ3Lzt7au19RLQwA80s5AxyosYIth5l czaOPUjVl2T3iHVcxpOJhGuR7YxJeflw8XJ1GFoA5VYhL8WSVsKi7gyTkyqCzuFXNmOD vkO4j5+BDqb4YPRcqsI/fJzXWblwpZrTM4VF4Wiq85UOW9RnNrp8x81KOUurmFnsoaib oVbVfOFU6cOgDu5SVvNop0muD/Fhnxl7EKB4dKrE7RXTap1UVGKjcMxLU8wuUKDryIMy dFNw== X-Gm-Message-State: AOAM532OPfNlX9TbejJVYhn7lsba172x+XNuXr/dJwn8qVtOWfUPjfRO yxw2D/eJctqx5TxVlgAFTeQSbK7oAL0= X-Google-Smtp-Source: ABdhPJwGM6jXg/NCwmVNOxm09K7pXoFugrAyjFza87tmTNCCoDTAi9jfY+vtwcjWrBcoTbqGtRvG5A== X-Received: by 2002:a05:6000:1842:: with SMTP id c2mr4426935wri.301.1639786260694; Fri, 17 Dec 2021 16:11:00 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id q123sm11478528wma.30.2021.12.17.16.10.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 16:11:00 -0800 (PST) From: zimoun In-Reply-To: <87lf0i6gj6.fsf@gmail.com> References: <8760ppr3q3.fsf@we.make.ritual.n0.is> <87r387nhjg.fsf@gnu.org> <868rwkiuf5.fsf@gmail.com> <878rwjqm91.fsf@gnu.org> <87lf0i6gj6.fsf@gmail.com> Date: Sat, 18 Dec 2021 01:10:49 +0100 Message-ID: <86tuf6rcvq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 24496@debbugs.gnu.org, ng0 Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639786332; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tsaZh84wsHq6MMH3Nu4Uvg48VLQZAeLNIOsPsY8NQWE=; b=bn7xO3mJ3R6IFxI+Q4MCmPvZO0P3h6rc6feK83H/kQ6RUj76rSeZnJsTzD3owFJdEiAg4D J/9fz2Wleo+y04keiJQwqjsTI6S6YeU+5QECM+nJzAam1aGzsVxrIP5fzOxZeeFJCpheCT kBU1afGTi0UxMLps6inOIoLUltZYCDc1AWRV8e/XGSrO4UeVPLaL8/RrvxuWMtXz47jdVx xv6cv26jhP85GSnxwv3CAlFCwUL9HzHsSx8fLyWg6QqT9v6SSP+fULm2nTgzVo1GCBkyay itGcB/gSr/L2NsVzCXstUIemuwxS/90tasd8LagP/zggVsStLRIPu/COB2uMGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639786332; a=rsa-sha256; cv=none; b=T3saCQA0pofd8PLEzkwoVU2yql5JmZjEkqaNboN5CpJdDLNDp28unN8UDf6hN3y0igplDF Tt8cJY3YK9u9VmZO/5wKlhmZ6T/bGB8OGszPf7kAto0zCGQ3VGMLmryCqoUjMKg2SdDYLN 8Ov8AmL66Ea/IJC49l/u40QRzSrfL/C/E9nHGWcxWqABiW0NjJOhBCYSB8XjR2udxloNAX 0jJOXag8AeP2sAj7NwDI0c5RhdpAI5R/U3GG1VCYVzwOHIA3RPvKq51/O4RKFMpa2L9OCj onDXLhZVUunX3/Z3qkv3gpLWgdhVe6W2iAZYJxB/d15wbJOlAp4h4Vp+fN1ZXw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="F2/oyswl"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b="F2/oyswl"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 383E62F21B X-Spam-Score: -0.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: tetnqO2e6Z6S Hi, I have not checked all the details, since the code of =E2=80=9Cguix offload= =E2=80=9D is run by root, IIUC and so it is not as friendly as usual to debug. :-) On Fri, 17 Dec 2021 at 16:57, Maxim Cournoyer w= rote: >> However, I think this behavior was unintentionally lost in >> efbf5fdd01817ea75de369e3dd2761a85f8f7dd5. Maxim, WDYT? > > I just reviewed this commit, and don't see anywhere where the behavior > would have changed. The discarding happens here: [...] > previously load could be set to +inf.0. Now it is a float between 0.0 > and 1.0, with threshold defaulting to 0.6. My /etc/guix/machines.scm contains only one machine and --max-jobs=3D0. Because the machine is unreachable, IIUC, =E2=80=99node=E2=80=99 is (or sho= uld be) false and =E2=80=99load=E2=80=99 is thus not involved, I guess. Indeed, =E2=80= =99report-load=E2=80=99 displays nothing, and instead I get: --8<---------------cut here---------------start------------->8--- The following derivation will be built: /gnu/store/c1qicg17ygn1a0biq0q4mkprzy4p2x74-hello-2.10.drv process 75621 acquired build slot '/var/guix/offload/x.x.x.x:22/0' guix offload: error: failed to connect to 'x.x.x.x': Timeout connecting to = x.x.x.x waiting for locks or build slots... process 75621 acquired build slot '/var/guix/offload/x.x.x.x:22/0' guix offload: error: failed to connect to 'x.x.x.x': Timeout connecting to = x.x.x.x process 75621 acquired build slot '/var/guix/offload/x.x.x.x:22/0' guix offload: error: failed to connect to 'x.x.x.x': Timeout connecting to = x.x.x.x process 75621 acquired build slot '/var/guix/offload/x.x.x.x:22/0' guix offload: error: failed to connect to 'x.x.x.x': Timeout connecting to = x.x.x.x process 75621 acquired build slot '/var/guix/offload/x.x.x.x:22/0' C-c C-c --8<---------------cut here---------------end--------------->8--- Well, if the machine is not reachable, then =E2=80=99session=E2=80=99 is fa= lse, right? --8<---------------cut here---------------start------------->8--- @@ -472,11 +480,15 @@ (define (machine-faster? m1 m2) (let* ((session (false-if-exception (open-ssh-session best %short-timeou= t))) (node (and session (remote-inferior session))) - (load (and node (normalized-load best (node-load node)))) + (load (and node (node-load node))) + (threshold (build-machine-overload-threshold best)) (space (and node (node-free-disk-space node)))) + (when load (report-load best load)) (when node (close-inferior node)) (when session (disconnect! session)) - (if (and node (< load 2.) (>=3D space %minimum-disk-space)) + (if (and node + (or (not threshold) (< load threshold)) + (>=3D space %minimum-disk-space)) [...] (begin ;; BEST is unsuitable, so try the next one. (when (and space (< space %minimum-disk-space)) (format (current-error-port) "skipping machine '~a' because it is low \ on disk space (~,2f MiB free)~%" (build-machine-name best) (/ space (expt 2 20) 1.))) (release-build-slot slot) (loop others))))) --8<---------------cut here---------------end--------------->8--- Therefore, the =E2=80=99else=E2=80=99 branch goes and so the codes does =E2= =80=99(loop others)=E2=80=99. However, I miss why =E2=80=99others=E2=80=99 is not empty (only one machine= in /etc/guix/machines.scm). Well, the message =C2=ABwaiting for locks or build slots...=C2=BB suggests that something is restarted and it is not that =E2= =80=99loop=E2=80=99 we are observing but another one. On daemon side, I do not know what this =E2=80=99waitingForAWhile=E2=80=99 = and =E2=80=99lastWokenUp=E2=80=99 mean. --8<---------------cut here---------------start------------->8--- /* If we are polling goals that are waiting for a lock, then wake up after a few seconds at most. */ if (!waitingForAWhile.empty()) { useTimeout =3D true; if (lastWokenUp =3D=3D 0) printMsg(lvlError, "waiting for locks or build slots..."); if (lastWokenUp =3D=3D 0 || lastWokenUp > before) lastWokenUp =3D b= efore; timeout.tv_sec =3D std::max((time_t) 1, (time_t) (lastWokenUp + set= tings.pollInterval - before)); } else lastWokenUp =3D 0; --8<---------------cut here---------------end--------------->8--- Bah it requires more investigations and I agree with Maxim that efbf5fdd01817ea75de369e3dd2761a85f8f7dd5 is probably not the issue there. Cheers, simon