This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
- From: Doug Evans <xdje42 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 09 Sep 2014 22:15:08 -0700
- Subject: Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
- Authentication-results: sourceware.org; auth=none
- References: <m31trwv5o1 dot fsf at sspiff dot org> <m3wq9ds5ja dot fsf at sspiff dot org>
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.