From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UDTdLyAtrWFIXAEAgWs5BA (envelope-from ) for ; Sun, 05 Dec 2021 22:20:32 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aKCPKyAtrWFSRwAAB5/wlQ (envelope-from ) for ; Sun, 05 Dec 2021 21:20:32 +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 75F1330B83 for ; Sun, 5 Dec 2021 22:20:32 +0100 (CET) Received: from localhost ([::1]:39384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mtyvv-00026t-Ki for larch@yhetil.org; Sun, 05 Dec 2021 16:20:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47744) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyvO-00025J-Vd for guix-devel@gnu.org; Sun, 05 Dec 2021 16:19:58 -0500 Received: from [2001:470:142:3::e] (port=51000 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyvO-0006y7-OY for guix-devel@gnu.org; Sun, 05 Dec 2021 16:19:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=apr0Att7lwDToQzw2pEta7mkwwPRYnHGGV1yXbB8d/o=; b=b24dPs9dVc1y51o9n1gu AAyMJB4MGqneVcLNE0+w5JcMb9IdxvG4/UXFYpKpzMMJySmkoTjgrsyBrCY3zffR4ZpM7ygCvKiH/ XUht9oug6uML+qnLe0Q6QK90x/C5llkUNSTPUIxYfkxbzjjbUPP5I3NJjEFLNmg4oS4jy060GfzJH 1XBJpbKhkB3k6U2Xpv0N4uUC+DPSuKW7vA87by3I8PxS7p7jR+4/NnX4LpjFyew81koZhUesBe2FU uW2FGpgYovUU/ZX47wAsEMWE23hml8JwojWiTP5EbstBF72Pru0iLuv4QoNU1RvwyhWYXOjobrjsI Djwxl5Uilq8UBQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50409 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mtyvO-0003FM-Ho; Sun, 05 Dec 2021 16:19:58 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: branch master updated: remote-server: Fix fetch worker crash. References: <20211203093835.634.3648@vcs0.savannah.gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 Frimaire an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 05 Dec 2021 22:19:55 +0100 In-Reply-To: <20211203093835.634.3648@vcs0.savannah.gnu.org> (Mathieu Othacehe's message of "Fri, 03 Dec 2021 04:38:35 -0500") Message-ID: <87o85uu4uc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Guix Devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1638739232; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=apr0Att7lwDToQzw2pEta7mkwwPRYnHGGV1yXbB8d/o=; b=IdwqaIDNAIOrX2ybJOUB+pesVA12845d0Yhn0UpSVS2FSk1t/DiG78AVNKcSKJa9QFSRKK 1+QAtTsVx/hvVhD0W8zPPrrTuiPnQ+NwhnoCofUvTPf0nWYi+kEYjKqQOmj4qoo+GwMKW2 eXw9NA87ObjC/A36DjdExf0UvPiu5u9rpIXf+ZYbU24LIULd4UhZZ109So7waDguzTl5VV 0QuaEhYqwnqMPyGClia2OkGc1UgsP1wv+jzeEa0axN8opNfQHp6Fpatw+P3eziRmdzBjMt YwzCoaJsLhF+Io1DwLreqfqpL9d0CZazPx9LVpeZxN/AfmkicVVSPZl3bS6bmw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638739232; a=rsa-sha256; cv=none; b=PoJz6/24lRHVLK2rNTE4UeGpslEZ0pFmOk0QZIN6rjuqu6mXBrmEAaxY2hslG4CFD6YRig 3eea4/dLt0zuKOSK8B2XXA3dM17GOrYa3u3SW9UjBgYhqjVt5kJAkksQpcjRNqqZGJUKbZ iH46HkuyOPAdya9aSnR7ynwEInBUNj9w/l7g1QvcgBjA62aeFpCmmWUdVtSbb+2izqluRx Rvao6HbZAIhNZsfiVd5nI61SEZJgmUh8PLOhpgtzT0dJ4Im0OK8aETDnXMF+4FacOH2laT UHlr8PzhBDJzOrbc3A2Xl5rybkQhhTRx4+2neekzG5sl5woNWf65lR4dCm/Tew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=b24dPs9d; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.34 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=b24dPs9d; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 75F1330B83 X-Spam-Score: -5.34 X-Migadu-Scanner: scn0.migadu.com X-TUID: JwuZcXot8Ru3 Hi, m.othacehe@gmail.com (Mathieu Othacehe) skribis: > --- a/src/cuirass/scripts/remote-server.scm > +++ b/src/cuirass/scripts/remote-server.scm > @@ -376,7 +376,10 @@ directory." > (when (> duration 60) > (log-message "fetching '~a' took ~a seconds." > drv duration))))) > - (register-gc-roots drv) > + ;; The derivation may have been GC'ed by that time. Do not try to > + ;; register its outputs in that case. > + (when (file-exists? drv) > + (register-gc-roots drv)) I think it=E2=80=99s be safer (less prone to TOCTTOU races) to write it as: (catch 'system-error (lambda () (register-gc-roots drv)) (lambda args (unless (=3D ENOENT (system-error-errno args)) ;collected in the mean= time (apply throw args)))) Ludo=E2=80=99.