RFR: 8340698: JVMTI FRAME_POP event is sometimes missed if NotifyFramePop is called as a method is returning

Serguei Spitsyn sspitsyn at openjdk.org
Fri Oct 11 09:18:23 UTC 2024


There is a race between JVMTI NotifyFramePop function and FramePop event posting code.
The fix is to return JVMTI_ERROR_OPAQUE_FRAME if if a FramePop event with depth 0 is requested by NotifyFramePop at the time when the target frame is in exit epilogue, and MethodExit/FramePop events are being posted for it.

Testing:
 - verified locally with new test (developed by Chris): `serviceability/jvmti/events/NotifyFramePopStressTest`
 - TBD: mach5 tiers 1-6

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

Commit messages:
 - fixed trailing spaces in new test
 - 8340698: JVMTI FRAME_POP event is sometimes missed if NotifyFramePop is called as a method is returning

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

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


More information about the hotspot-dev mailing list