unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: guile-devel <guile-devel@gnu.org>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile
Date: Sun, 31 Aug 2014 13:20:48 -0700	[thread overview]
Message-ID: <CAP9bCMTNsoi6AhQxJtzjc6=o9iHi8TXkX32OiKbArAuAnsjZUQ@mail.gmail.com> (raw)
In-Reply-To: <834mwsh2nu.fsf@gnu.org>

[+ guile-devel]

On Sun, Aug 31, 2014 at 12:36 PM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Doug Evans <xdje42@gmail.com>
>> Date: Sun, 31 Aug 2014 12:07:58 -0700
>>
>> 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.
>
> A heretic thought: is it at all a good idea to have Guile (and GC)
> start threads when they run under GDB?  GDB is a single-threaded
> program, so having it linked against libraries that start threads
> whenever they like is IME a source of subtle problems (like this one)
> and a lot of pain down the road.  Anything GDB does that affects the
> global environment of the whole program (e.g., I/O redirection) will
> also affect those threads, with who knows what consequences.
>
> So maybe The Right Way of fixing these problems is configure Guile and
> GC so that they never start any additional threads?

Users are going to want to start threads.
I've seen that already.
I think we should not shy away from them.



       reply	other threads:[~2014-08-31 20:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m31trwv5o1.fsf@sspiff.org>
     [not found] ` <834mwsh2nu.fsf@gnu.org>
2014-08-31 20:20   ` Doug Evans [this message]
2014-09-01  2:36     ` [PATCH][PR guile/17247] Block SIGCHLD while initializing Guile Eli Zaretskii
2014-09-01 10:11       ` Ludovic Courtès
2014-09-01 14:39         ` Eli Zaretskii
2014-09-01 16:18           ` Ludovic Courtès
2014-09-01 17:10             ` Eli Zaretskii
2014-09-01 22:04               ` Doug Evans
2014-09-02 15:25                 ` Eli Zaretskii
2014-09-05  8:26                   ` Doug Evans
2014-09-05  8:48                     ` Eli Zaretskii
2014-09-05 10:51                       ` Pedro Alves
2014-09-05 11:51                         ` Eli Zaretskii
2014-09-05 12:48                           ` Pedro Alves
2014-09-05 11:50                       ` Ludovic Courtès
2014-09-01 12:48     ` Gary Benson
2014-09-01 16:34       ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAP9bCMTNsoi6AhQxJtzjc6=o9iHi8TXkX32OiKbArAuAnsjZUQ@mail.gmail.com' \
    --to=xdje42@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).