-
Notifications
You must be signed in to change notification settings - Fork 97
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
8315373: Change VirtualThread to unmount after freezing, re-mount before thawing #245
Conversation
… TIMED_WAITING virtual thread is timed parked
…tual thread is timed-parked when pinned
…otWhenPinned.java times out on macosx-x64
…ned.java#id1 timed out
👋 Welcome back shade! A progress list of the required criteria for merging this PR into |
This backport pull request has now been updated with issue from the original commit. |
/issue add JDK-8312498 |
@shipilev |
/issue add JDK-8312777 |
@shipilev |
@shipilev |
@shipilev |
@shipilev |
@shipilev |
All these backports are clean. /clean |
@shipilev This backport pull request is now marked as clean |
This is porting work, so it would be advisable to get reviews from loom devs on this before considering for approval (even if it's clean). |
Yes, @AlanBateman and me talked briefly about this during FOSDEM. Assuming Alan is fine with it, do you see other problems with the PR like this? |
Normally I think some of these changes would only be backport if really needed but given the churn in this newish code then it is safer to backport these as a group rather than cherry pick. I looked through the diffs and everything looks okay. You may have to add JDK-8316924 to the list as the test ParkALot had to be dialed down for larger test systems. |
Thank you! @jerboaa, anything else you want to be covered before I start doing the formal fix-requests for 21u-dev?
Right. Added. |
/issue add JDK-8316924 |
@shipilev |
I'll probably reach out to fellow maintainers and gather their opinion. Lets wait on that before the formal approval. From what I've seen so far it should be OK in principle as it's fairly contained code to the loom area. |
@shipilev |
OK, I think I misread how approval command works. Let me try again. /approval JDK-8315373 request Changes how VTs interact with JVMTI. In mainline since Sep 2023, there is no bug tail. We want this fix to provide the ground for the rest of backports. Notably, it makes JDK-8312777 backport clean. The fix is part of large atomic change, see 21u PR. /approval JDK-8312498 request Fixes what thread state VT reports when timed-parked. This fixes the actual Loom bug. /approval JDK-8312777 request Fixes the JVMTI race with mount/unmount events. This fixes the actual Loom bug. In mainline since Oct 2023, there is no bug tail. Makes JDK-8322818 backport clean. The fix is part of large atomic change, see 21u PR. /approval JDK-8321270 request This fixes the actual Loom performance problem. In mainline since Dec 2023, there is no bug tail. Makes JDK-8322818 a clean backport. The fix is part of large atomic change, see 21u PR. /approval JDK-8322818 request Fixes the bug introduced by JDK-8312498. In mainline since Jan 2023. Has two additional follow-ups: JDK-8323002 and JDK-8323296. The fix is part of large atomic change, see 21u PR. /approval JDK-8323002 request Follow-up test fix for JDK-8322818. In mainline since Jan 2023. Test-only change. The fix is part of large atomic change, see 21u PR. /approval JDK-8323296 request Follow-up test fix for JDK-8322818. In mainline since Jan 2023. Test-only change. The fix is part of large atomic change, see 21u PR. /approval JDK-8316924 request Follow-up test fix for JDK-8322818. In mainline since Sep 2023. Test-only change. The fix is part of large atomic change, see 21u PR. |
/approve yes |
@jerboaa |
@shipilev 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 no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
I see the approval is granted. Unless there are other comments, I would integrate this PR soon, and it would then land in 21.0.3. |
Yes, integrating it sooner rather than later would be preferred. Ramp down starts next week for JDK 21.0.3. It's not a low risk change. Having said that, I concur it's fairly well isolated to loom code and there were no objections in principle from other maintainers. We'll have to see and if worse comes to worst we'll back it out before April. So in a nutshell, the question was whether to allow for 21.0.3 or push to 21.0.4. It'll have about 2 months before the release in April (21.0.3). If it was pushed to 21.0.4 we'd have some more testing in the |
It's five weeks until code freeze for 21.0.3 and so five weeks to both find any issues and get any follow-on fixes in. The release happens on 2024-04-16 so in two months time it will be out.
That would be a full two months. Even going from the initial build promotion, you've lost three weeks of development with 21.0.3 compared with 21.0.4 (the fourth build promotion is due to happen tomorrow). If you want this in 21.0.3, I think it's imperative it gets merged as soon as possible to maximise the time available, ideally today. Personally, I would still prefer 21.0.4. |
After discussing this with other engineers, and seeing more of the soft push back here, I am now leaning to keep this PR out of 21.0.3 and push it early into 21.0.4, some time next week. This would be less stressful for everyone involved. The reason to have these patches is to make 21u conveniently usable for Loom adopters. However, there are other fixes (e.g. JDK-8320275) that would not make it to 21.0.3. Plus, there are dependent fixes (e.g. JDK-8322846) that we also want to get in after this lands. So backporting the performance fixes when there are not yet backported functional fixes does not gain us much ground for Loom stabilization for 21.0.3. |
Heads-up: I remerged from 21.0.4 master, re-testing with |
/integrate |
This is a series of Loom backports that brings in the fixes from JDK 22 and mainline into JDK 21, where Loom is production-ready. This batch fixes a few thread state and JVMTI problems.
Unfortunately, these backports are tied together, as they change the same code a few times. It is very hard to make them into separate backports without breaking stuff along the way, so instead I clobbered them together in this PR. They follow the application order from mainline. All patches together touch only the Virtual Thread parts, so the risk for the rest of the code should be minimal.
Brief explanation of fixes:
Before I undraft this, which would trigger JBS updates:
@AlanBateman, does this make sense to you?
@jerboaa, how do you feel about this?
Additional testing:
jdk_loom hotspot_loom
jdk_loom hotspot_loom
jdk_loom hotspot_loom
tier{1,2,3}
Progress
Issues
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/245/head:pull/245
$ git checkout pull/245
Update a local copy of the PR:
$ git checkout pull/245
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/245/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 245
View PR using the GUI difftool:
$ git pr show -t 245
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/245.diff
Webrev
Link to Webrev Comment