[jdk18] RFR: 8278987: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in __write_sample_info__
Markus Grönlund
mgronlun at openjdk.java.net
Sun Dec 19 17:20:38 UTC 2021
Greetings,
JDK-8277919 tried to reduce the number of stacktraces that were serialized per chunk for leak profiler candidate objects.
To serialize the stacktrace for a leak profiler candidate object, one must ensure not to reference an already unloaded klass / method. This is done by inspecting an unloaded list. To protect this list from growing (and from being reallocated), it is protected under the ClassLoaderDataGraph_lock.
By taking the ClassLoaderDataGraph_lock, a safepoint is now introduced in the code that did not safepoint previously. This means the objects on the list to be serialized can now be gc'd. Indeed, there is a crash where the serialization logic attempts to read the klass for an object that has now been gc'd.
I need to restore this attempt - there are other ways to reduce the number of traces serialized for new leak profiler candidates in each chunk, which are a very small number by default anyways. Also, the need to use the unloaded list during serialization is removed in future branches.
Testing: jdk_jfr
Thanks
Markus
-------------
Commit messages:
- 8278987
Changes: https://git.openjdk.java.net/jdk18/pull/47/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=47&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8278987
Stats: 9 lines in 1 file changed: 0 ins; 6 del; 3 mod
Patch: https://git.openjdk.java.net/jdk18/pull/47.diff
Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/47/head:pull/47
PR: https://git.openjdk.java.net/jdk18/pull/47
More information about the hotspot-jfr-dev
mailing list