GNU bug report logs - #10641
[2.0.3+] start_signal_delivery_thread failure on x86_64-freebsd8.2

Previous Next

Package: guile;

Reported by: ludo <at> gnu.org (Ludovic Courtès)

Date: Sun, 29 Jan 2012 18:01:01 UTC

Severity: normal

Done: Andy Wingo <wingo <at> pobox.com>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 10641-done <at> debbugs.gnu.org (full text, mbox):

From: Andy Wingo <wingo <at> pobox.com>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 10641-done <at> debbugs.gnu.org
Subject: Re: bug#10641: [2.0.3+] start_signal_delivery_thread failure on
	x86_64-freebsd8.2
Date: Wed, 13 Mar 2013 11:02:41 +0100
Hi,

On Sun 29 Jan 2012 19:00, ludo <at> 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/




This bug report was last modified 12 years and 116 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.