Skip to content

8385369: G1: Concurrent Cleanup For Next Mark accesses uncommitted bitmaps after region uncommit#31308

Open
tschatzl wants to merge 1 commit into
openjdk:masterfrom
tschatzl:submit/8385369-crash-in-clear-bitmap
Open

8385369: G1: Concurrent Cleanup For Next Mark accesses uncommitted bitmaps after region uncommit#31308
tschatzl wants to merge 1 commit into
openjdk:masterfrom
tschatzl:submit/8385369-crash-in-clear-bitmap

Conversation

@tschatzl
Copy link
Copy Markdown
Contributor

@tschatzl tschatzl commented May 28, 2026

Hi all,

please review this change that fixes a crash during concurrent bitmap clearing: regions and their associated bitmaps may be uncommitted after freeing them in a gc that runs during that time, while they are being cleared.

This obviously crashes the VM.

There is a test, but it is not very reliable (does not fail often without the patch) and I did not manage to further improve it - in one run it crashes in <1% of cases, in another in almost 10% of cases. Feel free to suggest to remove it.

Testing: new test, gha

Thanks,
Thomas



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-8385369: G1: Concurrent Cleanup For Next Mark accesses uncommitted bitmaps after region uncommit (Bug - P3)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31308

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

Using diff file

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

Using Webrev

Link to Webrev Comment

Hi all,

  please review this change that fixes a crash during concurrent bitmap clearing: regions and their associated bitmaps may be uncommitted after freeing them in a gc that runs during that time, while they are being cleared.

This obviously crashes the VM.

There is a test, but it is not very reliable and I did not manage to further improve it - in one run it crashes in <1% of cases, in another in almost 10% of cases. Feel free to ask me to remove it.

Testing: new test, gha

Thanks,
  Thomas
@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented May 28, 2026

👋 Welcome back tschatzl! 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
Copy Markdown

openjdk Bot commented May 28, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk Bot changed the title 8385369 8385369: G1: Concurrent Cleanup For Next Mark accesses uncommitted bitmaps after region uncommit May 28, 2026
@openjdk openjdk Bot added the hotspot-gc hotspot-gc-dev@openjdk.org label May 28, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented May 28, 2026

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

  • hotspot-gc

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
Copy link
Copy Markdown

openjdk Bot commented May 28, 2026

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 May 28, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented May 28, 2026

Webrevs

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

Labels

hotspot-gc hotspot-gc-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant