chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Race condition in scheduler.scm


From: Elf
Subject: Re: [Chicken-users] Race condition in scheduler.scm
Date: Sun, 17 Aug 2008 03:47:40 -0700 (PDT)

On Sun, 17 Aug 2008, Jörg F. Wittenberger wrote:

Hi all,

in this message
http://lists.gnu.org/archive/html/chicken-users/2008-08/msg00094.html
I posted a patch to scheduler.scm, which fixes a race condition wrt. bad
file descriptors in the waiting queue.
(Attached is a slightly brushed up version.)

I have not seen any replies to this message (which is sort of strange on
this list).  Did anyone consider to roll it in?  If not, why?  Anything
bad about it?

The race originally arose in a somewhat strange setup, which might not
be even repeatable for everyone, since it involved accidentally changing
the scheduling sequence (using more or fewer exception handlers), which
may have different results on different machines.

But the issue as such is easy to recreate, if you make a thread wait
asynchronously on any file descriptor and close that fd from a second
thread.  (Something, which may or may not be intentional, but easy to
do.)


i'm not understanding why this would cause a 'race condition', nor why your patch is necessary. the lines which you deleted from the scheduler (the -1
check and forced-primordial) accomplish the same thing without raising an
exception or causing modifications to the signal/condition/exception handler
in unsafe ways.

-elf

reply via email to

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