[PATCH][PR guile/17247] Block SIGCHLD while initializing Guile

Doug Evans xdje42@gmail.com
Wed Sep 10 05:15:00 GMT 2014


Doug Evans <xdje42@gmail.com> writes:
> Doug Evans <xdje42@gmail.com> writes:
>> Hi.
>>
>> This patch fixes PR 17247.
>>
>> Basically, current Guile (git) starts an internal thread
>> (the "finalizer" thread), and libgc as of 7.4 now starts several
>> marker threads by default (before 7.4.0 one needed to configure
>> libgc with --enable-parallel-mark).
>>
>> When other threads are running, and they haven't blocked SIGCHLD,
>> then the kernel may send SIGCHLD to these threads, leaving gdb
>> hung in the sigsuspend calls in linux-nat.c.
>>
>> P.S. I have a tentative patch for PR 17314, which also fixes 17247,
>> but for a bit of robustness I'm applying both.
>>
>> 2014-08-31  Doug Evans  <xdje42@gmail.com>
>>
>> 	PR 17247
>> 	* guile.c: #include <signal.h>.
>> 	(_initialize_guile): Block SIGCHLD while initializing Guile.
>>
>> 	Replaces the following, which is reverted.
>>
>> 	2014-07-26  Doug Evans  <xdje42@gmail.com>
>>
>> 	PR 17185
>> 	* configure.ac: Add check for header gc/gc.h.
>> 	Add check for function setenv.
>> 	* configure: Regenerate.
>> 	* config.in: Regenerate.
>> 	* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.
>
> Hi.
> I have checked in this slight variation to trunk,
> and will commit it to the 7.8 branch tomorrow.
>
> [...]
>     gdb/ChangeLog:
>     
>     	PR 17247
>     	* guile.c: #include <signal.h>.
>     	(_initialize_guile): Block SIGCHLD while initializing Guile.
>     
>     	Replaces the following, which is reverted.
>     
>     	2014-07-26  Doug Evans  <xdje42@gmail.com>
>     
>     	PR 17185
>     	* configure.ac: Add check for header gc/gc.h.
>     	Add check for function setenv.
>     	* configure: Regenerate.
>     	* config.in: Regenerate.
>     	* guile/guile.c (_initialize_guile): Add workaround for libgc 7.4.0.

Pushed to 7.8 branch as well.



More information about the Gdb-patches mailing list