RFR: 8267842: SIGSEGV in get_current_contended_monitor [v6]

Daniel D.Daugherty dcubed at openjdk.java.net
Fri May 28 13:42:30 UTC 2021


On Fri, 28 May 2021 07:06:50 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:

> I thought we took snapshots when threads were known to be safe and stable.

When we ask for snapshots with stack traces, we use a safepoint to get all of
target thread's stack traces at the same time. Obviously that code path is safe.

The "other" code path is when we don't ask for stack traces and that path has
always been carefully coded to return non stack trace information in a safe manner,
but it does not use a safepoint or a handshake. 

This duality in code paths is why the new test I wrote:
serviceability/monitoring/ThreadInfo/GetLockOwnerName/GetLockOwnerName.java
makes alternating calls of asking for the stack trace and then not.

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

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


More information about the serviceability-dev mailing list