unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Mathieu Othacehe <othacehe@gnu.org>
Cc: 52646@debbugs.gnu.org
Subject: bug#52646: GC thread freeze
Date: Tue, 21 Dec 2021 11:16:36 +0100	[thread overview]
Message-ID: <87wnjy6z5n.fsf@gnu.org> (raw)
In-Reply-To: <878rwhbppt.fsf@gnu.org> (Mathieu Othacehe's message of "Sat, 18 Dec 2021 21:52:30 +0100")

Hello!

Mathieu Othacehe <othacehe@gnu.org> skribis:

> I experiment a strange behaviour with this Guile 3.0.7 process:
> https://git.savannah.gnu.org/cgit/guix/guix-cuirass.git/tree/src/cuirass/scripts/remote-worker.scm.
>
> The process is forking N processes that in turn start 4 threads.

This is happening in this order, right?

POSIX leaves unspecified the behavior of a child process forked from a
multi-threaded process; there could be deadlocks, etc.  ‘primitive-fork’
prints a warning when called from a multi-threaded Guile process.

The solution is for multi-threaded Guile processes to not fork at all,
or to fork only via ‘open-pipe*’, ‘system*’, etc., which are “known
good” (they take care of post-fork handling in the child and call ‘exec’
before anything bad could happen.)

Thanks,
Ludo’.





  reply	other threads:[~2021-12-21 10:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-18 20:52 bug#52646: GC thread freeze Mathieu Othacehe
2021-12-21 10:16 ` Ludovic Courtès [this message]
2021-12-22  9:15   ` Mathieu Othacehe

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=87wnjy6z5n.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52646@debbugs.gnu.org \
    --cc=othacehe@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).