From debbugs-submit-bounces@debbugs.gnu.org Fri May 21 04:49:18 2021 Received: (at submit) by debbugs.gnu.org; 21 May 2021 08:49:18 +0000 Received: from localhost ([127.0.0.1]:35810 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk0qM-0006bp-2x for submit@debbugs.gnu.org; Fri, 21 May 2021 04:49:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:51342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk0qJ-0006bg-6r for submit@debbugs.gnu.org; Fri, 21 May 2021 04:49:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk0qI-0002tt-7G for bug-guix@gnu.org; Fri, 21 May 2021 04:49:14 -0400 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:60128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk0qD-0000qB-FO for bug-guix@gnu.org; Fri, 21 May 2021 04:49:14 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id 7Lp4250030mfAB406Lp4CE; Fri, 21 May 2021 10:49:04 +0200 Message-ID: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> Subject: "Daemon not running" exception when avahi-daemon is not running From: Maxime Devos To: bug-guix@gnu.org Date: Fri, 21 May 2021 10:48:53 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Yp/me8wgFtDnxMc9oSPg" 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=1621586944; bh=EPCqlENSc25Ed0R4QLHXsL5YIdsZFY+DtrFsvLNq6Ko=; h=Subject:From:To:Date; b=HGV7Iy9p2VEp+JGi5RjrfuQlAx3fWNWVkLvnLpoeK5+SeCMnCYw4jsuC5RI1/inJf Eez04w7U88odC1Te6ZnoxTpYVdFf5SpNmMcRu3A8UTDMyk3Tu1Ltsf5U5GjQEPqZTD 3TS+W/cq9U69iri4oyr6YvdbEgKVtB5nq1xdzVWvqqeb59BrdJbg8DR2m/Uld8CJ80 DY4vwX3jClyhj0V43g2GcvPXRhPwGIbM/a43PQzgiUvlZCqcVwJch411uSdoZanqPb fKLz/+I6vgtBoWrWbOERkHL/gVjtN3AfIoEJolnzv0svL6moR+FDSDVwlgZ6UjNTCK jza3NVRTYxK2Q== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, 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-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-Yp/me8wgFtDnxMc9oSPg Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Severity: minor My /var/log/guix-daemon.log.* are full of backtraces like these (and boring messages like SIGPOLL, spurious SIGPOLL, accepted connections from pid [..], user [...]). Backtrace: In ice-9/boot-9.scm: 1752:10 10 (with-exception-handler _ _ #:unwind? _ # _) In unknown file: 9 (apply-smob/0 #) In ice-9/boot-9.scm: 724:2 8 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 7 (_ #(#(#))) In guix/ui.scm: 2166:12 6 (run-guix-command _ . _) In ice-9/boot-9.scm: 1752:10 5 (with-exception-handler _ _ #:unwind? _ # _) 1747:15 4 (with-exception-handler # =E2=80=A6) In guix/scripts/discover.scm: 141:8 3 (_) In guix/avahi.scm: 171:17 2 (avahi-browse-service-thread _ #:types _ #:ignore-local? =E2= =80=A6) In unknown file: 1 (make-client # () #) In ice-9/boot-9.scm: 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `avahi-error' with args `(# make-client)'. Some kind of warning message when the daemon is not running makes sense, but a full backtrace seems unneeded. Maybe print a line like: warning: avahi daemon is not running, cannot auto-discover substitute ser= vers! instead. Greetings, Maxime. --=-Yp/me8wgFtDnxMc9oSPg 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+4iGRcl7gUCYKdz9RccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kaUAQDgmZpI6l3LnTECZfpOlA0T2wqH 8CXMyrFwEdcuNfDp9gD/bNdp9hHLMNFxANS0vaVAuF0i3bjhVTb3SjgH2VpKXgQ= =CwcT -----END PGP SIGNATURE----- --=-Yp/me8wgFtDnxMc9oSPg-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 21 09:23:20 2021 Received: (at 48561) by debbugs.gnu.org; 21 May 2021 13:23:20 +0000 Received: from localhost ([127.0.0.1]:36056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk57Y-0001ZB-H4 for submit@debbugs.gnu.org; Fri, 21 May 2021 09:23:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk57U-0001Yw-Ev for 48561@debbugs.gnu.org; Fri, 21 May 2021 09:23:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42338) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk57O-0004Jx-71; Fri, 21 May 2021 09:23:10 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=50342 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk57N-0000TQ-Sw; Fri, 21 May 2021 09:23:10 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: bug#48561: "Daemon not running" exception when avahi-daemon is not running References: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> Date: Fri, 21 May 2021 15:23:08 +0200 In-Reply-To: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> (Maxime Devos's message of "Fri, 21 May 2021 10:48:53 +0200") Message-ID: <87im3cqkzn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48561 Cc: 48561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Hello Maxime, > warning: avahi daemon is not running, cannot auto-discover substitute servers! This should be fixed with the attached patch. Thanks, Mathieu --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-scripts-discover-Warn-when-the-daemon-is-unreachable.patch Content-Transfer-Encoding: quoted-printable >From a50bbf99f65d26bbdb0d16112a49335bf913b822 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 21 May 2021 15:21:15 +0200 Subject: [PATCH] scripts: discover: Warn when the daemon is unreachable. * guix/scripts/discover (guix-discover): Print a warning message when the daemon is unreachable. --- guix/scripts/discover.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm index be1eaa6e95..e42f7662d0 100644 --- a/guix/scripts/discover.scm +++ b/guix/scripts/discover.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2020 Mathieu Othacehe +;;; Copyright =C2=A9 2020, 2021 Mathieu Othacehe ;;; Copyright =C2=A9 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. @@ -26,6 +26,7 @@ #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix scripts publish) + #:use-module (avahi) #:use-module (ice-9 rdelim) #:use-module (srfi srfi-37) #:export (read-substitute-urls @@ -138,5 +139,13 @@ to synchronize with the writer." (parameterize ((%publish-file publish-file)) (mkdir-p (dirname publish-file)) (false-if-exception (delete-file publish-file)) - (avahi-browse-service-thread service-proc - #:types %services))))) + (catch 'avahi-error + (lambda () + (avahi-browse-service-thread service-proc + #:types %services)) + (lambda (key err function . _) + (cond + ((eq? err error/no-daemon) + (warning (G_ "Avahi daemon is not running, \ +cannot auto-discover substitutes servers.~%")))) + (exit 1))))))) --=20 2.31.1 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 21 10:37:54 2021 Received: (at 48561) by debbugs.gnu.org; 21 May 2021 14:37:54 +0000 Received: from localhost ([127.0.0.1]:37362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk6Hi-0005rI-Jh for submit@debbugs.gnu.org; Fri, 21 May 2021 10:37:54 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:34136) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk6He-0005r8-Ks for 48561@debbugs.gnu.org; Fri, 21 May 2021 10:37:53 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id 7Sdo2500h0mfAB401SdonL; Fri, 21 May 2021 16:37:49 +0200 Message-ID: Subject: Re: bug#48561: "Daemon not running" exception when avahi-daemon is not running From: Maxime Devos To: Mathieu Othacehe Date: Fri, 21 May 2021 16:37:48 +0200 In-Reply-To: <87im3cqkzn.fsf@gnu.org> References: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> <87im3cqkzn.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-8iKBrrvKGqXf1vzSaoGo" 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=1621607869; bh=Yb6YQ7i5zkUJpsNmarXkuOySqC4RoBi9+gS+1VAGJGU=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=vC9+vCL1UCbTRYk7YhwH+JyXga7/pSopGURv/ZL4mMTTXLG4zNKX7oi6jAUpmPhXj 0KDPaGJJOLT2H0KzhsSgkfxV6y9uTqACoxfzJ4+cJlCgxylJeigJ4CNHaWDXEwFyIv Pt+MCH03BMn15YLQc4ZUKEXGhf10jSXVur1C9xNYTw8L2TRB2I5VL9fVzz4ADlcK8S ZDZwriUjP6mjGlu/rurbWCVUkGy2NDCJMYp5v5ic6aaCIMGwg40PA9kE5+itCayIBM 0LLevDOMXe5/OxEuC3vJBhQUZZ4w7pBEh8Jc4IOaPuzGiRe1MXEbPk5at16UnutUOk zg0XFBya7P3+g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 48561 Cc: 48561@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --=-8iKBrrvKGqXf1vzSaoGo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Mathieu, Mathieu Othacehe schreef op vr 21-05-2021 om 15:23 [+0200]: > + (catch 'avahi-error > + (lambda () > + (avahi-browse-service-thread service-proc > + #:types %services)) > + (lambda (key err function . _) > + (cond > + ((eq? err error/no-daemon) > + (warning (G_ "Avahi daemon is not running, \ > +cannot auto-discover substitutes servers.~%")))) > + (exit 1))))))) Shouldn't this code print an an error message when err is something other than error/no-daemon? You can use error->string. Two examples from (guile-avahi)Error handling: 2.4 Error Handling =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Avahi errors are implemented as Scheme exceptions (*note exceptions in Guile: (guile)Exceptions.). Each time a Avahi function returns an error, an exception with key 'avahi-error' is raised. The additional arguments that are thrown include an error code and the name of the Avahi procedure that raised the exception. The error code is pretty much like an enumerate value: it is one of the 'error/' variables exported by the '(avahi)' module (*note Enumerates and Constants::). Exceptions can be turned into error messages using the 'error->string' procedure. The following examples illustrates how Avahi exceptions can be handled: (let ((poll (make-simple-poll))) ;; ;; ... ;; (catch 'avahi-error (lambda () (run-simple-poll (simple-poll poll))) (lambda (key err function . currently-unused) (format (current-error-port) "an Avahi error was raised by `~a': ~a~%" function (error->string err))))) Again, error values can be compared using 'eq?': ;; `avahi-error' handler. (lambda (key err function . currently-unused) (if (eq? err error/no-daemon) (format (current-error-port) "~a: the Avahi daemon is not running~%" function))) Otherwise LGTM, but I haven't tested. Greetings, Maxime. --=-8iKBrrvKGqXf1vzSaoGo 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+4iGRcl7gUCYKfFvBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7iObAQCoPrIebwJ6Om7X7JkhRUmyGgjG o8fwjpdo5o0iRUR29AEA7Kqfv3dCjFEM7H54h/9R5ckO1Shy6dwOq1nJh/4cMww= =ignq -----END PGP SIGNATURE----- --=-8iKBrrvKGqXf1vzSaoGo-- From debbugs-submit-bounces@debbugs.gnu.org Sat May 22 08:06:44 2021 Received: (at 48561-done) by debbugs.gnu.org; 22 May 2021 12:06:44 +0000 Received: from localhost ([127.0.0.1]:38435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQOy-0004kU-K0 for submit@debbugs.gnu.org; Sat, 22 May 2021 08:06:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkQOx-0004kF-8t for 48561-done@debbugs.gnu.org; Sat, 22 May 2021 08:06:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57880) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkQOr-0007r0-3J; Sat, 22 May 2021 08:06:37 -0400 Received: from [2a01:e0a:21b:22b0:b5dd:10be:b0d1:153d] (port=51788 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkQOq-0008Pw-RF; Sat, 22 May 2021 08:06:37 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: bug#48561: "Daemon not running" exception when avahi-daemon is not running References: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> <87im3cqkzn.fsf@gnu.org> Date: Sat, 22 May 2021 14:06:35 +0200 In-Reply-To: (Maxime Devos's message of "Fri, 21 May 2021 16:37:48 +0200") Message-ID: <87r1hznfas.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48561-done Cc: 48561-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hey, > Otherwise LGTM, but I haven't tested. Fixed with 7003b2db526fc367664f3a7c4bdbe38a7c717da6. Thanks, Mathieu From unknown Fri Aug 15 22:17:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 20 Jun 2021 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator