From unknown Mon Jun 23 04:08:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#29151 <29151@debbugs.gnu.org> To: bug#29151 <29151@debbugs.gnu.org> Subject: Status: [PATCH] ia64: fix crash in thread context switch Reply-To: bug#29151 <29151@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:08:20 +0000 retitle 29151 [PATCH] ia64: fix crash in thread context switch reassign 29151 guile submitter 29151 Sergei Trofimovich severity 29151 normal tag 29151 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 05 04:31:13 2017 Received: (at submit) by debbugs.gnu.org; 5 Nov 2017 09:31:13 +0000 Received: from localhost ([127.0.0.1]:51186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBHGr-0001cc-Cu for submit@debbugs.gnu.org; Sun, 05 Nov 2017 04:31:13 -0500 Received: from eggs.gnu.org ([208.118.235.92]:39730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eBHGq-0001cP-6L for submit@debbugs.gnu.org; Sun, 05 Nov 2017 04:31:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBHGj-0006kz-Ol for submit@debbugs.gnu.org; Sun, 05 Nov 2017 04:31:06 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36415) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eBHGj-0006kq-LJ for submit@debbugs.gnu.org; Sun, 05 Nov 2017 04:31:05 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eBHGh-0003Cv-Oi for bug-guile@gnu.org; Sun, 05 Nov 2017 04:31:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eBHGc-0006ei-Sr for bug-guile@gnu.org; Sun, 05 Nov 2017 04:31:03 -0500 Received: from smtp.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:34399) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eBHGc-0006dt-M2 for bug-guile@gnu.org; Sun, 05 Nov 2017 04:30:58 -0500 Received: from sf.home (host86-186-94-90.range86-186.btcentralplus.com [86.186.94.90]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id D606B33BF55; Sun, 5 Nov 2017 09:30:55 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id 266AC1C758EE6; Sun, 5 Nov 2017 09:30:50 +0000 (GMT) From: Sergei Trofimovich To: bug-guile@gnu.org Subject: [PATCH] ia64: fix crash in thread context switch Date: Sun, 5 Nov 2017 09:30:45 +0000 Message-Id: <20171105093045.10066-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.15.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit Cc: Sergei Trofimovich 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: -4.4 (----) Backtrace looks like that: Program terminated with signal SIGSEGV, Segmentation fault. #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372 372 t->pending_rbs_continuation->backing_store, [Current thread is 1 (Thread 0x2000000000049340 (LWP 8190))] (gdb) bt #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=0x6000000000817020, VAL=1) at continuations.c:372 #1 0x2000000000148e00 in scm_c_abort (vm=0x60000000000edea0, tag=0x6000000000795ba0, n=0, argv=0x60000fffff7f0ce0, cookie=-1) at control.c:239 #2 0x2000000000149070 in scm_at_abort (tag=0x6000000000795ba0, args=0x304) at control.c:258 (gdb) print t $2 = (scm_i_thread *) 0x6000000000068000 (gdb) print t->pending_rbs_continuation $3 = (scm_t_contregs *) 0xffeb The problem here is the value of 't->pending_rbs_continuation' pointer. It's supposed to poin to a register stack pointer or be NULL if not yet backed up. The problem is it is never initialized to NULL at creation time and contained garbage on stack. Sometimes people are lucky and have zeros on stack and guile works. But sometimes there is something and guile crashes. The fix is trivial: initialize 'pending_rbs_continuation = NULL' at thread registration time (the same way other threads are registered). Reported-by: Matt Turner Bug: https://bugs.gentoo.org/613986 * libguile/threads.c(guilify_self_1): initialize pending_rbs_continuation to avoid guile crash on ia64. Signed-off-by: Sergei Trofimovich --- libguile/threads.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libguile/threads.c b/libguile/threads.c index 9ceb5b88a..770f62c44 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -395,6 +395,7 @@ guilify_self_1 (struct GC_stack_base *base, int needs_unregister) t.base = base->mem_base; #ifdef __ia64__ t.register_backing_store_base = base->reg_base; + t.pending_rbs_continuation = 0; #endif t.continuation_root = SCM_EOL; t.continuation_base = t.base; -- 2.15.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 07 23:21:00 2017 Received: (at control) by debbugs.gnu.org; 8 Nov 2017 04:21:00 +0000 Received: from localhost ([127.0.0.1]:57405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCHrI-0004do-7e for submit@debbugs.gnu.org; Tue, 07 Nov 2017 23:21:00 -0500 Received: from world.peace.net ([50.252.239.5]:48790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eCHrG-0004dc-T4 for control@debbugs.gnu.org; Tue, 07 Nov 2017 23:20:59 -0500 Received: from pool-72-93-31-230.bstnma.east.verizon.net ([72.93.31.230] helo=jojen) by world.peace.net with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eCHrB-0003ik-Cr; Tue, 07 Nov 2017 23:20:53 -0500 From: Mark H Weaver To: control@debbugs.gnu.org Date: Tue, 07 Nov 2017 23:20:29 -0500 Message-ID: <87inelflki.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: merge 29151 29194 thanks [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject X-Debbugs-Envelope-To: control 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.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: merge 29151 29194 thanks [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject merge 29151 29194 thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Nov 22 10:16:20 2017 Received: (at 29151-done) by debbugs.gnu.org; 22 Nov 2017 15:16:20 +0000 Received: from localhost ([127.0.0.1]:52851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHWlA-00075D-FO for submit@debbugs.gnu.org; Wed, 22 Nov 2017 10:16:20 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:60569) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eHWl8-000755-Pc for 29151-done@debbugs.gnu.org; Wed, 22 Nov 2017 10:16:19 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B06FBFF1C; Wed, 22 Nov 2017 16:16:20 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4WDemW3f7nZK; Wed, 22 Nov 2017 16:16:20 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id F0D06FE3C; Wed, 22 Nov 2017 16:16:19 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Sergei Trofimovich Subject: Re: bug#29151: [PATCH] ia64: fix crash in thread context switch References: <20171105093045.10066-1-slyfox@gentoo.org> Date: Wed, 22 Nov 2017 16:16:17 +0100 In-Reply-To: <20171105093045.10066-1-slyfox@gentoo.org> (Sergei Trofimovich's message of "Sun, 5 Nov 2017 09:30:45 +0000") Message-ID: <87tvxmxs1q.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 29151-done Cc: 29151-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 (+) Hi Sergei, Sergei Trofimovich skribis: > Backtrace looks like that: > > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=3D0x6000000000817020, VA= L=3D1) at continuations.c:372 > 372 t->pending_rbs_continuation->backing_store, > [Current thread is 1 (Thread 0x2000000000049340 (LWP 8190))] > (gdb) bt > #0 0x200000000014a5c0 in scm_ia64_longjmp (JB=3D0x6000000000817020, VA= L=3D1) at continuations.c:372 > #1 0x2000000000148e00 in scm_c_abort (vm=3D0x60000000000edea0, tag=3D0= x6000000000795ba0, n=3D0, argv=3D0x60000fffff7f0ce0, cookie=3D-1) at contro= l.c:239 > #2 0x2000000000149070 in scm_at_abort (tag=3D0x6000000000795ba0, args= =3D0x304) at control.c:258 > (gdb) print t > $2 =3D (scm_i_thread *) 0x6000000000068000 > (gdb) print t->pending_rbs_continuation > $3 =3D (scm_t_contregs *) 0xffeb > > The problem here is the value of 't->pending_rbs_continuation' pointer. > It's supposed to poin to a register stack pointer or be NULL if not yet > backed up. > > The problem is it is never initialized to NULL at creation time and > contained garbage on stack. Sometimes people are lucky and have zeros > on stack and guile works. But sometimes there is something and guile > crashes. > > The fix is trivial: initialize 'pending_rbs_continuation =3D NULL' > at thread registration time (the same way other threads are registered). > > Reported-by: Matt Turner > Bug: https://bugs.gentoo.org/613986 > > * libguile/threads.c(guilify_self_1): initialize pending_rbs_continuation > to avoid guile crash on ia64. I=E2=80=99ve applied the patch to the =E2=80=98stable-2.2=E2=80=99 branch, = thank you, and thanks to Jason for testing! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 14:37:27 2017 Received: (at 29151-done) by debbugs.gnu.org; 26 Nov 2017 19:37:27 +0000 Received: from localhost ([127.0.0.1]:59638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ2k3-0003eK-Ix for submit@debbugs.gnu.org; Sun, 26 Nov 2017 14:37:27 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:58940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ2k2-0003e6-GB for 29151-done@debbugs.gnu.org; Sun, 26 Nov 2017 14:37:26 -0500 Received: from sf (host81-147-9-225.range81-147.btcentralplus.com [81.147.9.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 3539533BF3C; Sun, 26 Nov 2017 19:37:19 +0000 (UTC) Date: Sun, 26 Nov 2017 19:37:10 +0000 From: Sergei Trofimovich To: ludo@gnu.org (Ludovic =?UTF-8?B?Q291cnTDqHM=?=) Subject: Re: bug#29151: [PATCH] ia64: fix crash in thread context switch Message-ID: <20171126193710.04186e01@sf> In-Reply-To: <87tvxmxs1q.fsf@gnu.org> References: <20171105093045.10066-1-slyfox@gentoo.org> <87tvxmxs1q.fsf@gnu.org> X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/vjOt=fML5nQEcgYtH7iInVn"; protocol="application/pgp-signature" X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 29151-done Cc: 29151-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: -5.0 (-----) --Sig_/vjOt=fML5nQEcgYtH7iInVn Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > I=E2=80=99ve applied the patch to the =E2=80=98stable-2.2=E2=80=99 branch= , thank you, and thanks > to Jason for testing! Thank you! Should I do anything specific in order for fix to get to master branch? Or will it happen on it's own at some point? --=20 Sergei --Sig_/vjOt=fML5nQEcgYtH7iInVn Content-Type: application/pgp-signature Content-Description: Цифровая подпись OpenPGP -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSZKa0VG5avZRlY01hxoe52YR/zqgUCWhsX5gAKCRBxoe52YR/z qnpPAJ9khi6wM1W5hc2tq121xZsoF1KH1gCeLqzYcJejodxC2J7Hn1grT8wcWYU= =qDE1 -----END PGP SIGNATURE----- --Sig_/vjOt=fML5nQEcgYtH7iInVn-- From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 26 15:32:42 2017 Received: (at 29151-done) by debbugs.gnu.org; 26 Nov 2017 20:32:42 +0000 Received: from localhost ([127.0.0.1]:59667 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ3bW-000515-49 for submit@debbugs.gnu.org; Sun, 26 Nov 2017 15:32:42 -0500 Received: from [141.255.128.1] (port=47808 helo=hera.aquilenet.fr) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJ3bT-00050u-L7 for 29151-done@debbugs.gnu.org; Sun, 26 Nov 2017 15:32:40 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id F1131FA13; Sun, 26 Nov 2017 21:32:40 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3_mX1UvM1VFk; Sun, 26 Nov 2017 21:32:40 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E65F4EE99; Sun, 26 Nov 2017 21:32:39 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Sergei Trofimovich Subject: Re: bug#29151: [PATCH] ia64: fix crash in thread context switch References: <20171105093045.10066-1-slyfox@gentoo.org> <87tvxmxs1q.fsf@gnu.org> <20171126193710.04186e01@sf> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 6 Frimaire an 226 de la =?utf-8?Q?R=C3=A9volution?= 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: Sun, 26 Nov 2017 21:32:36 +0100 In-Reply-To: <20171126193710.04186e01@sf> (Sergei Trofimovich's message of "Sun, 26 Nov 2017 19:37:10 +0000") Message-ID: <87vahwvl0b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Sergei Trofimovich skribis: >> I’ve applied the patch to the ‘stable-2.2’ branch, thank you, and thanks >> to Jason for testing! > > Thank you! > > Should I do anything specific in order for fix to get to master branch? > Or will it happen on it's own at some point? [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_FAIL SPF: HELO does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=helo;id=hera.aquilenet.fr;ip=141.255.128.1;r=debbugs.gnu.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Debbugs-Envelope-To: 29151-done Cc: 29151-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: 2.2 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Sergei Trofimovich skribis: >> I’ve applied the patch to the ‘stable-2.2’ branch, thank you, and thanks >> to Jason for testing! > > Thank you! > > Should I do anything specific in order for fix to get to master branch? > Or will it happen on it's own at some point? [...] Content analysis details: (2.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_FAIL SPF: HELO does not match SPF record (fail) [SPF failed: Please see http://www.openspf.org/Why?s=helo;id=hera.aquilenet.fr;ip=141.255.128.1;r=debbugs.gnu.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Sergei Trofimovich skribis: >> I=E2=80=99ve applied the patch to the =E2=80=98stable-2.2=E2=80=99 branc= h, thank you, and thanks >> to Jason for testing! > > Thank you! > > Should I do anything specific in order for fix to get to master branch? > Or will it happen on it's own at some point? I think Andy will eventually merge =E2=80=98stable-2.2=E2=80=99 in =E2=80= =98master=E2=80=99, so it will happen =E2=80=9Con its own=E2=80=9D. :-) Ludo=E2=80=99. From unknown Mon Jun 23 04:08:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 25 Dec 2017 12: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