Skip to content

Conversation

@xmas92
Copy link
Member

@xmas92 xmas92 commented Dec 3, 2025

The main threads call to csLocker.unlock(); may cause an allocation which may trigger a GC. This can lead to a deadlock because we have a native thread which is waiting on a signal from the main thread (which is sent in csLocker.unlock()) to ReleasePrimitiveArrayCritical. Without the call to ReleasePrimitiveArrayCritical the some GCs may be blocked.

I suggest we remove the dependency on a java thread for the GetPrimitiveArrayCritical / ReleasePrimitiveArrayCritical pair. And simply do the lock and the sleep inside native.

  • Testing
    • Stress testing test/hotspot/jtreg/gc/cslocker/TestCSLocker.java with both SerialGC and ZGC and small heap sizes
    • GHA

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

Integration blocker

 ⚠️ Title mismatch between PR and JBS for issue JDK-8373025

Issue

  • JDK-8373025: test/hotspot/jtreg/gc/cslocker/TestCSLocker.java may deadlock (Bug - P4) ⚠️ Title mismatch between PR and JBS.

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28638

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 3, 2025

👋 Welcome back aboldtch! 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 Dec 3, 2025

@xmas92 This change is no longer ready for integration - check the PR body for details.

@openjdk openjdk bot added the hotspot-gc hotspot-gc-dev@openjdk.org label Dec 3, 2025
@openjdk
Copy link

openjdk bot commented Dec 3, 2025

@xmas92 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 openjdk bot added the rfr Pull request is ready for review label Dec 3, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 3, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 3, 2025

Webrevs

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 3, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 3, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 3, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 3, 2025
@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 5, 2025
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.

4 participants