From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MB2cIATTgmMyfgEAbAwnHQ (envelope-from ) for ; Sun, 27 Nov 2022 04:01:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0M6BIATTgmPkZQAAauVa8A (envelope-from ) for ; Sun, 27 Nov 2022 04:01:24 +0100 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 3AD3C2E52 for ; Sun, 27 Nov 2022 04:01:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oz7uk-0007mh-0w; Sat, 26 Nov 2022 22:01:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz7uh-0007kX-Qq for bug-guix@gnu.org; Sat, 26 Nov 2022 22:01:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oz7uh-0001ku-At for bug-guix@gnu.org; Sat, 26 Nov 2022 22:01:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oz7ug-0002K1-3O for bug-guix@gnu.org; Sat, 26 Nov 2022 22:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#30948: [PATCH core-updates] guix: Reap finished child processes in build containers. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Nov 2022 03:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30948 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 30948@debbugs.gnu.org, Carlo Zancanaro Received: via spool by 30948-submit@debbugs.gnu.org id=B30948.16695180278911 (code B ref 30948); Sun, 27 Nov 2022 03:01:02 +0000 Received: (at 30948) by debbugs.gnu.org; 27 Nov 2022 03:00:27 +0000 Received: from localhost ([127.0.0.1]:41783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz7u6-0002Jf-VD for submit@debbugs.gnu.org; Sat, 26 Nov 2022 22:00:27 -0500 Received: from mail-qk1-f177.google.com ([209.85.222.177]:46675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz7u1-0002JZ-LH for 30948@debbugs.gnu.org; Sat, 26 Nov 2022 22:00:25 -0500 Received: by mail-qk1-f177.google.com with SMTP id d8so5054903qki.13 for <30948@debbugs.gnu.org>; Sat, 26 Nov 2022 19:00:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=TN//sqAk1BJ7C7LV1dwgEzfcBsc8VkvOl68Ap6Sk7fs=; b=d8jjhaqZl2582wlHLxk0f19AmtdJnyhdGd+DExB0LL3qIJx8EuqyPnZqO2gQ6CxS2q wvSYHRS2d5rNr66Jj1oaskcmX6KTuxOjU8jc0yHUrMmMViaookbX2czY7rlrYCUl4fjw ui+E0TS06537w2nDEt/aMZToE6FifzZlBZwz6FikDjJ366xioUnP8N7492whU4hvi+7c xkkIvYCyHBZwtF31OSYJ9vGNF+lZUpKVpVPd5BFCJykvw7MuoSEytREFFN4dp9eOj/YK a0WCesrPj29IzhFt19FbYK0xRcZozHcykyWg6zs9lA223CxnYc66+4Oni/a2CGu9x3sX Ns3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TN//sqAk1BJ7C7LV1dwgEzfcBsc8VkvOl68Ap6Sk7fs=; b=4cpfPjncVGW8gBRffHNpSWD11p63nWCtwd0jDzsumPd/Xs4juXUswOX3Vuajb7D9/L J9N6yidjiAD4/tQFSvICsD5BoIGvvXg/RwHkE8s1TrEDiR1cqrnE3NlLGyTqukcsl0Cg mvHU36a39YP3P6ikXZhwJk1dpbhuVujFxWlYutJ0hNQAnZGDkBuWnNCyPCpBWc5t/WPO uLBJ6KvXjTqGFL0CdrxXD0N4CtRivPgxOFE/Ap7odsqUFFUpsjCaaQhYUHeOFG82lPuG If+L6//klu+cJR1dyLwsx2giFA++To/V4tsjiz3yJs6tLnNymHLXGeNVF2ICMDGuWgC0 AxgQ== X-Gm-Message-State: ANoB5pk2uTGVEDOUZ6F4inyZkmrk215oOPMq/AfZl62U57ef//UvaOR6 5dg6Ut/cLq1zdwAtNjV9Izan3pX9Dws= X-Google-Smtp-Source: AA0mqf53gxEFptckX5II3QbzzVlE51AvkrJM0eiZZJIjXkursum0IUtiAiCVYiMAwCvvQw/4K8BM3Q== X-Received: by 2002:ae9:c106:0:b0:6fa:3001:58fd with SMTP id z6-20020ae9c106000000b006fa300158fdmr23937077qki.401.1669518015837; Sat, 26 Nov 2022 19:00:15 -0800 (PST) Received: from hurd (dsl-151-252.b2b2c.ca. [66.158.151.252]) by smtp.gmail.com with ESMTPSA id z13-20020a05622a124d00b00398313f286dsm4602645qtx.40.2022.11.26.19.00.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Nov 2022 19:00:15 -0800 (PST) From: Maxim Cournoyer References: <87muyvulwt.fsf@zancanaro.id.au> <87bmf6ve6u.fsf@gnu.org> <87sh8id1mg.fsf@zancanaro.id.au> <87vadeou54.fsf@gnu.org> <87o9j5x1d4.fsf@zancanaro.id.au> <874lkxoanq.fsf@gnu.org> <87cz9cnvys.fsf_-_@gmail.com> <875yf192en.fsf@gnu.org> Date: Sat, 26 Nov 2022 22:00:13 -0500 In-Reply-To: <875yf192en.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sat, 26 Nov 2022 16:11:12 +0100") Message-ID: <87ilj1w18i.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) 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: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org 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=1669518084; 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=TN//sqAk1BJ7C7LV1dwgEzfcBsc8VkvOl68Ap6Sk7fs=; b=b7wlk8wiKdS7gDqbDZyoYFg7Bl7OUf7iIFkFEk5BhuSwa/yaXsDY/9o5d2bmmWsSefUJPr ThUgk9iHRtSpPplNY9w3igdXqUpEpxIL/1LXwrvim/Hm1MGvxd3DShRLul5puaoPhalaWq TMqeyKGA9pjf73zYEMHccxy72kJemi63e8OWO+cjXPlaiTL1b1JwMVEQJLoXuRLPaWzaKu sY5lO/WW6woEnJ5r8WeWT40Kf237xBcq4nYzXXM4HxkCyH/Z28YLVAch0Ir7W1kYYji0Sh Up3UVTeTkGpF6X0iede7qO3YAeqgsfeI3r/H4GObW47IDOYhCbIS9927Bqnqgw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669518084; a=rsa-sha256; cv=none; b=UAuOXkSLifL2VQm0ZfKjIw0EzUG3K1b9QLbfTloO+m+Hxu4BSCfaM323WBE9GrX4AhM1m+ uJPQVdSOU7e2ZCrnrhKLEDp0gKiBlaMKCO9pNh7BEJCZVUmkf/EroTTxx2fSyVZDKv3A0X aN3I/owa51EyejjlUy8hfVd97745i10HUclSUDNuptOfEctuAmnyB3GPd4uPitJpnKSaLA KIKkv7K9ARr2jrcjSVSVb5oUDX7o9Pp2ijBZtqLWm3HcWjIryvLx2IqfHLaR2qGO9tWp08 LnTf/hsrhC0wAn0RBknnVqPKDOH3vhGvByb5QtWnKndjCC20FJ8te4hFnBlxew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=d8jjhaqZ; 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: 5.54 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=d8jjhaqZ; 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: 3AD3C2E52 X-Spam-Score: 5.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5DT7w9cHBTOC Hi, Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer skribis: > >>> My view is just that this mechanism belongs in =E2=80=9Cuser code=E2=80= =9D, not in the >>> low-level mechanisms such as =E2=80=98build-expression->derivation=E2= =80=99 and >>> =E2=80=98gexp->derivation=E2=80=99. It=E2=80=99s a matter of separatio= n of concerns. >> >> Why? On my Guix System, such signal handling is handled by Shepherd, if >> I'm not mistaken. As I user, I can trust the foundation to be sane, >> rather than having to provide the bits to make it so myself. >> >>> Of course we don=E2=80=99t want to duplicate that code every time, but = the way >>> we should factorize it, IMO, is by putting it in a =E2=80=9Cnormal=E2= =80=9D module that >>> people will use. >>> >>> Putting it in gnu-build-system is an admittedly hacky but easy way to >>> have it widely shared. >> >> I think we can do better than hacky here :-) > > I think the real issue here is semantic clarity when it comes to > derivation inputs. > > If I write: > > (gexp->derivation "foo" #~(mkdir #$output)) > > I can be sure that my derivation depends on nothing but (default-guile). > This is important for tests, but also to make sure we can use this > primitive everywhere=E2=80=94if it pulled in the Shepherd, I wouldn=E2=80= =99t be able to > use to build glibc, because there=E2=80=99d be a cycle. I was not suggesting to pull in extra dependencies such as Shepherd, but to weave the to-be-added signal handling logic at a much lower level. One idea could be to arrange so that the correct signal handlers always get installed for any Guile code running in the build side (I'm not sure how, but perhaps by adjusting the gexp "compiler"?). The handlers could be defined in (guix build signal-handling) or similar. Users wouldn't need to explicitly import the module and install its signal handlers, that'd be taken care of automatically, all the time. Does that sound feasible? --=20 Thanks, Maxim