RFR: 8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown [v4]
Erik Gahlin
egahlin at openjdk.org
Wed Jun 12 22:23:12 UTC 2024
On Tue, 11 Jun 2024 17:37:37 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
>
> Markus Grönlund has updated the pull request incrementally with one additional commit since the last revision:
>
> update comment
Marked as reviewed by egahlin (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/19510#pullrequestreview-2114323326
More information about the hotspot-jfr-dev
mailing list