-
Notifications
You must be signed in to change notification settings - Fork 30
8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed #144
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Welcome back rm-gh-8! A progress list of the required criteria for merging this PR into |
|
@rm-gh-8 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: 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 9 new commits pushed to the
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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
This backport pull request has now been updated with issue from the original commit. |
|
|
|
/approval request for backport of JDK-8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed. This PR changes OSR_migration_begin to use the sender's unextended_sp for _cont_fastpath, ensuring proper stack boundary tracking. This backport has internal demand. High-medium risk - Incorrect stack pointer management could lead to memory corruption or crashes and changes to OSR handling might affect compilation performance or stack management overhead. |
|
Hi Roland, if the backport only has internal demand, just bring it to your internal VM. |
|
Hi Goetz, Our customers utilize the JDK in a highly varied amount of use cases and issues that occur indicate that it may likely manifest for OpenJDK users, and would be a worthwhile consideration. |
Backporting JDK-8372591: assert(!current->cont_fastpath() || freeze.check_valid_fast_path()) failed.
This PR fixes a critical bug in OSR (On-Stack Replacement) handling with continuations where _cont_fastpath is incorrectly set when an OSR frame has an interpreted caller. The issue occurs because OSR frames are created from the sender's unextended_sp (not sp), but _cont_fastpath was being set to the sender's sp, potentially pointing outside valid stack space.
This mismatch can cause _cont_fastpath to be prematurely cleared while interpreted frames remain on the stack, leading to incorrect execution of the freeze fast path (which should only run when all frames are compiled) and resulting in crashes.
The fix changes OSR_migration_begin to use the sender's unextended_sp for _cont_fastpath, ensuring proper stack boundary tracking.
This backport has internal demand.
Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:
make test TEST=test/jdk/jdk/internal/vm
Results attached:
linux-aarch64-specific-test.log
linux-x64-specific-test.log
macos-aarch64-specific-test.log
windows-x64-specific-test.log
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk25u-dev.git pull/144/head:pull/144$ git checkout pull/144Update a local copy of the PR:
$ git checkout pull/144$ git pull https://git.openjdk.org/jdk25u-dev.git pull/144/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 144View PR using the GUI difftool:
$ git pr show -t 144Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk25u-dev/pull/144.diff
Using Webrev
Link to Webrev Comment