Skip to content

Merge jdk:jdk-28+0#324

Closed
TimPushkin wants to merge 375 commits into
openjdk:cracfrom
TimPushkin:merge-jdk-28+0
Closed

Merge jdk:jdk-28+0#324
TimPushkin wants to merge 375 commits into
openjdk:cracfrom
TimPushkin:merge-jdk-28+0

Conversation

@TimPushkin

@TimPushkin TimPushkin commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Merges jdk-28+0.

Notable parts:

  • JDK-8383881 and JDK-8384869 removed CPU_FLUSH, CPU_MMX, made CPU_SSE, CPU_SSE2 mandatory (FLUSH is also now mandatory but without an enum) — I dropped CRaC code that used CPU_FLUSH, inlined the only CPU_MMX check we had, made CPU_SSE, CPU_SSE2 mandatory in -XX:CPUFeatures, updated hardcoded CPU features values in tests
  • JDK-8382030 and JDK-8385011 enabled ARM64 testing on Windows and Linux which uncovered pre-existing bugs with our CPU features code for ARM64 — this is to be fixed separately, probably by 8385815: [CRaC] Fix aarch64 failing testcases #321
  • JDK-8382582 removed JVMCI (the whole feature, I was surprised), so many small conflicts with CPU features and recompilations
  • Removed IgnoreCPUFeatures that expires in this release

Output of git show --remerge-diff: https://gist.github.com/TimPushkin/1af925f55f841431c87aa31099925b43 — I dropped contents of JVMCI files that were fully removed because they are huge and of no interest.



Progress

  • Change must not contain extraneous whitespace

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 324

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/crac/pull/324.diff

Using Webrev

Link to Webrev Comment

David Holmes and others added 30 commits May 11, 2026 20:46
Reviewed-by: jsjolen, shade, pchilanomate
Reviewed-by: jlu, naoto
…w feature enabled

Co-authored-by: David Beaumont <dbeaumont@openjdk.org>
Reviewed-by: jpai, coleenp, sgehwolf
Reviewed-by: kdnilsen, rkennke
…void type when annotating void as a generic bound

Reviewed-by: jlahoda
…ization.java

Reviewed-by: mchevalier, epeter
…CardBarrier.java fails with -Xcomp after JDK-8369013

Reviewed-by: cslucas, wkemper
Reviewed-by: mullan
…at is returned when socket is closed

Reviewed-by: dfuchs, michaelm
…sages could be improved

Reviewed-by: clanger, alanb
…med out

Reviewed-by: cjplummer, lmesnik, kevinw
Reviewed-by: dholmes, sspitsyn
Added tag jdk-28+0 for changeset f8f7ad2
@bridgekeeper

bridgekeeper Bot commented Jun 12, 2026

Copy link
Copy Markdown

👋 Welcome back tpushkin! A progress list of the required criteria for merging this PR into crac will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

The CI failures are unrelated:

  • Build failures on windows-x64 — known issue JDK-8386551, fixed in the mainline just today, didn't make it into the tag being merged
  • CPU features tests on ARM64 platforms — as described above, to be fixed separately
  • jdk/crac/SecureRandom/InterlockTest — known issue

@openjdk

openjdk Bot commented Jun 12, 2026

Copy link
Copy Markdown

@TimPushkin 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:

Merge jdk:jdk-28+0

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 crac branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the crac branch, type /integrate in a new comment.

@TimPushkin

TimPushkin commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator Author

@jankratochvil, almost all conflicts are CPU-features-related, please review.

Also I didn't run the manual CPUFeaturesAWS test. The hardcoded values I changed there were calculated manually, same way as for the other tests.

@TimPushkin
TimPushkin requested a review from rvansa June 12, 2026 16:24
@openjdk openjdk Bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 12, 2026
@mlbridge

mlbridge Bot commented Jun 12, 2026

Copy link
Copy Markdown

@jankratochvil

Copy link
Copy Markdown
Collaborator

@jankratochvil, almost all conflicts are CPU-features-related, please review.

