RFR: 8292695: SIGQUIT and jcmd attaching mechanism does not work with signal chaining library

Man Cao manc at openjdk.org
Thu Sep 8 02:54:43 UTC 2022


On Wed, 7 Sep 2022 20:11:40 GMT, Man Cao <manc at openjdk.org> wrote:

> > But there is nothing that prevents us from moving the SIGQUIT handler installation up in time to the hotspot signal handler initialization. Nobody says the SIGQUIT handler has to be installed after the signal dispatcher thread started.
> 
> Thank you for the great idea and experiment! Let me try this approach and rerun the tests.

Switched to the approach that installs the handler only once.

The SIGQUIT handler has to be installed after jdk_misc_signal_init() has initialized `pending_signals` and `sig_semaphore`, which are used by `os::signal_notify()`.
This means SIGQUIT handler is still installed outside libjsig's JVM_begin_signal_setting/JVM_end_signal_setting window, so it not tracked by libjsig like other HotSpot signals.

-------------

PR: https://git.openjdk.org/jdk/pull/9955


More information about the hotspot-runtime-dev mailing list