|
From: | Panicz Maciej Godek |
Subject: | bug#14511: Unexpected behaviour of scm_gc+sleep/usleep in another thread |
Date: | Wed, 5 Jun 2013 13:12:38 +0200 |
[...]
> Version: 1:7.1-8ubuntu0.12.04.1
[...]
The documentation of ‘sleep’ is:
>> Could you check whether the problem still occurs with Guile 2.0.9?
>>
> It does (at least when linked against the same garbage collector)
- Scheme Procedure: sleep i
Wait for the given number of seconds (an integer) or until a signal
arrives. The return value is zero if the time elapses or the
number of seconds remaining otherwise.
I’m pretty sure that if you check its return value, you’ll notice that
it behaves as documented. Can you confirm?
What happens here is that libgc uses signals for stop-the-world
collections, and (gc) certainly does with the libgc version you’re
using.
‘sleep’ calls select(2), which in your case presumably returns
prematurely with EINTR. You should be able to confirm this hypothesis
by running Guile with:
strace -f -e select guile
(Note that the problem doesn’t occur with libgc 7.2, presumably because
it uses a different strategy.)
[Prev in Thread] | Current Thread | [Next in Thread] |