RFR: 8292695: SIGQUIT and jcmd attaching mechanism does not work with signal chaining library [v3]
Man Cao
manc at openjdk.org
Thu Sep 8 08:28:45 UTC 2022
On Thu, 8 Sep 2022 02:43:46 GMT, Man Cao <manc at openjdk.org> wrote:
>> I am somewhat surprised by this. My reading of the jsig code is that once the VM has installed a SIGQUIT handler during VM init, then subsequent attempts to install a user handler will add the handler to the set to be chained, but because this is a VM signal the VM will never call that chained handler. With the proposed changes if the SIGQUIT handler has not been installed by the VM then the user handler will be installed directly - though I think the VM's handler would then replace that.
>>
>> I find this all rather hard to follow and evaluate. As this seems to fix an issue I guess we can take it as-is and then keep an eye out for any unintended consequences. Though they will likely only come from external users so not something we will know till after the next release.
>
> Updated with tstuefe@'s recommendations. It still keeps the behavior that a user can install a SIGQUIT handler without -Xrs.
The behavior has changed. Now that with libjsig, user must have -Xrs to install a custom SIGQUIT handler.
-------------
PR: https://git.openjdk.org/jdk/pull/9955
More information about the hotspot-runtime-dev
mailing list