chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Reschedule when a thread blocked on thread


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] [PATCH] Reschedule when a thread blocked on thread-join! is forcibly resumed
Date: Thu, 2 Jun 2016 11:32:49 +0200
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.4.0

Hi Evan,

Am 02.06.2016 um 08:41 schrieb Evan Hanson:
> Hi folks,
> 
> After some digging I've found a small bug in our srfi-18 implementation
> that can have quite sinister effects on programs unlucky enough to be
> affected by it. Here's the commit message:
> 
>> When a thread that's waiting on another with `thread-join!` is forced
>> to execute -- usually on an interrupt, when the primordial thread is
>> forcibly resumed via `##sys#force-primordial` -- it must return
...
> Additionally, Jörg, I'd appreciate it if you could remove your
> modifications to `##sys#force-primordial` and give this patch a try when
> you have a chance. I think there's a good chance that the errors you
> described in <address@hidden> were caused by this issue.

No need to actually try.  You patch does exactly what my first
workaround was when I discovered the issue.

However it looks to me as curing the symptom rather then cause.

Convince me otherwise: IMHO forcing the primordial to execute is the
actual bug.  Once we don't do this anymore, we can go over all the code
and remove the code dealing with the consequences.

The first alternative coming to my mind would be to have a dedicated
interrupt handling thread, which we could unleash instead of the
primordial.  In a next step we could make this thread do all the
interrupt dispatching, which in turn would allow us to remove all those
##sys#dispatch-interrupt code abundant in the i/o code.

Cheers

/Jörg



reply via email to

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