From debbugs-submit-bounces@debbugs.gnu.org Tue May 11 16:49:26 2021 Received: (at submit) by debbugs.gnu.org; 11 May 2021 20:49:26 +0000 Received: from localhost ([127.0.0.1]:37622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZJm-0003g0-0R for submit@debbugs.gnu.org; Tue, 11 May 2021 16:49:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:58186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgZJj-0003fs-NW for submit@debbugs.gnu.org; Tue, 11 May 2021 16:49:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43468) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZJj-0007EP-Ey for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37802) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgZJj-0001CN-81 for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:50618 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgZJi-0003Mv-II for bug-guile@gnu.org; Tue, 11 May 2021 16:49:23 -0400 From: Marius Bakke To: bug-guile@gnu.org Subject: eq? problem at -O2 since Guile 3.0.5 Date: Tue, 11 May 2021 22:49:19 +0200 Message-ID: <87pmxxhu7k.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) 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: -3.3 (---) --=-=-= Content-Type: text/plain Hi! I haven't been able to make a reproducer for this, but for illustrative purposes, here is a code snippet that fails with -O2 on Guile 3.0.5 and later (excerpt from GNU Shepherd): (define (run-command socket-file action service args) "Perform ACTION with ARGS on SERVICE, and display the result. Connect to the daemon via SOCKET-FILE." (with-system-error-handling (let ((sock (open-connection socket-file)) (action* (if (and (eq? action 'detailed-status) (memq service '(root shepherd))) 'status action))) ;; Send the command. (write-command (shepherd-command action* service #:arguments args) sock) https://git.savannah.gnu.org/cgit/shepherd.git/tree/modules/shepherd/scripts/herd.scm#n124 At -O2, (eq? action 'detailed-status) evaluates to true no matter what symbol ACTION holds. Interestingly, adding (pk action*) between LET and WRITE-COMMAND gives the expected result and mitigates the problem(!). There are other issues that can be observed by running the Shepherd test suite (i.e. make -j4 check). With -O1 all pass. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYJrtzw8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHe4hQEAknNS0PVUkTkz0Wy3x/S3Qu50FowvKcMDxmKx nsISOG8BALKLfG7ywwYVOnuC73czgpEaLT3EMzjBdGHnh7Tu6wEO =4y51 -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 11:23:59 2021 Received: (at 48368) by debbugs.gnu.org; 23 May 2021 15:23:59 +0000 Received: from localhost ([127.0.0.1]:41653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkpxP-0003cP-6N for submit@debbugs.gnu.org; Sun, 23 May 2021 11:23:59 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40698) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkpxM-0003c7-SK; Sun, 23 May 2021 11:23:57 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34382) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkpxH-0001fq-Mq; Sun, 23 May 2021 11:23:51 -0400 Received: from host-37-191-231-185.lynet.no ([37.191.231.185]:44036 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkpxG-0006Gs-82; Sun, 23 May 2021 11:23:51 -0400 From: Marius Bakke To: Ludovic =?utf-8?Q?Court=C3=A8s?= , 47172@debbugs.gnu.org Subject: Re: bug#47172: Shepherd 0.8.1 tests fail on core-updates In-Reply-To: <87v9794l2a.fsf@gnu.org> References: <37305bfa08faea95b45a6496623154c2ebab1f11.camel@zaclys.net> <87zgwl4ui0.fsf@gnu.org> <87v9794l2a.fsf@gnu.org> Date: Sun, 23 May 2021 17:23:48 +0200 Message-ID: <875yz9qxrv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48368 Cc: 48368@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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s skriver: > Ludovic Court=C3=A8s skribis: > >> This turns out to be due to a=E2=80=A6 miscompilation bug. >> >> In (shepherd scripts herd), =E2=80=98run-command=E2=80=99 has this code: >> >> (let ((sock (open-connection socket-file)) >> (action* (if (and (eq? action 'detailed-status) >> (memq service '(root shepherd))) >> 'status >> action))) >> =E2=80=A6) >> >> Problem is that everything works as if (eq? action 'detailed-status) >> was omitted, such that =E2=80=98herd stop root=E2=80=99 is interpreted a= s =E2=80=98herd status >> root=E2=80=99. > > A workaround that works with 3.0.7 is swapping the two =E2=80=98and=E2=80= =99 > sub-expressions: > > diff --git a/modules/shepherd/scripts/herd.scm b/modules/shepherd/scripts= /herd.scm > index 106de1e..39d2e34 100644 > --- a/modules/shepherd/scripts/herd.scm > +++ b/modules/shepherd/scripts/herd.scm > @@ -126,8 +126,8 @@ of pairs." > the daemon via SOCKET-FILE." > (with-system-error-handling > (let ((sock (open-connection socket-file)) > - (action* (if (and (eq? action 'detailed-status) > - (memq service '(root shepherd))) > + (action* (if (and (memq service '(root shepherd)) > + (eq? action 'detailed-status)) > 'status > action))) > ;; Send the command. Cc'ing the relevant Guile bug: https://bugs.gnu.org/48368 See also commit 79be6a985799adc6d663890250f4fb7c12f015b4 on 'core-updates' that builds with -O1 as a less satisfactory workaround. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCYKpzhA8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHd0CgD9FsWiNMu2PxB/773BI2hOmYPKZqyX+KbAy05R C7+xubIBAPcyjBy9TtmqfG0aCSUu1r6a8dmFKkJm4r4eb5fLEwEK =o7Sr -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun May 23 17:43:26 2021 Received: (at 48368) by debbugs.gnu.org; 23 May 2021 21:43:26 +0000 Received: from localhost ([127.0.0.1]:41884 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvsc-00008o-5o for submit@debbugs.gnu.org; Sun, 23 May 2021 17:43:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lkvsY-00008V-Hu; Sun, 23 May 2021 17:43:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44660) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lkvsT-000595-AX; Sun, 23 May 2021 17:43:17 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=47488 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lkvsN-0005t4-E1; Sun, 23 May 2021 17:43:13 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Marius Bakke Subject: Re: bug#47172: Shepherd 0.8.1 tests fail on core-updates References: <37305bfa08faea95b45a6496623154c2ebab1f11.camel@zaclys.net> <87zgwl4ui0.fsf@gnu.org> <87v9794l2a.fsf@gnu.org> <875yz9qxrv.fsf@gnu.org> Date: Sun, 23 May 2021 23:43:09 +0200 In-Reply-To: <875yz9qxrv.fsf@gnu.org> (Marius Bakke's message of "Sun, 23 May 2021 17:23:48 +0200") Message-ID: <87lf853z4i.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: 48368 Cc: 47172@debbugs.gnu.org, 48368@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; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, Marius Bakke skribis: > Ludovic Court=C3=A8s skriver: [...] >> A workaround that works with 3.0.7 is swapping the two =E2=80=98and=E2= =80=99 >> sub-expressions: >> >> diff --git a/modules/shepherd/scripts/herd.scm b/modules/shepherd/script= s/herd.scm >> index 106de1e..39d2e34 100644 >> --- a/modules/shepherd/scripts/herd.scm >> +++ b/modules/shepherd/scripts/herd.scm >> @@ -126,8 +126,8 @@ of pairs." >> the daemon via SOCKET-FILE." >> (with-system-error-handling >> (let ((sock (open-connection socket-file)) >> - (action* (if (and (eq? action 'detailed-status) >> - (memq service '(root shepherd))) >> + (action* (if (and (memq service '(root shepherd)) >> + (eq? action 'detailed-status)) >> 'status >> action))) >> ;; Send the command. > > Cc'ing the relevant Guile bug: > > https://bugs.gnu.org/48368 Oh nice! (It would have saved me a bit of time to catch up on email beforehand. :-)) > See also commit 79be6a985799adc6d663890250f4fb7c12f015b4 on > 'core-updates' that builds with -O1 as a less satisfactory workaround. I found that =E2=80=98-O2 -Ono-resolve-primitives=E2=80=99 also does the tr= ick. If we manually replace =E2=80=98memq=E2=80=99 by two =E2=80=98eq?=E2=80=99 = tests (which is what the compiler does), the same problem is exhibited: --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/modules/shepherd/scripts/herd.scm b/modules/shepherd/scripts/herd.scm index 106de1e..513508f 100644 --- a/modules/shepherd/scripts/herd.scm +++ b/modules/shepherd/scripts/herd.scm @@ -127,7 +127,8 @@ the daemon via SOCKET-FILE." (with-system-error-handling (let ((sock (open-connection socket-file)) (action* (if (and (eq? action 'detailed-status) - (memq service '(root shepherd))) + (or (eq? service 'root) + (eq? service 'shepherd))) 'status action))) ;; Send the command. --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E2=80=98-Ono-resolve-primitives=E2=80=99 also helps in this case. =E2=80=98-Ono-optimize-branch-chains=E2=80=99 has no effect. So, not much progress, but at least we have a workaround. Thanks, Ludo=E2=80=99. --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon May 24 04:15:15 2021 Received: (at 48368) by debbugs.gnu.org; 24 May 2021 08:15:15 +0000 Received: from localhost ([127.0.0.1]:42323 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll5k3-00014R-1m for submit@debbugs.gnu.org; Mon, 24 May 2021 04:15:15 -0400 Received: from fanzine.igalia.com ([178.60.130.6]:57744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll5k0-000143-1V for 48368@debbugs.gnu.org; Mon, 24 May 2021 04:15:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=twagyuVSdoQ9y0s/gUgmeSAlUQFdD7AEC4/PcTL2Jb0=; b=LjFOrUdbq0kh80UQdS9Z7zCK+HxgvHA76cym+NQGcqFGjALLRVJyMzVZLQtMdU+NOnrxdFYnxBFGlKoQmGldO77CFLkR7+7+u7hjvvLiaKb4oloZUHI+PqeMCklfg8Deyz1/GZLmKhnLP4dJNdfuesyulNSjVB8XIYPyqWrHyLDShbHly60Vhng6AyYvhAKQ7/6mv1TUq6l6ZMMDxzkvKU8bm+9c71cj0hJ46PaiNMYiczT4Z0ilYFtfvKLt13ZpgRPEwe46KNvBffQatUbp1z7KXw07yArAjPA+K/TjJsbCIU/jvu9Qmyx/86fPq72kNux3HHK01yT8BgSWdz5pHA==; Received: from 82-65-63-215.subs.proxad.net ([82.65.63.215] helo=milano) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ll5jt-0005jS-0v for <48368@debbugs.gnu.org>; Mon, 24 May 2021 10:15:05 +0200 From: Andy Wingo To: 48368@debbugs.gnu.org Subject: reduced test case Date: Mon, 24 May 2021 10:14:54 +0200 Message-ID: <87lf841rb5.fsf@igalia.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48368 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.0 (-) Test case: (define (f a b) (let ((c (if (and (eq? a 'foo) (eq? b 'bar)) 'ERROR a))) (pk c))) If you run as (f 'not-foo 'bar), you get 'ERROR. Yeeps! From debbugs-submit-bounces@debbugs.gnu.org Mon May 24 08:19:45 2021 Received: (at 48368-done) by debbugs.gnu.org; 24 May 2021 12:19:45 +0000 Received: from localhost ([127.0.0.1]:42533 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll9Yf-0001Az-9P for submit@debbugs.gnu.org; Mon, 24 May 2021 08:19:45 -0400 Received: from fanzine.igalia.com ([178.60.130.6]:39675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ll9Ya-0001Ag-6G for 48368-done@debbugs.gnu.org; Mon, 24 May 2021 08:19:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=Rvvoakya1P0PUyLTBWDluBtBJt0u4nzQ3OGphUw9Pic=; b=GC7k9mZ7ed3Lr1WG8qOXGhhXgvGv8A/LhVgwx6dKX+C8LSBX8JZZ+CI2gFvcZV9LuMF08Sg5tveuamqCxrUmEGhzk7TufGpJRIXLYzGHEJ2dC0+j88XlDUYaJ01IibqnyGMeeCdG42Tz6/mD5x3vl84K43pHdbfu9RaHIlQhdcY6LfqjO8Mc4gd3siSrhCg+8ShbcTl9mldtoyLR2rHnOsoc1vXQIVI6nmR0d5uae1xcDljlKJadVD3Xmw2+XU/HOzkmGV+JxJQKsJhsCCFyVk744eNrbvpiAwbB3Ww7OoPQQZkZStehcZSsjE9Vr8rwgUYnYK0QOKGL5juOY//jpg==; Received: from 82-65-63-215.subs.proxad.net ([82.65.63.215] helo=milano) by fanzine.igalia.com with esmtpsa (Cipher TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim) id 1ll9YT-0003GM-DD for <48368-done@debbugs.gnu.org>; Mon, 24 May 2021 14:19:33 +0200 From: Andy Wingo To: 48368-done@debbugs.gnu.org Subject: thanks Date: Mon, 24 May 2021 14:19:22 +0200 Message-ID: <87cztg1fzp.fsf@igalia.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 48368-done 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.0 (-) Fixed in 17aab66e75136cf23c7f0d4942b61d6947f98f9b. Thanks for the report :) From unknown Thu Jun 19 14:22:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 22 Jun 2021 11:24:08 +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