From: Andy Wingo <wingo@pobox.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: 10641-done@debbugs.gnu.org
Subject: bug#10641: [2.0.3+] start_signal_delivery_thread failure on x86_64-freebsd8.2
Date: Wed, 13 Mar 2013 11:02:41 +0100 [thread overview]
Message-ID: <87sj3zipmm.fsf@pobox.com> (raw)
In-Reply-To: <87r4yipex5.fsf@gnu.org> ("Ludovic Courtès"'s message of "Sun, 29 Jan 2012 19:00:22 +0100")
Hi,
On Sun 29 Jan 2012 19:00, ludo@gnu.org (Ludovic Courtès) writes:
> Adding printfs shows that the thread calling scm_spawn_thread leaves
> cond_wait before the signal thread has signaled the condition (in
> really_spawn).
From http://pubs.opengroup.org/onlinepubs/009604599/functions/pthread_cond_wait.html
When using condition variables there is always a Boolean predicate
involving shared variables associated with each condition wait that is
true if the thread should proceed. Spurious wakeups from the
pthread_cond_timedwait() or pthread_cond_wait() functions may
occur. Since the return from pthread_cond_timedwait() or
pthread_cond_wait() does not imply anything about the value of this
predicate, the predicate should be re-evaluated upon such return.
It seems this code is not robust in the face of spurious wakeups. I
pushed a patch that waits for data.thread to become non-false. That
should fix this issue.
Cheers,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2013-03-13 10:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 18:00 bug#10641: [2.0.3+] start_signal_delivery_thread failure on x86_64-freebsd8.2 Ludovic Courtès
2013-03-13 10:02 ` Andy Wingo [this message]
2013-03-29 9:49 ` Ludovic Courtès
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=87sj3zipmm.fsf@pobox.com \
--to=wingo@pobox.com \
--cc=10641-done@debbugs.gnu.org \
--cc=ludo@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).