RFR: 8316397: StackTrace/Suspended/GetStackTraceSuspendedStressTest.java failed with: SingleStep event is NOT expected [v4]

Patricio Chilano Mateo pchilanomate at openjdk.org
Thu Feb 27 15:19:57 UTC 2025


On Wed, 26 Feb 2025 17:04:28 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>>> We are checking for suspension in ~ThreadInVMfromJava(), the problem is that the check there is too late,
>> 
>> Okay but why are we not checking in the initial transition from Java, or elsewhere in the JRT_ENTRY?
>> 
>> It just seems to me this is a general problem but we only happened to have tripped over one case of it.
>
> David and Patricio, thank you for raising this concern and discussion. I agree that normal mechanisms like `JRT_ENTRY` or `ThreadInVMfromJava` should provide suspend points before posting the JVMTI events. Let me do some investigation/analysis first. I suspect we might need to provide a suspend point in the `ThreadInVMfromJava` constructor additionally to the one in the destructor even though it looks a little bit strange.

Adding a suspend check there won’t fix this issue though. It has to be added somewhere between coming out of the blocked state (where the thread can be seen as handshake-safe and suspended) and posting the event.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23490#discussion_r1973804882


More information about the hotspot-runtime-dev mailing list