[Top][All Lists]

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

[Chicken-users] Race condition in scheduler.scm

From: F. Wittenberger
Subject: [Chicken-users] Race condition in scheduler.scm
Date: Sun, 17 Aug 2008 01:37:14 +0200

Hi all,

in this message
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

thank you


BTW (& why I'm I so desperate about it): I just completed the port of
Askemos ( to chicken.  This works pretty good on my
laptop now.  I intend to release it as soon as it's better tested.  For
that I need to roll the development environment out the several machines
and I'd really, really love to do so straight from chicken svn without
additional patches.  (And promise: Askemos will run without the patch;
but it handles lots of concurrent network connections.  It will surely
hit the race after a few minutes.)

Attachment: ebadf.patch
Description: Text Data

reply via email to

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