Integrated: 8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown

Markus Grönlund mgronlun at openjdk.org
Mon Jun 17 13:00:20 UTC 2024


On Sat, 1 Jun 2024 16:08:51 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:

> Objects with static storage duration will implicitly add their destructors to the std::atexit callbacks list. During process shutdown, the C routine __ run_exit_handlers() invokes the destructors on the std::atexit callback list.
> 
> The RefCountHandle has static storage and a destructor that decrements a reference counted pointer and, if necessary, deletes the pointee's contents. In this case, this pointee includes yet another embedded RefCountHandle.
> 
> When the destructor is invoked, it causes a cascade of handles to be destroyed, so many that it causes a stack overflow. The list contains about 87000 entries. These reference-counted pointees are blobs saving metadata-related information about class unloading.
> 
> The DeprecationManager subsystem lacks a filtering mechanism, similar to the ObjectSampler subsystem, to decide what to save concerning class unloading blobs.
> 
> One solution is to consolidate the preservation of type set blobs for both the DeprecatedManager and the ObjectSampler subsystems. Additionally, filtering will prevent the storage of redundant data. This, coupled with more frequent scavenging of the list, will effectively avert a stack overflow.
> 
> Testing: jdk_jfr, stress testing
> 
> Thanks
> Markus

This pull request has now been integrated.

Changeset: cdf22b13
Author:    Markus Grönlund <mgronlun at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cdf22b13204456b589349500bef0e9d48af44e83
Stats:     412 lines in 11 files changed: 249 ins; 100 del; 63 mod

8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown

Reviewed-by: egahlin

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

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


More information about the hotspot-jfr-dev mailing list