Why have you introduced VM_Version::CPUFeatures_mandatory()? A minimal valid CPUFeatures set for x86_64 was already VM_Version::CPUFeatures_generic(). For aarch64 there exists no minimal set which would work for all aarch64 CPUs - see https://github.com/openjdk/crac/pull/321/changes#diff-a87e260510f34ca7d9b0feb089ad982be8268c5c8aa5a71221f6738b051ea488R890 .

Also I didn't run the manual CPUFeaturesAWS test. The hardcoded values I changed there were calculated manually, same way as for the other tests.

It does not matter much, it is being updated by #321 .

@TimPushkin

TimPushkin commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator Author

@jankratochvil, VM_Version::CPUFeatures_mandatory() is for this new check of parsed -XX:CPUFeatures: https://github.com/TimPushkin/crac/blob/44b08c197b31d231747bf8fe834cdac706432291/src/hotspot/share/runtime/abstract_vm_version.inline.hpp#L302-L314

Correct me if I'm wrong, without the check if the user passed a CPUFeatures string that does not include SSE and SSE2, which are now mandatory in OpenJDK, SSE and SSE2 will be disabled in glibc. But in OpenJDK they cannot be disabled, so they will continue to be used, even though they will not be present in VM_Version, which is incorrect.

@jankratochvil

Copy link
Copy Markdown
Collaborator

OK, so the new OpenJDK version makes SSE and SSE2 mandatory even on x86 (previously, this was only the case on x86_64). I would rather make Extended -XX:CPUFeatures with missing mandatory features an error than an extension (the user explicitly requested this feature mask), but that is just my opinion; your solution is also valid.

And I see now that you have removed CPU_MMX and CPU_FLUSH from x86_64 CPUFeatures_generic() because upstream removed them from the enum definition. So that is OK; I had concerns about that before.

So yes, I am fine with it, thanks.

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

Agree, I should make this an error instead. I made it the way it is because it's now just impossible to launch a JVM on a machine that does not support these two features. But the user may try do disable them for a machine that does support them for some reason, and that should be an error.

@openjdk openjdk Bot added the clean Identical backport; no merge resolution required label Jun 18, 2026
@TimPushkin

TimPushkin commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

Made missing mandatory features a error. The error messages now look like this:

$ java -XX:CPUFeatures=0xffff00,0x0 -version
[0.002s][error][os,cpu] This machine's CPU features are 0x8d30e02ee7ff7,0x6e6, they are missing the following features required by -XX:CPUFeatures: 0x118000,0x0 = tscinvbit, tscinv, erms
[0.002s][error][os,cpu] If you are sure it will not crash you can override this check by -XX:+UnlockExperimentalVMOptions -XX:CheckCPUFeatures=skip .
[0.002s][error][os,cpu] -XX:CPUFeatures is missing mandatory features sse, sse2, you can fix this by using -XX:CPUFeatures=0xffff60,0x0
Error occurred during initialization of VM
Invalid -XX:CPUFeatures=0xffff00,0x0, see error log for details

BTW, the "If you are sure it will not crash you can override this check by -XX:+UnlockExperimentalVMOptions -XX:CheckCPUFeatures=skip ." suggestion seems misleading, it does not override the CPUFeatures check that prints it. Since this is pre-existing I reported it as ZULU-92005.

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

Noticed -XX:CRaCEngine=pause/pauseengine should also be removed in JDK 28 — will do in a separate followup since it does not break anything and this PR is already big enough

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

@jankratochvil, please re-review.

The CI failures are the same as before.

@jankratochvil

Copy link
Copy Markdown
Collaborator

@jankratochvil, please re-review.

Fine with me, thanks.

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

Thanks. I pushed a micro-optimization, it's small so I won't ask for another review. Will integrate once CI passes.

@TimPushkin

Copy link
Copy Markdown
Collaborator Author

/integrate

@openjdk

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

Going to push as commit 97b5a70.

@openjdk openjdk Bot added the integrated Pull request has been integrated label Jun 19, 2026
@openjdk openjdk Bot closed this Jun 19, 2026
@openjdk openjdk Bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 19, 2026
@openjdk

openjdk Bot commented Jun 19, 2026

Copy link
Copy Markdown

@TimPushkin Pushed as commit 97b5a70.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@TimPushkin
TimPushkin deleted the merge-jdk-28+0 branch July 6, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean Identical backport; no merge resolution required integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.