bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10641: [2.0.3+] start_signal_delivery_thread failure on x86_64-freeb


From: Ludovic Courtès
Subject: bug#10641: [2.0.3+] start_signal_delivery_thread failure on x86_64-freebsd8.2
Date: Fri, 29 Mar 2013 10:49:41 +0100
User-agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.3 (gnu/linux)

Andy Wingo <address@hidden> skribis:

> On Sun 29 Jan 2012 19:00, address@hidden (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.

Good catch, and congratulations!  I can confirm that this fixes
--with-thread builds on FreeBSD 8.2:

  http://hydra.nixos.org/build/4519811

Thanks!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]