[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [ID 19991229.003] perl 5.005_03 core dumps -- signal



At 09:54 AM 1/12/00 -0500, Joshua N Pritikin wrote:
>The fancy stuff with Sigslot avoids any chance of loosing signals during
>inspection of the signal counters.  The signal counters are polled every
>iteration through the event loop.  This works well for easy stuff,
>meaning, your code is Event driven and doesn't care about signal
>latency.  My hope was that run-time opcode substitution would give us
>more ways to cope with these nasties.  Where does that patch stand?

In the works, pending a delivery of tuits. :)

>I usually give up at this point because I can see that signals are a
>mess and getting them to work with multiple threads is going to make it
>worse.  I am encouraged to hear that linux does not follow POSIX.  My
>experience with POSIX threads has not been very encouraging.

I wouldn't get too encouraged. Linux threads are an attempt to shoehorn 
POSIX threads onto a system that actively disapproves of them. The big 
issues are signals and process table exhaustion, but there are other niggly 
things. (Each thread has a separate pid, for example, and the kernel 
doesn't really know what 'process' a thread belongs to)

>My
>unsubstantiated suspicion is that the POSIX thread spec was written well
>ahead of any working implementation. I think it is likely that the linux
>model is better even though I haven't checked myself.  This is just a
>vague feeling.  I might be completely backwards here.

In some ways its worse. Because threads are really separate processes, only 
the thread that actually gets the signal delivered can see it. Not 
necessarily a bad thing (though it makes separate signal-handling threads 
trickier) but it is in direct contradiction to the standard they're 
implementing. (And for all its limits, POSIX threads were designed by a 
bunch of experienced, clever guys who got a standard that managed to meet 
the requirements of the folks involved. I'm not sure that the Linux changes 
have that level of experience behind their changes)

					Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk


Follow-Ups from:
Joshua N Pritikin <joshua.pritikin@db.com>
References to:
Tim Bunce <Tim.Bunce@ig.co.uk>
Larry Wall <larry@wall.org>
Joshua N Pritikin <joshua.pritikin@db.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]