Skip to content

8386287: GenShen: assert(starts_object(card_index)) failed: Can't get last start because no object starts here#31508

Closed
earthling-amzn wants to merge 3 commits into
openjdk:masterfrom
earthling-amzn:fix-full-gc-old-pinned
Closed

8386287: GenShen: assert(starts_object(card_index)) failed: Can't get last start because no object starts here#31508
earthling-amzn wants to merge 3 commits into
openjdk:masterfrom
earthling-amzn:fix-full-gc-old-pinned

Conversation

@earthling-amzn

@earthling-amzn earthling-amzn commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

This was a somewhat exotic bug. After JDK-8376839, Shenandoah registers the starts for all promoted objects in a separate phase after evacuation completes and all PLABs are retired. The sequence of events in this assertion failure were as follows:

  1. evacuation is running
  2. a mutator fails to allocate a humongous object
  3. evacuation is cancelled
  4. because it was a humongous allocation failure, Shenandoah runs a full gc instead of a degenerated cycle
  5. an old region holding recently evacuated objects is pinned when the full gc starts
  6. the pinned region will not be compacted and will contain unmarked (dead) objects
  7. during update refs, the full gc tries to coalesce and fill these dead objects
  8. the coalesce and fill for the region also tries to update the card table object registrations
  9. this assertion fails because none of the promoted objects have been registered yet

At the end of a full GC, all of the regions are scanned and the remembered set is completely rebuilt, so step 7 above was unnecessary. In this PR, we simply skip it.



Progress

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

Issue

  • JDK-8386287: GenShen: assert(starts_object(card_index)) failed: Can't get last start because no object starts here (Bug - P4)(⚠️ The fixVersion in this issue is [27-pool, 28] but the fixVersion in .jcheck/conf is 28, 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/31508/head:pull/31508
$ git checkout pull/31508

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31508

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper

bridgekeeper Bot commented Jun 12, 2026

Copy link
Copy Markdown

👋 Welcome back wkemper! 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

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@earthling-amzn 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:

8386287: GenShen: assert(starts_object(card_index)) failed: Can't get last start because no object starts here

Reviewed-by: kdnilsen, xpeng, ruili

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 25 new commits pushed to the master branch:

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

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@earthling-amzn The following labels will be automatically applied to this pull request:

  • hotspot-gc
  • shenandoah

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

@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

The total number of required reviews for this PR has been set to 2 based on the presence of this label: hotspot-gc. This can be overridden with the /reviewers command.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 12, 2026
@mlbridge

mlbridge Bot commented Jun 12, 2026

Copy link
Copy Markdown

Webrevs

@kdnilsen kdnilsen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this fix. Good analysis.

Comment thread src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.cpp Outdated

@pengxiaolong pengxiaolong left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jun 15, 2026
@openjdk openjdk Bot removed the ready Pull request is ready to be integrated label Jun 15, 2026
@openjdk openjdk Bot added the ready Pull request is ready to be integrated label Jun 15, 2026
@earthling-amzn

Copy link
Copy Markdown
Contributor Author

/integrate

@openjdk

openjdk Bot commented Jun 15, 2026

Copy link
Copy Markdown

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

Your commit was automatically rebased without conflicts.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jun 15, 2026
@openjdk openjdk Bot closed this Jun 15, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 15, 2026
@openjdk

openjdk Bot commented Jun 15, 2026

Copy link
Copy Markdown

@earthling-amzn Pushed as commit 1251526.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants