From: Andy Wingo <wingo@pobox.com>
To: Derek Upham <sand@blarg.net>
Cc: guile-devel@gnu.org
Subject: Re: Cygwin port of Guile 2.2
Date: Mon, 17 Apr 2017 10:04:42 +0200 [thread overview]
Message-ID: <878tmz7945.fsf@pobox.com> (raw)
In-Reply-To: <87pogft8c2.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Fri, 14 Apr 2017 06:41:33 -0700")
On Fri 14 Apr 2017 15:41, Derek Upham <sand@blarg.net> writes:
> There’s the finalizer thread, but there’s also the signal delivery
> thread. The “sigaction” code ensures that signal delivery thread is
> running. And note that “primitive-fork” is supposed to display a
> warning if you are forking with outstanding threads, but it explicitly
> ignores the signal delivery thread during its check.
Yep, though the signal delivery thread doesn't run unless you have
installed a signal handler. I think currently the combination of
signals + guile-with-threads + primitive-fork (rather than open-process)
isn't supported. It warns in 2.2 but the situation was the same in
2.0. I am not sure how it can be made to work (though I did try!) and
would be interested to see your fix :)
> I have found that what actually hangs after a fork are the mutexes
> supporting the threads: they are kernel-level resources, referenced by
> ID, and end up being shared between parent and child.
Which ones, precisely?
> I don’t think there’s any safe way to restore the finalizer thread and
> support SCSH-style (begin ...) process forms. Shutting down the
> finalizer thread is the best we can do.
The finalizer thread should be restored as needed, the next time GC
calls notify_finalizers_to_run.
I think also that if you are most interested in a system in which
primitive-fork plays a large role, then probably you want a Guile
without threads (including the GC mark threads). Threads + fork is not
a recipe for success :)
Andy
next prev parent reply other threads:[~2017-04-17 8:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 16:45 Cygwin port of Guile 2.2 Mike Gran
2017-04-04 17:03 ` Eli Zaretskii
2017-04-14 8:35 ` Andy Wingo
2017-04-14 13:41 ` Derek Upham
2017-04-17 8:04 ` Andy Wingo [this message]
2017-04-17 15:05 ` Derek Upham
2017-05-01 20:48 ` Derek Upham
2017-05-02 19:35 ` Andy Wingo
2017-05-03 3:18 ` Derek Upham
2017-05-03 9:24 ` Andy Wingo
2017-05-03 9:39 ` szgyg
2017-05-03 14:21 ` Derek Upham
2017-05-09 19:08 ` Andy Wingo
2017-05-12 14:13 ` Derek Upham
2017-05-15 20:06 ` Andy Wingo
2017-05-04 5:21 ` zv
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=878tmz7945.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=guile-devel@gnu.org \
--cc=sand@blarg.net \
/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).