From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id OLIFH0a/FmYIEAEAqHPOHw:P1 (envelope-from ) for ; Wed, 10 Apr 2024 18:33:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id OLIFH0a/FmYIEAEAqHPOHw (envelope-from ) for ; Wed, 10 Apr 2024 18:33:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=cIk4fnY5; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712766790; 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=eB5iS/FjytBz/2PvBZTnqRrV3tgbyz26ccMm+k7IXI0=; b=n2bL9eSHF/X/Rf2BoPLUusB83FaNYQ8/LiXx3mXKF07+wT+w10JQz6+zl/1v1NIDuNw9bZ bikfEfoysKdI4q1jXj8Q3VT78MU4gyLuK5kqeIhdho/Y2OYbSxh7rhim0t6cByoSA4jAlJ P4uq7EHU8uuI6yMKeh0X/jZagiYk4WusNM69VAdo7+aR5NX55aTJbJfSqjJKmTVnrWlFs4 /eQzG/wLZG16VpAjXg+ANFh9FPW97NkBgAHb9oruc6BIU6ABQfW5+PGueASzdWGUDv/Awv bFHG97tnDL3js8f11LF7OYbSO9W/iyPHHjm6aJvpFYergChaTFWU2SWudRLljw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712766790; a=rsa-sha256; cv=none; b=Afl6P72GTFvMqPKag1NaHT/3CiyZraI7GLb9LOccpqZyoZtjKmM1XJPKppx6cD3sMFd4bv UK1I/dVlC9ubZ9nlEPuf4MrEYzVEkZ0TmgwXMxieuPMla6AL6+qF09XKB0P0luri3CkVTh GxonZ1isnFbrFeqCvbyutrfCT8pKdwuErOtcLzdbvTLgI4oGvGVeASqSRPbjUKVi18rjoh 0B6KWlaNhqbBxPqpoG/gRejCZdRJBkLsca+0Sy2vkcuYp8ZvUhzBHw/6/fsvo9UB1zqTyV hhmKKVya4ArWHojuf8knMhf+lRPSSFPFocZc3J7HQGBXtWEOy2W3BqXcYLNMqg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=cIk4fnY5; 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"; dmarc=pass (policy=none) header.from=gnu.org 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 03C406D119 for ; Wed, 10 Apr 2024 18:33:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruasP-0000Ky-7l; Wed, 10 Apr 2024 12:32:45 -0400 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 1ruasK-0000Kc-GS for guix-devel@gnu.org; Wed, 10 Apr 2024 12:32:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruasJ-0007S5-WD; Wed, 10 Apr 2024 12:32:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=eB5iS/FjytBz/2PvBZTnqRrV3tgbyz26ccMm+k7IXI0=; b=cIk4fnY5eWMmBDGs9zyc tWQ+txak7m9ci4tQo586kBDtQdIBdPk4Xk+d9/Hv01UmKFRvToFBdL6B1nk/aHIZ6W9QJKizWdwZm yoKx+/qYb4q6XuQoQqBMaBwNB7haY844nt5ZgRsAYQJYCZwEsFcu9spjdqNxSJP7RgPhoFOIMoA8v xAzBo6t8cJqh/S9ZmEkDXIm9Grj6sC60hM3+JcoEhrJVsctpfTDAo5wNcQWm+Y1YFC1HQ93oJR1xG WFcvYYNykD46mmcv631V1f7iFkAj3kMTU8c47mZAFemmkZ2F780hvHeNsoRVUnsIYY9Z0LsKmH4tY UnQk37j1hr04EA==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Attila Lendvai Cc: guix-devel Subject: Re: [shepherd] several patches that i deem ready In-Reply-To: (Attila Lendvai's message of "Thu, 18 Jan 2024 23:38:02 +0000") References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Duodi 22 Germinal an 232 de la =?utf-8?Q?R=C3=A9volu?= =?utf-8?Q?tion=2C?= jour de la Romaine 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: Wed, 10 Apr 2024 18:32:30 +0200 Message-ID: <87a5m1i3fl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -11.14 X-Spam-Score: -11.14 X-Migadu-Queue-Id: 03C406D119 X-Migadu-Scanner: mx13.migadu.com X-TUID: tNFH4P0D659R Hi Attila, Attila Lendvai skribis: > i have prepared the rest of my commits that were needed to hunt down the = shepherd hanging bug. you can find them at: > > https://codeberg.org/attila-lendvai-patches/shepherd/commits/branch/attila > > there's some dependency among the commits, so sending them to debbugs wou= ld be either as one big series of commits, or a hopeless labirinth of patch= es otherwise. Yes, but OTOH, piecemeal, focused changes sent to Debbugs are easier to review for me. (There are 34 commits in this branch touching different aspects.) > therefore i recommend the following workflow instead (assuming that Ludo = is pretty much the only one hacking on shepherd): > > Ludo, please take a look at my branch, and cherry-pick whatever you are h= appy with. then based on your feedback, and the new main branch, i'll rebas= e and refine my commits and give you a head's up when it's ready for anothe= r merge/review. > > the commits are more or less ordered in least controversial order, modulo= dependencies. > > the main additions are: > > - a multi-layered error handler that got employed at various points in > the codebase. this makes shepherd much more resilient, even in case > of nested errors, and much more communicative in the log when errors > end up happening. > > - a lightweight logging infrastructure together with plenty of log > lines throughout the codebase, and some hints in the README on how > to turn log lines gray in emacs (i.e. easily ignorable). I cherry-picked a couple of patches. Some notes: + 94c1143 shepherd: Add tests/startup-error.sh Redundant with =E2=80=98tests/startup-failure.sh=E2=80=99 I think? + e802761 service: Add custom printer for records. Good idea, but the goal is to remove GOOPS, so put aside for now. + af2ebec service: respawn-limit: make #f mean no limit. I=E2=80=99d rather not do that: one can use +inf.0 when needed. + 095e930 shepherd: Do not respawn disabled services. That=E2=80=99s already the case (see commit 7c88d67076a0bb1d9014b3bc23ed9c68f1c702ab; maybe we hacked it independently in parallel). + dbc9150 shepherd: Increase the time range for the default respawn limit. This arbitrary and thus debatable, but I think the current setting works well, doesn=E2=80=99t it? + e03b958 support: Add logging operators. + 39c2e14 shepherd: add call-with-error-handling I like the idea: we really need those backtraces to be logged! There are mostly-stylistic issues that would need to be discussed though. I=E2=80=99d like logging to be less baroque; I=E2=80=99m not con= vinced by: + 7183c9c shepherd: Populate the code with some log lines. This is exactly what I=E2=80=99d like to avoid=E2=80=94adding logging sta= tements all around the code base, possibly redundant with existing logging statements that target users. What I do want though is to have =E2=80=9Cfirst-class logs=E2=80=9D, pret= ty much like what we see with =E2=80=98herd log=E2=80=99 etc. To me, that is much mor= e useful than writing the arguments passed each and every =E2=80=98fork+exec-command=E2= =80=99 call. I=E2=80=99ll have to look further that branch. I admit I have limited band= width available and, perhaps selfishly, I like to use my free-time computing to hack myself. Regardless, I=E2=80=99d like to thank you for your continued efforts on the Shepherd. In one way or another, it contributes to shaping it. Ludo=E2=80=99.