From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 28 12:44:32 2021 Received: (at submit) by debbugs.gnu.org; 28 Aug 2021 16:44:32 +0000 Received: from localhost ([127.0.0.1]:54934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK1RU-00026k-57 for submit@debbugs.gnu.org; Sat, 28 Aug 2021 12:44:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:41208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mK1RO-00026U-HW for submit@debbugs.gnu.org; Sat, 28 Aug 2021 12:44:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49582) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mK1RO-0004pq-AQ for guix-patches@gnu.org; Sat, 28 Aug 2021 12:44:22 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:36606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mK1RL-0005My-CX for guix-patches@gnu.org; Sat, 28 Aug 2021 12:44:21 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 1232640F6F for ; Sat, 28 Aug 2021 18:44:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1630169052; x=1631983453; bh=MBcO5+u4RdxlkE9bJ2t9qUudWYGJowldh5Tl2JrCj88=; b=oNXVuzgZaUCO OreMdWHQoEUtpX0ZBG1tMMCCmen0IOcbuRWszZPuf8AHKvElZ0garQc3DxtROJfv y+zutIFzde3gJfZ/w/RIa6JBAXJJTNmCj82EsFuxDWvD0XJeFRWz5yogMJ3R+HDk hiCBnpp9QIv7kBE8X2gbzk3vxuZnGhwxG/WVjZJXGfPxrBepkg+DANWL4NfJRGBp tAWltxTTqoYt6N7b5O3LHw6MXad6WWzF9ZPqQhenBXzmF/LtTB8HymZQxtj0TdwC 6CWt1lqOPm4RX1CKbP0tak4LnVyRc4bCdaKL5POTTh3VVZ+wSP2QjOZ4UiKWbW5u D7SrzkhslfN7BicVeUvNqJstMky/I1dUi8FesD+uRw96lmLeE1j2bPCUPEK72wMm 3e3phbIlIs9Rg/PiCHLSeyIxCvb/IcEMSlxLXbNFw8X4h6+iOSVxoH1YELqaAj0Q L7iBInf/H0+zT6dx/4G3ac15wkKx0HYwN42sAcsCi7CVOsLgC46JOWBgVw3G1v0o imnZPhWmryp2yOEfv0UffsFqOCLy7fvxxxoQv29wxCOl9PSXGt5T6cCGMY/ZvXFX KPLURDvd6PcOX3jrVLHFIbvLVZGaWBYINR2QXNMwPxGYbne5DoVE5XhBjLJ8BE8A NwQifAPl4JBktf0pXW5nFIHUMKcwUuM= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lFMQvNIxlV_3 for ; Sat, 28 Aug 2021 18:44:12 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 07EFB4067E for ; Sat, 28 Aug 2021 18:44:11 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 5E239AFB; Sat, 28 Aug 2021 18:44:10 +0200 (CEST) From: Thiago Jung Bauermann To: guix-patches@gnu.org Subject: [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. Date: Sat, 28 Aug 2021 13:43:57 -0300 Message-Id: <20210828164357.8868-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=95.128.36.40; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Thiago Jung Bauermann 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.4 (--) diffutils has a race condition in its signal processing code which is easy to trigger on powerpc64le-linux. More often than not, it causes the ‘colors’ test to fail and therefore the build of the package fails as well. Add the patch proposed in Debian bug 922552 which fixes the problem. * gnu/packages/patches/diffutils-fix-signal-processing.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (diffutils)[source]: Use it. --- Hello, This fixes the build of diffutils on powerpc64le-linux, which currently fails more often than not. The patch I’m adding here isn’t being shipped by Debian and hasn’t been seen by upstream yet. I just brought it to their attention here: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34519#11 I’m not familiar with the diffutils code base, but FWIW I analysed the patch and it looks very reasonable to me. To be honest I’m not sure if it completely fixes the race condition or just makes it much less likely to happen, but in any case I can’t hit the race condition anymore. In addition, since all it does is add a new call to the function which checks and processes any pending signal, I don’t think it can cause any harm. Finally, this patch is based on top of the one which updates diffutils to version 3.8: https://issues.guix.gnu.org/50233 The fix works equally well in version 3.7 so if you think it’s not worth updating diffutils I can rebase this patch on top of current ‘core-updates-frozen’. gnu/local.mk | 1 + gnu/packages/base.scm | 3 +- .../diffutils-fix-signal-processing.patch | 60 +++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/diffutils-fix-signal-processing.patch diff --git a/gnu/local.mk b/gnu/local.mk index 11b002b66e72..bc385eecc592 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -962,6 +962,7 @@ dist_patch_DATA = \ %D%/packages/patches/desmume-gcc6-fixes.patch \ %D%/packages/patches/desmume-gcc7-fixes.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ + %D%/packages/patches/diffutils-fix-signal-processing.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/disarchive-cross-compilation.patch \ %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 2c648953ae39..0e3b346b93a0 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -272,7 +272,8 @@ differences.") version ".tar.xz")) (sha256 (base32 - "1v4g8gi0lgakqa7iix8s4fq7lq6l92vw3rjd9wfd2rhjng8xggd6")))) + "1v4g8gi0lgakqa7iix8s4fq7lq6l92vw3rjd9wfd2rhjng8xggd6")) + (patches (search-patches "diffutils-fix-signal-processing.patch")))) (build-system gnu-build-system) (native-inputs (list perl)) (synopsis "Comparing and merging files") diff --git a/gnu/packages/patches/diffutils-fix-signal-processing.patch b/gnu/packages/patches/diffutils-fix-signal-processing.patch new file mode 100644 index 000000000000..24130bd4c37a --- /dev/null +++ b/gnu/packages/patches/diffutils-fix-signal-processing.patch @@ -0,0 +1,60 @@ +Author: Frédéric Bonnard + +Obtained from: + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922552#19 + +and slightly adapted to apply on v3.8. + +Fixes bug reported upstream at: + +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34519 + +diff --git a/src/diff.c b/src/diff.c +index 9938daa0c8fd..2bc443f1ca70 100644 +--- a/src/diff.c ++++ b/src/diff.c +@@ -1453,6 +1453,8 @@ compare_files (struct comparison const *parent, + } + } + ++ final_process_signals (); ++ + /* Now the comparison has been done, if no error prevented it, + and STATUS is the value this function will return. */ + +diff --git a/src/diff.h b/src/diff.h +index 27362c010fd2..28c89b0797ef 100644 +--- a/src/diff.h ++++ b/src/diff.h +@@ -390,6 +390,7 @@ extern enum changes analyze_hunk (struct change *, lin *, lin *, lin *, lin *); + extern void begin_output (void); + extern void debug_script (struct change *); + extern void fatal (char const *) __attribute__((noreturn)); ++extern void final_process_signals (void); + extern void finish_output (void); + extern void message (char const *, char const *, char const *); + extern void message5 (char const *, char const *, char const *, +diff --git a/src/util.c b/src/util.c +index 4348757e1507..8954197f33fc 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -237,6 +237,18 @@ process_signals (void) + } + } + ++/* Process remaining signals once before exit */ ++void ++final_process_signals (void) ++{ ++ static int last = 1; ++ ++ if (last) { ++ process_signals (); ++ last = 0; ++ } ++} ++ + static void + install_signal_handlers (void) + { From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 07:43:58 2021 Received: (at 50239) by debbugs.gnu.org; 30 Aug 2021 11:43:58 +0000 Received: from localhost ([127.0.0.1]:58297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfhl-0000hK-Gx for submit@debbugs.gnu.org; Mon, 30 Aug 2021 07:43:57 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:36614) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKfhh-0000h9-Mf for 50239@debbugs.gnu.org; Mon, 30 Aug 2021 07:43:56 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id nnjr2500H0mfAB401njr0F; Mon, 30 Aug 2021 13:43:52 +0200 Message-ID: Subject: Re: [bug#50239] [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. From: Maxime Devos To: Thiago Jung Bauermann , 50239@debbugs.gnu.org Date: Mon, 30 Aug 2021 13:43:42 +0200 In-Reply-To: <20210828164357.8868-1-bauermann@kolabnow.com> References: <20210828164357.8868-1-bauermann@kolabnow.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-dNXV/BKqbMk29130DVyy" 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=1630323832; bh=iRg1ADs3a/cIZyy/yn1AqH+3EzgxFcwJgxohOZVBiig=; h=Subject:From:To:Date:In-Reply-To:References; b=NASNHp3EjVrN9IqHHW8Btk04G2Y672t7dGyXhGxe2HZYuV10JWeFB6b7/0u68bDxw +ZZS9fdMlg3v6dBMJWcFrH3lb4DraJRNPoQeZqCHXpMH03nUE8k5Va+LmMCQMUyEe5 6MxKzCdtF1COKjfHASeOBqeIY5u2wlv2W6BYnluhiZQxzmhiajU4L7ogQ4Scu3QHml 9o+k1OoFLe/Z17JuQo/WnE8g6GVv+0XJgKrNCMtOxogBv4ulHN9i7cnvRwZCo1+BZ7 plVTaG/AM6PZFJCmU3zk/J8MYZEvQPiDG0tSLm1J0Tu5vPGXP4BaNryry8Vrf1ZQgU BXYW+m2CNe3dg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 50239 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 (-) --=-dNXV/BKqbMk29130DVyy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thiago Jung Bauermann via Guix-patches via schreef op za 28-08-2021 om 13:4= 3 [-0300]: > [...] > diffutils has a race condition in its signal processing code which is eas= y > to trigger on powerpc64le-linux. More often than not, it causes the > =E2=80=98colors=E2=80=99 test to fail and therefore the build of the pack= age fails as well. > [...] Adding this patch makes sense to me too, though I don't have a powerpc64le-= linux to test this on. > Add the patch proposed in Debian bug 922552 which fixes the problem. Do you think upstream will have its own working patch soonish? (See , for people who aren't Thiago Jung Bauermann.) If so, it might make sense to wait a li= ttle for an =E2=80=98official=E2=80=99 patch. > * gnu/packages/patches/diffutils-fix-signal-processing.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/base.scm (diffutils)[source]: Use it. > --- >=20 > Hello, >=20 > This fixes the build of diffutils on powerpc64le-linux, which currently > fails more often than not. The patch I=E2=80=99m adding here isn=E2=80=99= t being > shipped by Debian and hasn=E2=80=99t been seen by upstream yet. I just br= ought > it to their attention here: >=20 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34519#11 >=20 > I=E2=80=99m not familiar with the diffutils code base, but FWIW I analyse= d > the patch and it looks very reasonable to me. To be honest I=E2=80=99m no= t > sure if it completely fixes the race condition or just makes it much > less likely to happen, but in any case I can=E2=80=99t hit the race condi= tion > anymore. >=20 > In addition, since all it does is add a new call to the function which > checks and processes any pending signal, I don=E2=80=99t think it can cau= se > any harm. >=20 > Finally, this patch is based on top of the one which updates diffutils > to version 3.8: >=20 > https://issues.guix.gnu.org/50233 >=20 > The fix works equally well in version 3.7 so if you think it=E2=80=99s no= t > worth updating diffutils I can rebase this patch on top of current > =E2=80=98core-updates-frozen=E2=80=99. >=20 > gnu/local.mk | 1 + > gnu/packages/base.scm | 3 +- > .../diffutils-fix-signal-processing.patch | 60 +++++++++++++++++++ > 3 files changed, 63 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/diffutils-fix-signal-processing.= patch >=20 > diff --git a/gnu/local.mk b/gnu/local.mk > index 11b002b66e72..bc385eecc592 100644 > --- a/gnu/local.mk > +++ b/gnu/local.mk > @@ -962,6 +962,7 @@ dist_patch_DATA =3D \ > %D%/packages/patches/desmume-gcc6-fixes.patch \ > %D%/packages/patches/desmume-gcc7-fixes.patch \ > %D%/packages/patches/dfu-programmer-fix-libusb.patch \ > + %D%/packages/patches/diffutils-fix-signal-processing.patch \ > %D%/packages/patches/diffutils-gets-undeclared.patch \ > %D%/packages/patches/disarchive-cross-compilation.patch \ > %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ > diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm > index 2c648953ae39..0e3b346b93a0 100644 > --- a/gnu/packages/base.scm > +++ b/gnu/packages/base.scm > @@ -272,7 +272,8 @@ differences.") > version ".tar.xz")) > (sha256 > (base32 > - "1v4g8gi0lgakqa7iix8s4fq7lq6l92vw3rjd9wfd2rhjng8xggd6")))) > + "1v4g8gi0lgakqa7iix8s4fq7lq6l92vw3rjd9wfd2rhjng8xggd6")) > + (patches (search-patches "diffutils-fix-signal-processing.pa= tch")))) > (build-system gnu-build-system) > (native-inputs (list perl)) > (synopsis "Comparing and merging files") > diff --git a/gnu/packages/patches/diffutils-fix-signal-processing.patch b= /gnu/packages/patches/diffutils-fix-signal-processing.patch > new file mode 100644 > index 000000000000..24130bd4c37a > --- /dev/null > +++ b/gnu/packages/patches/diffutils-fix-signal-processing.patch > @@ -0,0 +1,60 @@ > +Author: Fr=C3=A9d=C3=A9ric Bonnard > + > +Obtained from: > + > +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D922552#19 > + > +and slightly adapted to apply on v3.8. > + > +Fixes bug reported upstream at: > + > +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34519 > + > +diff --git a/src/diff.c b/src/diff.c > +index 9938daa0c8fd..2bc443f1ca70 100644 > +--- a/src/diff.c > ++++ b/src/diff.c > +@@ -1453,6 +1453,8 @@ compare_files (struct comparison const *parent, > + } > + } > +=20 > ++ final_process_signals (); > ++ > + /* Now the comparison has been done, if no error prevented it, > + and STATUS is the value this function will return. */ > +=20 > +diff --git a/src/diff.h b/src/diff.h > +index 27362c010fd2..28c89b0797ef 100644 > +--- a/src/diff.h > ++++ b/src/diff.h > +@@ -390,6 +390,7 @@ extern enum changes analyze_hunk (struct change *, l= in *, lin *, lin *, lin *); > + extern void begin_output (void); > + extern void debug_script (struct change *); > + extern void fatal (char const *) __attribute__((noreturn)); > ++extern void final_process_signals (void); > + extern void finish_output (void); > + extern void message (char const *, char const *, char const *); > + extern void message5 (char const *, char const *, char const *, > +diff --git a/src/util.c b/src/util.c > +index 4348757e1507..8954197f33fc 100644 > +--- a/src/util.c > ++++ b/src/util.c > +@@ -237,6 +237,18 @@ process_signals (void) > + } > + } > +=20 > ++/* Process remaining signals once before exit */ > ++void > ++final_process_signals (void) > ++{ > ++ static int last =3D 1; > ++ > ++ if (last) { > ++ process_signals (); > ++ last =3D 0; > ++ } > ++} > ++ > + static void > + install_signal_handlers (void) > + { >=20 >=20 >=20 --=-dNXV/BKqbMk29130DVyy 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+4iGRcl7gUCYSzEbhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7rUlAQCbcxjoa5V6n4oZnEv6nbnZT+9P b8qf7Nbj7wDRExUt+QEAliiATW9dvq36BWlPAGy+AWNTSUxutctcsAvnQLFH4Ao= =W8ld -----END PGP SIGNATURE----- --=-dNXV/BKqbMk29130DVyy-- From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 30 09:40:25 2021 Received: (at 50239) by debbugs.gnu.org; 30 Aug 2021 13:40:25 +0000 Received: from localhost ([127.0.0.1]:58495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKhWP-0004Lt-49 for submit@debbugs.gnu.org; Mon, 30 Aug 2021 09:40:25 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:45814) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mKhWJ-0004KB-LL for 50239@debbugs.gnu.org; Mon, 30 Aug 2021 09:40:20 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 413414067E; Mon, 30 Aug 2021 15:40:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1630330804; x=1632145205; bh=r271GbYjfE4jNIXQZBkcWFcMLrt263Os+cq kvPLy2jo=; b=0qvpkrHHPpvWwBCoBZxx0jAsnw5rr1JdocAEoPztm9u6w2QkoRh eH14i9q7gOHSr+zHuRZzBXBgkwdA1771aI1mAkZyPAzD1VgNemvyNK/SGN3MYtSL 1VZeK0xIBb/O4/X/7zbi7Dx6Yw+mD25KD/f7eqGDl5WmLG8KD7YXzH9p9hOfazjW KfG7Ugyz/ukJG0cEq7tzu38sdG/CebnJEAWJmzbpBmTg6PCJpztMLDpb9ulssz5A IME6VSZNX8EvH1c2TDA7Q8TRhaW65hxgpAtSKNHtmgohuXApOVrh6L2TZWvfeO9p JIdJRzvVrXnM6HETHEtgFfYiWUOtrIWFDwnExDH+lA5gQydkmMVa7dBe05B750sp RXYF+2Q2pjQWqidun+BPRWixkPrNF4qB82qLXJ+mh8tbegjdAotfPWV5tBY1z2DB AfAhCJQe3C8EPxf/pC4b/Dk8gtOxqOmjVnirjZYVcg5StSjfBjxT+gXTSYSV+nbT galqyWm0rtpG1B0VPRLnlUA4NqBo6E18CjDzOSpnuOWdc/NjUL0tgd8lnAtSVpbI TGki786Ig9Vz98gqzb4/vBaNBAps31sf9Xc3uxoTJPeUM4pQdD4ZYDdzrsGMWNft jb8LQ0fO96DihJHwIyfD1/jV2rtXMI4Zcn1jRFtxoPAHkZdJumi0P3ig= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z1u4jR34YxXa; Mon, 30 Aug 2021 15:40:04 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id B2D2140610; Mon, 30 Aug 2021 15:40:04 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 8B5282546; Mon, 30 Aug 2021 15:40:03 +0200 (CEST) From: Thiago Jung Bauermann To: Maxime Devos Subject: Re: [bug#50239] [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. Date: Mon, 30 Aug 2021 10:39:54 -0300 Message-ID: <3088529.eW9a4NE73H@popigai> In-Reply-To: References: <20210828164357.8868-1-bauermann@kolabnow.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 50239 Cc: 50239@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.0 (-) Hello Maxime, Thank you for your review! Em segunda-feira, 30 de agosto de 2021, =C3=A0s 08:43:42 -03, Maxime Devos= =20 escreveu: > Thiago Jung Bauermann via Guix-patches via schreef op za 28-08-2021 om=20 13:43 [-0300]: > > [...] > > diffutils has a race condition in its signal processing code which is > > easy to trigger on powerpc64le-linux. More often than not, it causes > > the =E2=80=98colors=E2=80=99 test to fail and therefore the build of th= e package fails > > as well. [...] >=20 > Adding this patch makes sense to me too, though I don't have a > powerpc64le-linux to test this on. Nice, thanks! > > Add the patch proposed in Debian bug 922552 which fixes the problem. >=20 > Do you think upstream will have its own working patch soonish? I think so. Paul Eggert was very quick in his response and is already=20 working on a fix. > (See , for peop= le > who aren't Thiago Jung Bauermann.) Yeah, the discussion moved unexpectedly to a different bug report. Thanks=20 for tracking it down and posting the new link. > If so, it might make sense to wait a little for an =E2=80=98official=E2= =80=99 patch. Yes, I agree. =2D-=20 Thanks, Thiago From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 06 07:56:18 2021 Received: (at 50239) by debbugs.gnu.org; 6 Sep 2021 11:56:18 +0000 Received: from localhost ([127.0.0.1]:52232 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNDEX-0004zE-Mh for submit@debbugs.gnu.org; Mon, 06 Sep 2021 07:56:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNDEI-0004yW-LC for 50239@debbugs.gnu.org; Mon, 06 Sep 2021 07:56:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37128) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNDEC-0001Wx-Ex; Mon, 06 Sep 2021 07:55:56 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47204 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNDEA-0001iT-OK; Mon, 06 Sep 2021 07:55:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Thiago Jung Bauermann Subject: Re: bug#50239: [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. References: <20210828164357.8868-1-bauermann@kolabnow.com> Date: Mon, 06 Sep 2021 13:55:52 +0200 In-Reply-To: <20210828164357.8868-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Sat, 28 Aug 2021 13:43:57 -0300") Message-ID: <877dft9auv.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50239 Cc: Maxime Devos , 50239@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 (---) Hi, Thiago Jung Bauermann skribis: > This fixes the build of diffutils on powerpc64le-linux, which currently > fails more often than not. The patch I=E2=80=99m adding here isn=E2=80=99= t being > shipped by Debian and hasn=E2=80=99t been seen by upstream yet. I just br= ought > it to their attention here: > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34519#11 Thanks for working on this! > I=E2=80=99m not familiar with the diffutils code base, but FWIW I analysed > the patch and it looks very reasonable to me. To be honest I=E2=80=99m not > sure if it completely fixes the race condition or just makes it much > less likely to happen, but in any case I can=E2=80=99t hit the race condi= tion > anymore. > > In addition, since all it does is add a new call to the function which > checks and processes any pending signal, I don=E2=80=99t think it can cau= se > any harm. > > Finally, this patch is based on top of the one which updates diffutils > to version 3.8: > > https://issues.guix.gnu.org/50233 > > The fix works equally well in version 3.7 so if you think it=E2=80=99s not > worth updating diffutils I can rebase this patch on top of current > =E2=80=98core-updates-frozen=E2=80=99. Normally we won=E2=80=99t update diffutils on =E2=80=98core-updates-frozen= =E2=80=99. Thus, could you adjust this patch so that (1) it applies on =E2=80=98core-updates-frozen=E2=80=99, and (2) it doesn=E2=80=99t change de= rivations on other platforms (thus, the patch needs to be applied from a build phase)? Bonus point if there=E2=80=99s an upstream patch to use, as Maxime suggeste= d. TIA, Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 06 09:58:34 2021 Received: (at 50239) by debbugs.gnu.org; 6 Sep 2021 13:58:35 +0000 Received: from localhost ([127.0.0.1]:54142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNF8s-0004XX-KN for submit@debbugs.gnu.org; Mon, 06 Sep 2021 09:58:34 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:12794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNF8q-0004XH-Gf for 50239@debbugs.gnu.org; Mon, 06 Sep 2021 09:58:33 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 9A229F85; Mon, 6 Sep 2021 15:58:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1630936705; x=1632751106; bh=OYB6+jLv790IZkZZ7FqdY6FWKvZ1VC7FQLq rs2bqmz4=; b=1THAR54mtYlwbo8ZVODkorrQrmt7DwZtK9en973A2LTMu3JwOfm vP4O8FFtRu0lHExZO9QQXnu7mGyohBummkhFOM+lUpDwq/39M01Dq2hErd+ntUr6 RgMnOCIibSdxmMJ/OPdQh7boJ5SVgHgVbW3ddFHOpD2rDtDgJJnMQeoSEJB3uprk ont1TsRTJIVJiUPrET4Kg3bFE5nV3eDag8EHP7DWym7pJJDZbCrEPdkKbiGUkwrt ekS5Qz8LPF+sYzy7RtBQiIUx05vtpisyeP77sriB1jiyLPUvpmKFDm7y0mhO/aio QL0cX3mWTS+GLGEeWQOczC4RuMLUJmnRQSrfdz9/PhxidFGOFK1Dyaq/k6f4RE2+ +tQH+XnQ2aub9fi4wcOWEX2NGIoU9BP2Ih2nVAP+SRMhUYRsJTcnrz2xIlHm25lG oVsipD6OY/hi3NaF7n0mW1VJa6YEuCcCoxJ8rzfivDw6HE1qBHEbYg8E9jkL3Tkg JI9F1ztLVYiL1dWw0T6HKWhDRkzOY2sJuyNzUiq42eYZbinydofDpgz0DeqYfM0h RD3iPb8mN8psEHwqNh55bSJNwOiUT28GDoNcHg7PHqdKIK4SPQTTRuUVToI4MS7O CQqUNG1ghBMGKPpbML/MRJ1q5NeEz+gZQC6LWo7rQsTnOTAeRn2Il5wI= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XYRNNsk5R0op; Mon, 6 Sep 2021 15:58:25 +0200 (CEST) Received: from int-mx002.mykolab.com (unknown [10.9.13.2]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 9F5C218D; Mon, 6 Sep 2021 15:58:25 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx002.mykolab.com (Postfix) with ESMTPS id 5A76C2FBD; Mon, 6 Sep 2021 15:58:24 +0200 (CEST) From: Thiago Jung Bauermann To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: bug#50239: [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. Date: Mon, 06 Sep 2021 10:58:16 -0300 Message-ID: <20395088.hJciOmStQJ@popigai> In-Reply-To: <877dft9auv.fsf@gnu.org> References: <20210828164357.8868-1-bauermann@kolabnow.com> <877dft9auv.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50239 Cc: Maxime Devos , 50239@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.0 (-) Hi Ludo, Em segunda-feira, 6 de setembro de 2021, =C3=A0s 08:55:52 -03, Ludovic Cour= t=C3=A8s=20 escreveu: > Hi, >=20 > Thiago Jung Bauermann skribis: > > This fixes the build of diffutils on powerpc64le-linux, which currently > > fails more often than not. The patch I=E2=80=99m adding here isn=E2=80= =99t being > > shipped by Debian and hasn=E2=80=99t been seen by upstream yet. I just = brought > > it to their attention here: > >=20 > > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D34519#11 >=20 > Thanks for working on this! You=E2=80=99re welcome. Thank you for reviewing the patches! > > I=E2=80=99m not familiar with the diffutils code base, but FWIW I analy= sed > > the patch and it looks very reasonable to me. To be honest I=E2=80=99m = not > > sure if it completely fixes the race condition or just makes it much > > less likely to happen, but in any case I can=E2=80=99t hit the race con= dition > > anymore. > >=20 > > In addition, since all it does is add a new call to the function which > > checks and processes any pending signal, I don=E2=80=99t think it can c= ause > > any harm. > >=20 > > Finally, this patch is based on top of the one which updates diffutils > > to version 3.8: > >=20 > > https://issues.guix.gnu.org/50233 > >=20 > > The fix works equally well in version 3.7 so if you think it=E2=80=99s = not > > worth updating diffutils I can rebase this patch on top of current > > =E2=80=98core-updates-frozen=E2=80=99. >=20 > Normally we won=E2=80=99t update diffutils on =E2=80=98core-updates-froze= n=E2=80=99. Yes, it makes sense. > Thus, could you adjust this patch so that (1) it applies on > =E2=80=98core-updates-frozen=E2=80=99, and (2) it doesn=E2=80=99t change = derivations on other > platforms (thus, the patch needs to be applied from a build phase)? Sure, no problem. I=E2=80=99ll do that. Thanks for the tip about having to = apply=20 the patch from a build phase. > Bonus point if there=E2=80=99s an upstream patch to use, as Maxime sugges= ted. There isn=E2=80=99t one for now. We have three alternatives if the situatio= n=20 doesn=E2=80=99t change by the time =E2=80=98core-updates-frozen=E2=80=99 ge= ts merged: 1. Apply this patch. 2. Disable the =E2=80=98colors=E2=80=99 test. This is what Debian is doing.= It=E2=80=99s a bit=20 unfortunate in that we=E2=80=99re disabling a test that just did its job of= finding=20 a bug, but on the other hand the bug is minor (the terminal is left in a=20 wrong state if =E2=80=98diff=E2=80=99 is interrupted in the middle of print= ing colored=20 output) and easy to work around (just run =E2=80=98reset=E2=80=99 if that h= appens). 3. Do nothing. If the diffutils build fails on the CI, restart it until it= =20 succeeds. :-) That is my personal order of preference, but option 1 carries a slight risk= =20 in that we would be shipping a patch that isn=E2=80=99t =E2=80=9Cbattle tes= ted=E2=80=9D, so the=20 other options are very reasonable too. =2D-=20 Thanks, Thiago From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 09 10:41:58 2021 Received: (at 50239) by debbugs.gnu.org; 9 Sep 2021 14:41:58 +0000 Received: from localhost ([127.0.0.1]:35900 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOLFW-00005Y-3L for submit@debbugs.gnu.org; Thu, 09 Sep 2021 10:41:58 -0400 Received: from mx.kolabnow.com ([95.128.36.40]:15526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOLFL-000055-1S for 50239@debbugs.gnu.org; Thu, 09 Sep 2021 10:41:57 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id D0E28417B1 for <50239@debbugs.gnu.org>; Thu, 9 Sep 2021 16:41:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:content-type:content-type:mime-version :references:in-reply-to:message-id:date:date:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1631198500; x=1633012901; bh=tAU0JJ3TpocDpOzWAaVJNN8+GTYuVkYiCmI IaxGAuRs=; b=q9Wc6dHd2A4N9nZSM2X5mZCnzvxjt9rbQpRlvPTuehj4ZGd6YXh fpmLGOvxw21x/qqRa8udXER8CJ9iMOWS2+ULHUPDNcwpXkK3m3WPcE7eBWDwJqxF BQBMSl46B4TBZxMQ8guMkyAbVx41qpHUvhYczYurh76hbFYmNlUKAJg74ll5lAwr /V5rJn66EzEkUFTBa6z0sW7TcIkCpy7NQeRUyAQ6r7uYybIecCn/Sf36878QSiPt SZNci3J0yihS3D/58ljEIPRL/nBqkzw/GfmRQ75O066QJunQMEIfu72B6Uld3uFl 0y7CXiTksjHo+Sg0XQmn/rq3cYV/Xu4o4AjYSQd0gu6xFGsxJP6X/lBjsRS1Gnxb hM2RyaoPr8c/zYsOPNU+VtEZ4ZpWrxon3upeaPRbkQJKc988DXaR/gLW7V1uRtXG a8SQf2qrHIgj3OhQcahiq3Y/UrvtbEjeV8aXY2w4oU7/4UXcsBYM100/uGK+BnkD F91Vhy9W04udKEHlJUjU5nKg4dNKB8YlpA7ZhDAuG5uMXJM9tHkGLIVKkkZXvFD/ W36tzf8Z9lwv2QAbhmocSnaVqlGhnR4LLLXolLhFu8oAUJkF7MyS15d8Sacr4Beh w0p8sPdb10MgSglznyVfr4oe0sME0RoR9mTlBjENwdWNfPChiFyeKEKc= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fOEbZ-IJaQ3O for <50239@debbugs.gnu.org>; Thu, 9 Sep 2021 16:41:40 +0200 (CEST) Received: from int-mx001.mykolab.com (unknown [10.9.13.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id E6AE540F4E for <50239@debbugs.gnu.org>; Thu, 9 Sep 2021 16:41:39 +0200 (CEST) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx001.mykolab.com (Postfix) with ESMTPS id BFB74C0E; Thu, 9 Sep 2021 16:41:38 +0200 (CEST) From: Thiago Jung Bauermann To: 50239@debbugs.gnu.org Subject: [PATCH core-updates-frozen v2] gnu: diffutils: Fix signal processing. Date: Thu, 9 Sep 2021 11:41:14 -0300 Message-Id: <20210909144114.5850-1-bauermann@kolabnow.com> In-Reply-To: <877dft9auv.fsf@gnu.org> References: <877dft9auv.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50239 Cc: Thiago Jung Bauermann 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 (-) diffutils has a race condition in its signal processing code which is easy to trigger on powerpc64le-linux. More often than not, it causes the ‘colors’ test to fail and therefore the build of the package fails as well. Add the patch proposed in Debian bug 922552 which fixes the problem. * gnu/packages/patches/diffutils-fix-signal-processing.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (diffutils)[source]: Use it. --- Hello, Here is the same patch rebased on top of ‘core-updates-frozen’. I didn’t yet do it in a way that preserves derivations on other platforms because there will be a batch of world-rebuilding changes¹, so depending on how soon the branch is going to be merged into master, it could be a good opportunity to land this fix now. So far, there hasn’t been news from upstream on a fix for the problem, but it’s been only a bit over a week since they last proposed a patch so it’s too early to be worried about anything. I am perfectly fine with skipping this world-rebuilding window and sending a v3 which preserves derivations on other platforms as you suggested. Or even not fixing this bug on ’core-updates-frozen’ if the upstream fix doesn’t arrive by then. As I mentioned earlier, we can just hit the “try again” button until the CI produces a successful build. :-) I’m just sending this version to have the option on the table. Thanks! ¹ https://lists.nongnu.org/archive/html/guix-devel/2021-09/msg00097.html gnu/local.mk | 1 + gnu/packages/base.scm | 3 +- .../diffutils-fix-signal-processing.patch | 58 +++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/diffutils-fix-signal-processing.patch diff --git a/gnu/local.mk b/gnu/local.mk index 07e6787642e9..d37b1b577a04 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -967,6 +967,7 @@ dist_patch_DATA = \ %D%/packages/patches/desmume-gcc6-fixes.patch \ %D%/packages/patches/desmume-gcc7-fixes.patch \ %D%/packages/patches/dfu-programmer-fix-libusb.patch \ + %D%/packages/patches/diffutils-fix-signal-processing.patch \ %D%/packages/patches/diffutils-gets-undeclared.patch \ %D%/packages/patches/disarchive-cross-compilation.patch \ %D%/packages/patches/dkimproxy-add-ipv6-support.patch \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 70eb135a1e41..bfe769fbc4ed 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -274,7 +274,8 @@ differences.") (sha256 (base32 "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk")) - (patches (search-patches "coreutils-gnulib-tests.patch")))) + (patches (search-patches "coreutils-gnulib-tests.patch" + "diffutils-fix-signal-processing.patch")))) (build-system gnu-build-system) (native-inputs (list perl)) (synopsis "Comparing and merging files") diff --git a/gnu/packages/patches/diffutils-fix-signal-processing.patch b/gnu/packages/patches/diffutils-fix-signal-processing.patch new file mode 100644 index 000000000000..134dd3f718bd --- /dev/null +++ b/gnu/packages/patches/diffutils-fix-signal-processing.patch @@ -0,0 +1,58 @@ +Author: Frédéric Bonnard + +Obtained from: + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922552#19 + +Fixes bug reported upstream at: + +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34519 + +diff --git a/src/diff.c b/src/diff.c +index e2eb32437353..b574e8282dc9 100644 +--- a/src/diff.c ++++ b/src/diff.c +@@ -1451,6 +1451,8 @@ compare_files (struct comparison const *parent, + } + } + ++ final_process_signals (); ++ + /* Now the comparison has been done, if no error prevented it, + and STATUS is the value this function will return. */ + +diff --git a/src/diff.h b/src/diff.h +index 03daaa4a0530..e177fe600a25 100644 +--- a/src/diff.h ++++ b/src/diff.h +@@ -390,6 +390,7 @@ extern enum changes analyze_hunk (struct change *, lin *, lin *, lin *, lin *); + extern void begin_output (void); + extern void debug_script (struct change *); + extern void fatal (char const *) __attribute__((noreturn)); ++extern void final_process_signals (void); + extern void finish_output (void); + extern void message (char const *, char const *, char const *); + extern void message5 (char const *, char const *, char const *, +diff --git a/src/util.c b/src/util.c +index 4f4d9bb285eb..56d292de2927 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -237,6 +237,18 @@ process_signals (void) + } + } + ++/* Process remaining signals once before exit */ ++void ++final_process_signals (void) ++{ ++ static int last = 1; ++ ++ if (last) { ++ process_signals (); ++ last = 0; ++ } ++} ++ + static void + install_signal_handlers (void) + { From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 12 01:00:42 2021 Received: (at 50239-done) by debbugs.gnu.org; 12 Nov 2021 06:00:42 +0000 Received: from localhost ([127.0.0.1]:43023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlPcA-0001Vf-75 for submit@debbugs.gnu.org; Fri, 12 Nov 2021 01:00:42 -0500 Received: from mail-qv1-f44.google.com ([209.85.219.44]:42696) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mlPc8-0001VQ-JH for 50239-done@debbugs.gnu.org; Fri, 12 Nov 2021 01:00:41 -0500 Received: by mail-qv1-f44.google.com with SMTP id b17so5614978qvl.9 for <50239-done@debbugs.gnu.org>; Thu, 11 Nov 2021 22:00:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=1gIuuwh7bCRaUW5rnpyL3gVtBkNaR7OJ4lfFbDPiDhQ=; b=LUU67djB2UTHfjAnMfA3NvPI998yxsZBICm12KGcOxg2E6QeYy9mo5k892ZmnOOsBf 1w7St+XqdWwtC+ypZIqpIuCIYBymjM9XrjkQgMJppP09mD4svHDhUytR1BiB+qPxgv2F hUTzx0X7LR2/ZDngO1XGjD59rYoS3fcZiz7k7Ny2R02GilqHXKyrPttHr31WDAgNFhWO KcD/3OEA1nXpPB8wd0Xu79O2MB113V2jly4LgbOMWbhD6XCG+4B5dS9fFQbagUZ/TRu9 CXoHheE3vBidgTOQAONT/GQekT6xKz9PSrD51NoSKXSUKx3+opZKdttAoP9uT6jRhk2x /9fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=1gIuuwh7bCRaUW5rnpyL3gVtBkNaR7OJ4lfFbDPiDhQ=; b=C45BOT789KP1nvdQSrBZOEHMG4oZ/XTnQd8xpaFjDGaC2BveEgHhKOKhTCZGASabpn 3J+vj2y+LBQzz6bkX/Y6B4bvrFS1rXUJlUDctC+cgVm4XiZpzDqULTkstSnpReZ4gsvH t+KvFBNpMd8YYOz0gKJDTGxydrw0Y2l5VBKy6HxYFlinrMiCiTCeCh8d02yTBb9V/yaP lbioKLGDcaFaQP8WABoAKjVrp4JSPsP4EUP+qmIKNDJqBJcBD7m1yHjgsfQiJI+MWbd1 suVhVbCczVpjtbTgSBtGSdUeURskiMBsqGJ9jz5p8b3VgfNkW8MfM+Fhg/8XYdhSwJOA USlw== X-Gm-Message-State: AOAM531/caFTW3Hyg5qJwTYutl94GRBpoGV5i00xUI5BuJzd5V5r6eCG ByyT2nfYimeppeLagGZa9kUAntPGVmxoyphb X-Google-Smtp-Source: ABdhPJzn8SCEkDNuRkEfYDlPtktQfK6aiO1M5f/0mcZSMX78gTMN8lclefibk59mG+GlmEOc3OGiag== X-Received: by 2002:a05:6214:e41:: with SMTP id o1mr12358887qvc.43.1636696834956; Thu, 11 Nov 2021 22:00:34 -0800 (PST) Received: from hurd (dsl-10-133-155.b2b2c.ca. [72.10.133.155]) by smtp.gmail.com with ESMTPSA id d9sm2564926qkn.131.2021.11.11.22.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Nov 2021 22:00:34 -0800 (PST) From: Maxim Cournoyer To: Thiago Jung Bauermann Subject: Re: bug#50239: [PATCH core-updates-frozen] gnu: diffutils: Fix signal processing. References: <877dft9auv.fsf@gnu.org> <20210909144114.5850-1-bauermann@kolabnow.com> Date: Fri, 12 Nov 2021 01:00:33 -0500 In-Reply-To: <20210909144114.5850-1-bauermann@kolabnow.com> (Thiago Jung Bauermann's message of "Thu, 9 Sep 2021 11:41:14 -0300") Message-ID: <87h7chq5fi.fsf_-_@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 50239-done Cc: 50239-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: -1.0 (-) Thiago Jung Bauermann writes: > diffutils has a race condition in its signal processing code which is easy > to trigger on powerpc64le-linux. More often than not, it causes the > =E2=80=98colors=E2=80=99 test to fail and therefore the build of the pack= age fails as well. > > Add the patch proposed in Debian bug 922552 which fixes the problem. > > * gnu/packages/patches/diffutils-fix-signal-processing.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/base.scm (diffutils)[source]: Use it. > --- Applied with commit f234f5b0e120ea8cfa850440a428c3bc211b329b to core-updates-frozen, and diffutils was updated to 3.8 with 57fd6d511c678eeee88f254c511847a56f86f85f there as well. Closing, Thank you! Maxim From unknown Sun Jun 15 08:47:13 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 10 Dec 2021 12: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