> i can reproduce it with this:
> 
> http://cm.bell-labs.com/sources/contrib/cinap_lenrek/traptest/
> 
> 8c test.c
> 8a int80.s
> 8l test.8 int80.8
> ./8.out
> 
> 8.out 12490667: suicide: sys: trap: general protection violation 
> pc=0x00001333

okay.  it seems pretty clear from the code that you're dead meat
if you receive a note while you're in the note handler.  that is,
up->notified = 1.  it looks pretty clear that this is intentional.
i don't see why one couldn't get 3-4 note before the note handler
is called, however.

given this, calling sleep() from the note handler is an especially
bad idea.

however, on a multiprocessor (or if you get scheduled by a clock
tick on a up), you're still vulnerable.  this is akin to hitting ^c
twice quickly — and watching one's shell exit.

it would be good to track down what's really going on in your
vm.  how many processors does plan 9 think it has?

i did some looking to see if i could find any discussions on the
implementation of notes and didn't find anything in my quick scan.
it would be very interesting to have a little perspective from someone
who was there.

- erik


Reply via email to