RFR: 8371103: vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java failing

Leonid Mesnik lmesnik at openjdk.org
Thu Nov 6 21:33:38 UTC 2025


The problem happens because jvmti events are posted while handling JvmtiThreadState_lock. The fix just to move 
flushing out of lock like it is already done in `JvmtiEventController::set_user_enabled(..)` method.

The problem start reproducing after fix for https://bugs.openjdk.org/browse/JDK-8370732 that replaced GC triggering from slow and unreliable `ClassUnloader.eatMemory();` to fast and robust`WhiteBox.fullGC()`.

The jvmti events posting is not synchronized with  enabling/disabling events and setting callbacks. So even if there are new events appear in the jvmti tagmap after flushing it is not a bug to don't post them or use new callback handler.

Also, it might be makes sense to flush object events before vm_death and post all deferred events from SerrviceThread queue. 
I am going to file separate RFE for this. 
Also, I am going to file RFE to replace all GC provoking the `eatMemory()` calls with `WB.fullGC()` to improve test stability and reduce test execution time.

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

Commit messages:
 - 8371103: vmTestbase/nsk/jvmti/scenarios/events/EM02/em02t006/TestDescription.java failing

Changes: https://git.openjdk.org/jdk/pull/28184/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=28184&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8371103
  Stats: 8 lines in 2 files changed: 4 ins; 4 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28184.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28184/head:pull/28184

PR: https://git.openjdk.org/jdk/pull/28184


More information about the hotspot-dev mailing list