chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] force-primordial - dunno what to do


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] force-primordial - dunno what to do
Date: Mon, 15 Feb 2016 12:36:59 +0100
User-agent: Mozilla/5.0 (X11; Linux armv7l; rv:38.0) Gecko/20100101 Icedove/38.4.0

in case nobody finds why we ##sys#force-primordial find a patch attached
which simply removes it.

/Jörg

Am 14.02.2016 um 19:35 schrieb Jörg F. Wittenberger:
> Hi,
> 
> chickens leaves me with a segfault every now and then.  Turned out this
> is dues to:
> 
>  (dbg "select(2)/poll(2) returned with result -1" )
>  (##sys#force-primordial)
> 
> in ##sys#unblock-threads-for-i/o
> 
> I did not yet understand how this comes to produce a segfault.
> 
> Less I understand why the primordial should be special (i.e. required
> special care from the app programmer) to expect sudden unblocks when
> other threads don't.  (some code could be simpler if it had not to
> handle this case)
> 
> Even less I understood what the primordial is actually supposed to do at
> this point.
> 
> As it looked completely useless to me I decided to try a modified
> ##sys#force-primordial like this:
> 
>  (define (##sys#force-primordial)
>   (dbg2 "primordial thread forced due to interrupt\n")
>   ;;;; (##sys#setislot ##sys#primordial-thread 13 #f)
>   ;;;; (##sys#thread-unblock! ##sys#primordial-thread)
>  )
> 
> Which is I simply made it always log the call to stderr but not do
> actually anything to the primordial.  ("dbg2" is a copy of the commented
> out version of "dbg" in scheduler.scm.)
> 
> The effect:
> 
> a) no damage.  Threading working, signals working, tests passing.
> b) segfault gone
> 
> Has anybody any knowledge when this is actually required?
> 
> Thanks
> 
> /Jörg
> 
> _______________________________________________
> Chicken-hackers mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/chicken-hackers
> 

Attachment: 0012-Remove-force-primordial.patch
Description: Text Data


reply via email to

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