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

David Holmes dholmes at openjdk.org
Thu Apr 10 06:35:33 UTC 2025


On Wed, 9 Apr 2025 08:48:02 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> The `get_jvmti_thread_state()` function is called from `JvmtiExport::at_single_stepping_point()`.  It can block for virtual threads. Then the `SingleStep` events can be enabled at that point. The incorrect behavior is that the `SingleStep` events will be posted even though the virtual thread has been suspended with the JVMTI `SuspendThread`, `SuspendThreadList`, or `SuspendAllVirtualThreads`. The fix is to add a suspend point for virtual threads to the `get_jvmti_thread_state()` function.
>> 
>> Testing:
>>  - Ran mach5 tiers 1-6
>
> Serguei Spitsyn has updated the pull request incrementally with one additional commit since the last revision:
> 
>   review: added a couple of comments with important clarifications

src/hotspot/share/prims/jvmtiExport.hpp line 313:

> 311:   // Otherwise, the thread->jvmti_thread_state() is returned.
> 312:   // The 'allow_suspend' parameter is passed as 'true' by default which work for almost all call sites.
> 313:   // It means that a suspend point need to be organized by this function for virtual threads if the call

Suggestion:

  // It means that a suspend point needs to be organized by this function for virtual threads if the call

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

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


More information about the hotspot-runtime-dev mailing list