RFR: 8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead
Aleksey Shipilev
shade at openjdk.org
Wed Mar 19 17:52:54 UTC 2025
Little regression crept in with [JDK-8351142](https://bugs.openjdk.org/browse/JDK-8351142): on the deflation path, object associated with monitor can be already dead. The event wants to record it, touches the dead object and crashes. The fix is simple: since we cannot infer any useful information from the event, we just skip the event emit.
A new stress test fails within seconds without a fix. It also covers other monitor events, so we have extra coverage there as well.
Additional testing:
- [x] Linux x86_64 server fastdebug, new stress test now passes
- [x] Linux x86_64 server fastdebug, `jdk_jfr`
-------------
Commit messages:
- Stress test
- Blind fix
Changes: https://git.openjdk.org/jdk/pull/24121/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24121&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8352414
Stats: 158 lines in 2 files changed: 157 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/24121.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24121/head:pull/24121
PR: https://git.openjdk.org/jdk/pull/24121
More information about the hotspot-dev
mailing list