[jdk18] RFR: 8278987: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in __write_sample_info__

Markus Grönlund mgronlun at openjdk.java.net
Wed Dec 22 12:01:16 UTC 2021


On Sun, 19 Dec 2021 17:13:39 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> 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

Just to clarify: the original issue JDK-8277919 is still resolved even with this restore. The restore is only for the extra attempt to reduce size even further involving a certain number (relatively small) of stacktraces serialized as part of each chunk.

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

PR: https://git.openjdk.java.net/jdk18/pull/47


More information about the hotspot-jfr-dev mailing list