[Top][All Lists]

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

Re: [Chicken-hackers] Regarding #1564: srfi-18: (mutex-unlock) Internal

From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] Regarding #1564: srfi-18: (mutex-unlock) Internal scheduler error
Date: 02 Dec 2018 19:39:27 +0100

Hi all,

when I tried to reply in a timely manner I apparently sent out a link to a broken file. Sorry for that.

Just wanted to see if I could create a patch for the current master.

For this I need srfi-18 egg source too.  Just I can't find it.


On Nov 30 2018, Jörg F. Wittenberger wrote:

Hello Megane,

On Nov 30 2018, megane wrote:


Here's another version that crashes quickly with "very high
24 Error: (mutex-unlock) Internal scheduler error: unknown thread state
   25   #<thread: thread1>
   26   ready

This bears an uncanny resemblance to scheduler issues I've been fighting a long ago.

Too long to ago.

--- A fix

Just allow the 'ready state for threads in mutex-unlock!

Is this a correct fix?

Too long ago.

But it feels wrong. We'd rather make sure there is no ready thread in the queue waiting for a mutex in the first place.

Diffing the changes I maintained quite a while back you will find that I added a


Towards the end of scheduler.scm and used it for consistency whereever I ran into not-so-clean unlocks.

Now this is still an invasive change. But looking at the source of scheduler and srfi-18 in chicken 5 right now, I can't fight the feeling that it is working around the missing changes at several places.



Chicken-hackers mailing list

reply via email to

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