Skip to content

8373944: ObjectMonitor::ExitOnSuspend can call java_lang_VirtualThread::set_onWaitingList() while in safepoint#91

Draft
pchilano wants to merge 1 commit intoopenjdk:masterfrom
openjdk-bots:backport-pchilano-4b99aef1-master
Draft

8373944: ObjectMonitor::ExitOnSuspend can call java_lang_VirtualThread::set_onWaitingList() while in safepoint#91
pchilano wants to merge 1 commit intoopenjdk:masterfrom
openjdk-bots:backport-pchilano-4b99aef1-master

Conversation

@pchilano
Copy link
Contributor

@pchilano pchilano commented Mar 4, 2026

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

Thanks,
Patricio


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • JDK-8373944 needs maintainer approval

Issue

  • JDK-8373944: ObjectMonitor::ExitOnSuspend can call java_lang_VirtualThread::set_onWaitingList() while in safepoint (Bug - P2 - Approved)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 91

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk26u/pull/91.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 4, 2026

👋 Welcome back pchilanomate! 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 Mar 4, 2026

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

@openjdk openjdk bot changed the title Backport 4b99aef1cad05057463edbb248a3adc9b45d9a87 8373944: ObjectMonitor::ExitOnSuspend can call java_lang_VirtualThread::set_onWaitingList() while in safepoint Mar 4, 2026
@openjdk
Copy link

openjdk bot commented Mar 4, 2026

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required approval Requires approval; will be removed when approval is received labels Mar 4, 2026
@pchilano
Copy link
Contributor Author

pchilano commented Mar 4, 2026

/approval request This fixes a bug where oops might be touched by a JavaThread while a safepoint is in progress. The fix is simple and only touches method ObjectMonitor::ExitOnSuspend::operator(), where a safepoint poll is added, plus an extra assert in ObjectMonitor::exit_epilog. The fix applies cleanly. It includes a new test which reliably reproduces the issue.

@openjdk
Copy link

openjdk bot commented Mar 4, 2026

@pchilano
8373944: The approval request has been created successfully.

@openjdk openjdk bot removed the approval Requires approval; will be removed when approval is received label Mar 6, 2026
@pchilano pchilano marked this pull request as ready for review March 9, 2026 16:24
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 9, 2026
@mlbridge
Copy link

mlbridge bot commented Mar 9, 2026

Webrevs

@pchilano pchilano marked this pull request as draft March 11, 2026 14:22
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Port of a pull request already in a different code base clean Identical backport; no merge resolution required

Development

Successfully merging this pull request may close these issues.

1 participant