Skip to content

8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown #19510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 7 commits into from

Conversation

mgronlun
Copy link

@mgronlun mgronlun commented Jun 1, 2024

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


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown (Bug - P2)(⚠️ The fixVersion in this issue is [23] but the fixVersion in .jcheck/conf is 24, a new backport will be created when this pr is integrated.)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19510/head:pull/19510
$ git checkout pull/19510

Update a local copy of the PR:
$ git checkout pull/19510
$ git pull https://git.openjdk.org/jdk.git pull/19510/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 19510

View PR using the GUI difftool:
$ git pr show -t 19510

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19510.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 1, 2024

👋 Welcome back mgronlun! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Jun 1, 2024

@mgronlun This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8326715: ZGC: RunThese24H fails with ExitCode 139 during shutdown

Reviewed-by: egahlin

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 251 new commits pushed to the master branch:

  • 5528ad7: 8334179: VMATreeTest.TestConsistencyWithSimpleTracker_vm runs 50+ seconds
  • 5d2a19d: 8333684: C2 SuperWord: multiple smaller refactorings in preparation for JDK-8332163
  • 301bd70: 8311110: multichar warning in WinAccessBridge.cpp
  • 238162a: 8322064: Remove expired flags in JDK 24
  • fcedde8: 8330846: Add stacks of mounted virtual threads to the HotSpot thread dump
  • 74468bc: 8209092: Remove outdated wording from RC5ParameterSpec
  • b697b48: 8315655: [macos] Right click and dragging over a component with a popup menu will open the popup
  • 2c1da6c: 8332139: SymbolTableHash::Node allocations allocates twice the required memory
  • ba67ad6: 8319457: Update jpackage to support WiX v4 and v5 on Windows
  • 2c9185e: 8321308: AArch64: Fix matching predication for cbz/cbnz
  • ... and 241 more: https://git.openjdk.org/jdk/compare/cabe337400a0bd61d73bf3ca66e16266267299c7...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk
Copy link

openjdk bot commented Jun 1, 2024

@mgronlun The following label will be automatically applied to this pull request:

  • hotspot-jfr

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Jun 1, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 1, 2024
@mlbridge
Copy link

mlbridge bot commented Jun 1, 2024

Webrevs

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 12, 2024
@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

Going to push as commit cdf22b1.
Since your change was applied there have been 282 commits pushed to the master branch:

  • ef7923e: 8334078: RISC-V: TestIntVect.java fails after JDK-8332153 when running without RVV
  • 0d1080d: 8331117: [PPC64] secondary_super_cache does not scale well
  • 113a2c0: 8332903: ubsan: opto/output.cpp:1002:18: runtime error: load of value 171, which is not a valid value for type 'bool'
  • d751441: 8330586: GHA: Drop additional gcc/glibc packages installation for x86_32
  • 5e09397: 8334222: exclude containers/cgroup/PlainRead.java
  • 7b38bfe: 8333729: C2 SuperWord: remove some @requires usages in test/hotspot/jtreg/compiler/loopopts/superword
  • 29b6392: 8334228: C2 SuperWord: fix JDK-24 regression in VPointer::cmp_for_sort after JDK-8325155
  • 31e8deb: 8324781: runtime/Thread/TestAlwaysPreTouchStacks.java failed with Expected a higher ratio between stack committed and reserved
  • 8464ce6: 8332113: Update nsk.share.Log to be always verbose
  • 548e95a: 8330702: Update failure handler to don't generate Error message if cores actions are empty
  • ... and 272 more: https://git.openjdk.org/jdk/compare/cabe337400a0bd61d73bf3ca66e16266267299c7...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 17, 2024
@openjdk openjdk bot closed this Jun 17, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 17, 2024
@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun Pushed as commit cdf22b1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mgronlun
Copy link
Author

/backport jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun The target repository jdk23 is not a valid target for backports.
List of valid target repositories: openjdk/jdk, openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk17u, openjdk/jdk17u-dev, openjdk/jdk21u, openjdk/jdk21u-dev, openjdk/jdk22u, openjdk/jdk23u, openjdk/jdk7u, openjdk/jdk8u, openjdk/jdk8u-dev, openjdk/jfx, openjdk/jfx17u, openjdk/jfx21u, openjdk/jfx22u, openjdk/lilliput-jdk17u, openjdk/lilliput-jdk21u, openjdk/shenandoah-jdk21u, openjdk/shenandoah-jdk8u.
Supplying the organization/group prefix is optional.

