From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id wGeLLnrOVGEPcAEAgWs5BA (envelope-from ) for ; Wed, 29 Sep 2021 22:37:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id cGdEKnrOVGF3RQAA1q6Kng (envelope-from ) for ; Wed, 29 Sep 2021 20:37:14 +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 2F86B114A2 for ; Wed, 29 Sep 2021 22:37:14 +0200 (CEST) Received: from localhost ([::1]:57090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mVgKG-0005n4-Ex for larch@yhetil.org; Wed, 29 Sep 2021 16:37:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mVgK6-0005mg-Cp for guix-patches@gnu.org; Wed, 29 Sep 2021 16:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38835) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mVgK6-0007Rq-5K for guix-patches@gnu.org; Wed, 29 Sep 2021 16:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mVgK5-0006NC-PF; Wed, 29 Sep 2021 16:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50814] [PATCH 4/5] guix: Prepare the UI for continuable &warning exceptions. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Sep 2021 20:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50814 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Attila Lendvai Cc: 50814@debbugs.gnu.org Received: via spool by 50814-submit@debbugs.gnu.org id=B50814.163294779924466 (code B ref 50814); Wed, 29 Sep 2021 20:37:01 +0000 Received: (at 50814) by debbugs.gnu.org; 29 Sep 2021 20:36:39 +0000 Received: from localhost ([127.0.0.1]:50381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVgJj-0006MX-0Y for submit@debbugs.gnu.org; Wed, 29 Sep 2021 16:36:39 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:40284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mVgJe-0006MJ-SY for 50814@debbugs.gnu.org; Wed, 29 Sep 2021 16:36:37 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id zwcY2500H0mfAB406wcYHA; Wed, 29 Sep 2021 22:36:33 +0200 Message-ID: <929da16ca45605a5bed718dea5d76db7176cf985.camel@telenet.be> From: Maxime Devos Date: Wed, 29 Sep 2021 22:36:14 +0200 In-Reply-To: References: <20210928162406.27205-1-attila@lendvai.name> <20210928162406.27205-4-attila@lendvai.name> <9c093db2d9019ef2fe9b27979a3b51848f179a3b.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-V/4MxGN70x5Z6s40eva8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1632947793; bh=GI22FkuoFEqBMKujaz1eIZPoiDfNNAwOM3ycosZJuQ8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ELC9mLpRPPdOSh/RFotimQhzBrHJPPvu3F94UnWASdQEhPdHj++D645V5MsfJsVfx rfH2fD+YrBX0O8UToRpJvWFbSOA28VvywXLhSF/Vc3yUnN/pXTfrVvtnwIv9YLKN5W 2hZt0P4Zr43zk/pr/xNOYtjv9CFTtAlPFuTvareheQ7u9I8wkImdDUqI0cq/oKiGq9 Jnv1vSppUHVQMVKdhnuZnukloteVVH5NZvefpT8gzQklQPpM6go08zRES9ustJJRmH 3HPjL9xtr4CaJ9t82v2JLrvVq3aJEeIR+/jKbhNL/BcvGEkac9ncy6L9cJbPnOw/sB nitTNGO3sitvg== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632947834; 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: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=GI22FkuoFEqBMKujaz1eIZPoiDfNNAwOM3ycosZJuQ8=; b=ATYJ1q/Og00/xfw/qD1lCVDbwI7cJ1M04e9ZuJq0dF9ogXqu26Qo86zvh4v/1O9QI5jCsc MEchlStAp78PDfdVqH5GkrpgmfSjZAdrgFNKSP7JfpELyJGYBTN/ZRHl2xt1UQG9WSMmTQ Ofh1sUpNGUGBbbhw9vmG1tYO0afEUEaJWtKER/195PRJEK+cixUsJHs+oNP+2zPGVhwZD4 awjrS3zibN0jhm3Lq9K6rJYJ+5PcyYNXOd0899SLLB8E+s7DXKwo28W6teychn+F/caMYp xSI2wcR8f2vqQIDsm1zOEo1Ok0kiVLtTLJF8h5ZDUuAIjeCi6p8X9PxJFkHq0w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632947834; a=rsa-sha256; cv=none; b=icIm7xvKSNLOCZ36G8GkwEmWlSwDTb4C9bG/FFcctqos6XTDCMXXKId2TJkEoRnuKVpZXC 4gQ67aBzIrUiC4TpSx+YxEr4L3xaDCZo1dmibNdchMwgnuNsKrYMMZxjMyG7ZCLVQI7Gm4 9DUUUFCXtaaw3ECXicwFcxbN6JqsCmlf3xeWiaa0WABrhkDqAxMi/EzVu/C2n1OgKpnuwX 7Jr1lK1zJrZ4rNmT3KiYmgo8KtJ15mHA+NKs/49I2A3E09ENVVKkh0LUJy6ZbROo5P/dqI WHbuF9deOmrXhYNnhwNBQAOALyWPpf382TSNEDLTrApp/M1k+Qkxa5fxFt/R0w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=ELC9mLpR; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r21 header.b=ELC9mLpR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2F86B114A2 X-Spam-Score: -3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: TRMi7g+dgMum --=-V/4MxGN70x5Z6s40eva8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attila Lendvai schreef op wo 29-09-2021 om 14:50 [+0000]: > > Do we really need to close and open the connection again every time > > a continuation is made and resumed? This seems inefficient if a threadi= ng > > mechanism implemented by continuations is used (such as guile-fibers), > > and there are two threads (=E2=80=98fibers=E2=80=99) communicating and = waiting with/for > > each other in a loop, causing many =E2=80=98context switches=E2=80=99 (= i.e., many captured > > and resumed continuations). > >=20 > > Also note that a connection has some state: to the guix-daemon, it acts= as > > a GC root for everything built with the connection, and everything adde= d to > > the store (with add-to-store & friends) with that connection ... Simply > > reconnecting isn't sufficient. >=20 > pardon my ignorance wrt dynamic-wind and call/cc, but does that^ mean > that 1) i should simply leave the wind part of the dynamic-wind empty > and move back the open-connection call into the let... or that 2) the > entire idea of replacing the exception handler with an unwind-protect > is flawed? About 1): which 'wind part' of dynamic-wind are you referring to? The in-guard or the out-guard? If the out-guard is empty, then the reference to the old connection will be overwritten when the fiber is paused and resumed, so the old connection will eventually be GC'ed, thus the daemon forgets some GC roots, leading to a rare GC bug. If the in-guard is empty, then the after pausing the fiber and resuming it, the connection will be closed while the fiber might still need it. > if 2) then i'll try to smarten up the handler to use raise-continuable > if the exception is of type &warning. That should work. Or simpler: always use raise-continuable. > or any better ideas? Conventionally, to emit warnings, the procedure 'warning' from (guix diagnostics) is used. See e.g. (guix ci), (guix deprecation), (guix = gexp), (guix import ...), various modules under (guix scripts ...), (guix upstream= ) ... Is there any reason not to use this pre-existing procedure? Greetings, Maxime --=-V/4MxGN70x5Z6s40eva8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVTOPhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kuAAQCi8x1NRBBbbxHyFXbLl61sG0ss PuW6GDFBYCce02bXJQD+KB6Al9UEmjJL54d0ZSqL5GHacy/U1mFVBHwJVrwxFQA= =C9qm -----END PGP SIGNATURE----- --=-V/4MxGN70x5Z6s40eva8--