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

Markus Grönlund mgronlun at openjdk.java.net
Wed Dec 22 12:33:30 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

This pull request has now been integrated.

Changeset: 713fbeb0
Author:    Markus Grönlund <mgronlun at openjdk.org>
URL:       https://git.openjdk.java.net/jdk18/commit/713fbeb050a8f79d3a662106125c3f14f3952741
Stats:     9 lines in 1 file changed: 0 ins; 6 del; 3 mod

8278987: RunThese24H.java failed with EXCEPTION_ACCESS_VIOLATION in __write_sample_info__

Reviewed-by: jbachorik

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

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


More information about the hotspot-jfr-dev mailing list