RFR: 8279124: VM does not handle SIGQUIT during initialization [v2]
Xin Liu
xliu at openjdk.java.net
Thu Jan 20 06:09:50 UTC 2022
On Wed, 19 Jan 2022 12:06:49 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Sorry for being difficult, but I would not do UL logging here. UL is heavyweight, and a shifting target too, because folks like to extend it with new capabilities. God knows what log_info really does (initialization, network traffic, accessing thread locals...) or will do in the future.
>>
>> I'd keep it simple stupid and either just use write to fd=2 or fprintf(stderr). The former is safe to use in signal handling contexts, not sure about the latter. Otherwise maybe David is right and we skip the output altogether.
>
> Do not use UL from a signal handler! It is not safe. printf may not even be safe.
>
> I really do not think we need to try and be this accommodating to what seems an unrealistic scenario.
okay. I remove log_info() from signal handler.
I don't think it's a good idea to inject a message to stdout/stderr. 1) it's inconsistent to other signals in the signal handler. 2) some java applications expect to certain outputs because they may pipe them. Injecting a message for SIGQUIT from attach client may mess them up. I think it's fine to silence it.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7003
More information about the serviceability-dev
mailing list