RFR: 8279124: VirtualMachineImpl should check signal handler has installed before sending SIGQUIT [v2]

David Holmes dholmes at openjdk.java.net
Wed Jan 19 07:18:23 UTC 2022


On Wed, 19 Jan 2022 06:54:01 GMT, Xin Liu <xliu at openjdk.org> wrote:

>> src/hotspot/os/posix/signals_posix.cpp line 597:
>> 
>>> 595: #endif
>>> 596: 
>>> 597:   if (!signal_was_handled && sig == BREAK_SIGNAL) {
>> 
>> I would print out a little message, since callers of SIGQUIT may expect something to happen here. Maybe "Thread dumps not yet available"?
>> Also, just for clarity, assert(!ReduceSignalHandling)? (but we don't do that for the other signals we omit handling either, so maybe not)
>
> This is in the signal handler. Is it safe to print message or do something complex?

I would not print anything here, first because it is in the signal handler and secondly I don't think it is needed. No real thread dump usages are going to hit a VM that hasn't initialized yet IMO.

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

PR: https://git.openjdk.java.net/jdk/pull/7003


More information about the serviceability-dev mailing list