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

Serguei Spitsyn sspitsyn at openjdk.org
Thu Nov 6 22:31:02 UTC 2025


On Thu, 6 Nov 2025 21:26:24 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> 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.

looks good.

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

Marked as reviewed by sspitsyn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28184#pullrequestreview-3430797067


More information about the hotspot-dev mailing list