openj9 icon indicating copy to clipboard operation
openj9 copied to clipboard

Enhancement: Add SIGUSR2 handler and matching -Xdump event

Open kgibm opened this issue 3 years ago • 0 comments

There is a common need for additional -Xdump signal events; for example, to manually request a system dump with request=exclusive+prepwalk (there are alternative mechanisms to request such dumps, but they may have issues around usability, availability, etc.). The only practically customizable signal event for this use case is user. We often find that customers have configured the user event to create heapdumps or core dumps and this precludes us from using the user event for java dumps for low-overhead performance, hang, and high CPU investigations.

The natural candidates for additional -Xdump signal events are SIGUSR1 and/or SIGUSR2.

Searching the code, it seems SIGUSR1 is already used internally; for example, on z/OS:

/*
 * This is the signal that we use to suspend the various threads. This signal must be not be collapsable and
 * must pass on values specified by sigqueue.
 */

#define SUSPEND_SIG SIGUSR1

However, SIGUSR2 does not seem to be in use.

kgibm avatar Jul 27 '22 20:07 kgibm