unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: guile-user@gnu.org
Subject: Re: guile threading deadlock
Date: Sun, 09 Nov 2008 18:13:50 +0100	[thread overview]
Message-ID: <871vxkyg8h.fsf@gnu.org> (raw)
In-Reply-To: 3ae3aa420811081029y2d6334a1y84cef351e69b7de1@mail.gmail.com

Hi,

"Linas Vepstas" <linasvepstas@gmail.com> writes:

> Anyway, I have an even simpler variant, with only *one*
> thread deadlocked in gc.    Here's the scenario:
>
> thread A:
>    scm_init_guile();
>    does some other stuff, then
>    goes to sleep in select, waiting on socket input
>    (as expected).
>
> thread B:
>    scm_init_guile() -- hangs here.

Just to be sure: do you use raw select(2), `scm_std_select ()', or
select(2) within `scm_without_guile ()'?

The first option would lead to the situation you're observing because
Guile's GC requires thread to cooperate, which is why
`scm_without_guile' exists (info "(guile) Blocking").  You should use
one of the other options.

Ludo'.





  reply	other threads:[~2008-11-09 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-08  2:26 guile threading deadlock Linas Vepstas
2008-11-08 12:25 ` Ludovic Courtès
2008-11-08 18:29   ` Linas Vepstas
2008-11-09 17:13     ` Ludovic Courtès [this message]
2008-11-09 19:47       ` Linas Vepstas
2008-11-09 21:14         ` Ludovic Courtès
2008-11-09 22:16           ` Linas Vepstas
2008-11-09 23:36             ` Ludovic Courtès
2008-11-10 23:59               ` Linas Vepstas

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=871vxkyg8h.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-user@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).