Further to the last post, I've determined (lines preceded by '-' are debug 
messages in my kernel): 

*** sigtoproc sets the signal mask
     - 3000BA224EC = 00020000 00000000 00000000 00000000

*** issig_forreal called which calls fsig which checks the masks and finds 
signal 18 ready to send
     - pid: 100454 sigbits[0] is zero - ssp: 2a100a19830
     - pid: 100454 sigbits[1] is zero - ssp: 2a100a19830
     - pid: 100454 temp.__sigbits[0]=131072 NBBY=8 lowbit(temp.__sigbits[0])=18 
ssp: 3000ba224ec

*** sigdqe dequeues the signal and clears the mask

*** sshd used the signal() API which gets transformed to a sigaction with the 
SA_RESETHAND flag set, so setsigact clears the handler and mask

*** sendsig32 prepares process to call the handler
     - context setup to go to handler for 100454

*** sshd is currently in a critical section so the signal gets deferred until 
do_exit_critical() calls take_deferred_signal() which drives a sigresend 
syscall 
     - pid: 100454 sigresend - sig: 18 signinfo: 0 set: 7d502738
     - - sigbits[0]: 0 sigbits[1]: 0

*** However, issig_forreal() and fsig() find that the mask zeroed so there's no 
signal to be sent!!!
     - pid: 100454 sigbits[0] is zero - ssp: 2a100a19830
     - pid: 100454 sigbits[1] is zero - ssp: 2a100a19830
     - pid: 100454 sigbits[0] is zero - ssp: 3000ba224ec
     - pid: 100454 sigbits[1] is zero - ssp: 3000ba224ec
     - issig(0)=0

Now sshd could be changed to use sigaction without the SA_RESETHAND flag, but 
this hasn't been a problem for anyone else so I'm wondering if the resend logic 
is complete.

Neale
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to