RFR: 8279124: VirtualMachineImpl should check signal handler has installed before sending SIGQUIT
Xin Liu
xliu at openjdk.java.net
Wed Jan 19 07:12:23 UTC 2022
On Mon, 17 Jan 2022 09:52:04 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> > > I propose a simpler and more robust way to fix it though
> >
> >
> > Great, this is the kind of thing I was heading towards with the conversation in the bug text. Although not sure why I could not reproduce the problem, with various different JDK versions.
>
> Ah, I missed your conversation.
>
> I reproduced this by adding a delay during initialization and sending sigquit manually. The bug is not restricted to jcmd, sigquit handling is broken during initialization. Folks tend to send sigquit to unresponsive VMs to get thread dumps, so coring is unfortunate (another reason not to fix it in jcmd itself).
>
> Cheers, Thomas
Yes, I learn this trick recently. If the JVM looks suspiciously frozen, just input `Ctrl-` to get the thread dump. Essentially, this is same as "kill -3 $pid" on Linux. jcmd happens to do the same if it can't find the socket file /tmp/.java_pid$pid.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7003
More information about the serviceability-dev
mailing list