GNU bug report logs - #29151
[PATCH] ia64: fix crash in thread context switch

Previous Next

Package: guile;

Reported by: Sergei Trofimovich <slyfox <at> gentoo.org>

Date: Sun, 5 Nov 2017 09:32:02 UTC

Severity: normal

Tags: patch

Merged with 29194

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: tracker <at> debbugs.gnu.org
Subject: bug#29194: closed (Fwd: Bug in 2.0.14)
Date: Wed, 22 Nov 2017 15:17:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 22 Nov 2017 16:16:17 +0100
with message-id <87tvxmxs1q.fsf <at> gnu.org>
and subject line Re: bug#29151: [PATCH] ia64: fix crash in thread context switch
has caused the debbugs.gnu.org bug report #29151,
regarding Fwd: Bug in 2.0.14
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
29151: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=29151
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jason Duerstock <jason.duerstock <at> gmail.com>
To: bug-guile <at> gnu.org
Subject: Fwd: Bug in 2.0.14
Date: Tue, 7 Nov 2017 08:43:18 -0500
[Message part 3 (text/plain, inline)]
Hello!

I'm trying to restart the Debian ia64 port.  In the process, I've hit the
attached bug.

It appears to occur whether I use gcc 4.9 or gcc 7.2.  It also seems to
appear in 2.0.13.

What else can I do to help troubleshoot this?

Thanks,

Jason
[Message part 4 (text/html, inline)]
[guile.bug (application/octet-stream, attachment)]
[Message part 6 (message/rfc822, inline)]
From: ludo <at> gnu.org (Ludovic Courtès)
To: Sergei Trofimovich <slyfox <at> gentoo.org>
Cc: 29151-done <at> debbugs.gnu.org
Subject: Re: bug#29151: [PATCH] ia64: fix crash in thread context switch
Date: Wed, 22 Nov 2017 16:16:17 +0100
Hi Sergei,

Sergei Trofimovich <slyfox <at> gentoo.org> skribis:

> 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.

I’ve applied the patch to the ‘stable-2.2’ branch, thank you, and thanks
to Jason for testing!

Ludo’.


This bug report was last modified 7 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.