From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8IohO2GCol/yfgAA0tVLHw (envelope-from ) for ; Wed, 04 Nov 2020 10:28:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id COrqNmGCol9BLQAAbx9fmQ (envelope-from ) for ; Wed, 04 Nov 2020 10:28:49 +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 9F5A99403A9 for ; Wed, 4 Nov 2020 10:28:49 +0000 (UTC) Received: from localhost ([::1]:38186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaG24-0001R9-Fq for larch@yhetil.org; Wed, 04 Nov 2020 05:28:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaG1v-0001QA-11 for guix-devel@gnu.org; Wed, 04 Nov 2020 05:28:39 -0500 Received: from imta-37.everyone.net ([216.200.145.37]:54154 helo=imta-38.everyone.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaG1s-0002zp-Ir; Wed, 04 Nov 2020 05:28:38 -0500 Received: from pps.filterd (m0004962.ppops.net [127.0.0.1]) by imta-38.everyone.net (8.16.0.43/8.16.0.43) with SMTP id 0A4ARMIZ003068; Wed, 4 Nov 2020 02:28:31 -0800 X-Eon-Originating-Account: 3jJ80Nmhq3besfCOcZde_VU2SojuPNJa63r7GoIweNI X-Eon-Dm: m0116787.ppops.net Received: by m0116787.mta.everyone.net (EON-AUTHRELAY2 - 5a81ce25) id m0116787.5f8a0270.2281d7; Wed, 4 Nov 2020 02:28:29 -0800 X-Eon-Sig: AQMHrIJfooJN4GaGywIAAAAD,dc458d7c266ceb790f6acbd7ad8e1c43 X-Eip: vzeBHbvs2Qf4Wcco3Jr1FtIsB7K74LOrVa8kDw9tf7c Date: Wed, 4 Nov 2020 11:28:14 +0100 From: Bengt Richter To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: RFC: subcommand to pause/resume builds Message-ID: <20201104102814.GA30224@LionPure> References: <87r1pbzixl.fsf@asu.edu> <87zh3yczss.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87zh3yczss.fsf@gnu.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.312, 18.0.737 definitions=2020-11-04_06:2020-11-04, 2020-11-04 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 mlxscore=0 priorityscore=1501 phishscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1034 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2011040077 Received-SPF: pass client-ip=216.200.145.37; envelope-from=bokr@oz.net; helo=imta-38.everyone.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 05:28:33 X-ACL-Warn: Detected OS = Linux 3.x [generic] [fuzzy] X-Spam_score_int: -23 X-Spam_score: -2.4 X-Spam_bar: -- X-Spam_report: (-2.4 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bengt Richter Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 0.99 X-TUID: 2yymp5BR4URG Hi all, On +2020-11-03 14:53:07 +0100, Ludovic Courtès wrote: > Hi, > > John Soo skribis: > > > I was looking to pause a long build today and asked on IRC how to > > accomplish pause/resume. It seems this is possible already with the > > following: > > > > kill --signal SIGSTOP|SIGCONT {pids-of-build-process-tree} > > > > There is already a command to list the processes associated to guix > > commands: guix processes. Perhaps pause/resume can be a subcommand or > > set of flags to guix processes. The following is the first thing that > > comes to mind: > > > > guix processes --pause package-name ... --resume package-name ... > > > > What do you think? > > First, note that the daemon is unaware of “packages”, it only knows > about “derivations”. > What if you turned the problem inside out, and made the derivation volunteer to be paused (at sensible places in its progress)? I.e., if you defined part of a given derivation "hash-prefixed-derivation-file-name-in-question.drv" to do a check for the existence of /var/guix/daemon-ctl/hash-prefixed-derivation-file-name-in-question.drv.sfx (.sfx appended to signify special effects :) ISTM that could open the door for some easy hacks, (and probably some dangers to watch for :) E.g. a proof of concept might be just to sleep 6 seconds (say) and repeat sleep/check until the file disappears. IWG this should not change anything for non-volunteering derivations other than the load-relief of not running the sleeping process(es). Then the person wanting to pause the derivation "hash-prefixed-derivation-file-name-in-question.drv" could do so simply by touch /var/guix/daemon-ctl/hash-prefixed-derivation-file-name-in-question.drv.sfx and deleting it when wanting to allow it to continue. Later, if that works, .sfx files could have content, for as yet unimagined purposes ;) [...] > > Conclusion: I don’t think we can implement this reliably. > IDK from the outside, but inside-out, WDYT? > HTH! > > Ludo’. > -- Regards, Bengt Richter