@mgronlun
Copy link
Author

/backport openjdk jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun The target repository openjdk is not a valid target for backports.
List of valid target repositories: openjdk/jdk, openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk17u, openjdk/jdk17u-dev, openjdk/jdk21u, openjdk/jdk21u-dev, openjdk/jdk22u, openjdk/jdk23u, openjdk/jdk7u, openjdk/jdk8u, openjdk/jdk8u-dev, openjdk/jfx, openjdk/jfx17u, openjdk/jfx21u, openjdk/jfx22u, openjdk/lilliput-jdk17u, openjdk/lilliput-jdk21u, openjdk/shenandoah-jdk21u, openjdk/shenandoah-jdk8u.
Supplying the organization/group prefix is optional.

@mgronlun
Copy link
Author

/backport openjdk/jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun The target repository openjdk/jdk23 is not a valid target for backports.
List of valid target repositories: openjdk/jdk, openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk17u, openjdk/jdk17u-dev, openjdk/jdk21u, openjdk/jdk21u-dev, openjdk/jdk22u, openjdk/jdk23u, openjdk/jdk7u, openjdk/jdk8u, openjdk/jdk8u-dev, openjdk/jfx, openjdk/jfx17u, openjdk/jfx21u, openjdk/jfx22u, openjdk/lilliput-jdk17u, openjdk/lilliput-jdk21u, openjdk/shenandoah-jdk21u, openjdk/shenandoah-jdk8u.
Supplying the organization/group prefix is optional.

@mgronlun
Copy link
Author

/backport openjdk:jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun The target repository openjdk is not a valid target for backports.
List of valid target repositories: openjdk/jdk, openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk17u, openjdk/jdk17u-dev, openjdk/jdk21u, openjdk/jdk21u-dev, openjdk/jdk22u, openjdk/jdk23u, openjdk/jdk7u, openjdk/jdk8u, openjdk/jdk8u-dev, openjdk/jfx, openjdk/jfx17u, openjdk/jfx21u, openjdk/jfx22u, openjdk/lilliput-jdk17u, openjdk/lilliput-jdk21u, openjdk/shenandoah-jdk21u, openjdk/shenandoah-jdk8u.
Supplying the organization/group prefix is optional.

@mgronlun
Copy link
Author

/backport openjdk/jdk;jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun The target repository openjdk/jdk;jdk23 is not a valid target for backports.
List of valid target repositories: openjdk/jdk, openjdk/jdk11u, openjdk/jdk11u-dev, openjdk/jdk17u, openjdk/jdk17u-dev, openjdk/jdk21u, openjdk/jdk21u-dev, openjdk/jdk22u, openjdk/jdk23u, openjdk/jdk7u, openjdk/jdk8u, openjdk/jdk8u-dev, openjdk/jfx, openjdk/jfx17u, openjdk/jfx21u, openjdk/jfx22u, openjdk/lilliput-jdk17u, openjdk/lilliput-jdk21u, openjdk/shenandoah-jdk21u, openjdk/shenandoah-jdk8u.
Supplying the organization/group prefix is optional.

@mgronlun
Copy link
Author

/backport openjdk/jdk:jdk23

@openjdk
Copy link

openjdk bot commented Jun 17, 2024

@mgronlun the backport was successfully created on the branch backport-mgronlun-cdf22b13-jdk23 in my personal fork of openjdk/jdk. To create a pull request with this backport targeting openjdk/jdk:jdk23, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit cdf22b13 from the openjdk/jdk repository.

The commit being backported was authored by Markus Grönlund on 17 Jun 2024 and was reviewed by Erik Gahlin.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk:

$ git fetch https://github.com/openjdk-bots/jdk.git backport-mgronlun-cdf22b13-jdk23:backport-mgronlun-cdf22b13-jdk23
$ git checkout backport-mgronlun-cdf22b13-jdk23
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk.git backport-mgronlun-cdf22b13-jdk23

⚠️ @mgronlun You are not yet a collaborator in my fork openjdk-bots/jdk. An invite will be sent out and you need to accept it before you can proceed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants