JDK-8283022 : com/sun/crypto/provider/Cipher/AEAD/GCMBufferTest.java failing with -Xcomp after 8273297
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Affected Version: 18,19,repo-loom
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2022-03-11
  • Updated: 2022-08-04
  • Resolved: 2022-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18 JDK 19
18.0.2Fixed 19 b20Fixed
Related Reports
Relates :  
Description
This test fails intermittently in the loom repo when running with the wrapper on debug builds with -Xcomp.  Maybe x64 only.

result: Failed. Execution failed: `main' threw exception: java.lang.Exception: Ciphertext mismatch (DIRECT): result (len=12357): 

	at GCMBufferTest.crypto(GCMBufferTest.java:500)
	at GCMBufferTest.encrypt(GCMBufferTest.java:311)
	at GCMBufferTest.test(GCMBufferTest.java:289)
	at GCMBufferTest.main(GCMBufferTest.java:659)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:577)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:327)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:271)
	at java.base/java.lang.VirtualThread$VThreadContinuation.lambda$new$0(VirtualThread.java:156)
	at java.base/jdk.internal.vm.Continuation.enter0(Continuation.java:358)
	at java.base/jdk.internal.vm.Continuation.enter(Continuation.java:351)

Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/120 Date: 2022-05-03 22:42:34 +0000
03-05-2022

Fix Request 18u Backporting this patch fixes the Ciphertext mismatch issue in 18u. The patch applies cleanly to 18u. Link to PR: https://github.com/openjdk/jdk18u/pull/120 Please approve. Thank you.
03-05-2022

Changeset: 3416bfa2 Author: Smita Kamath <svkamath@openjdk.org> Committer: Anthony Scarpino <ascarpino@openjdk.org> Date: 2022-04-25 22:45:00 +0000 URL: https://git.openjdk.java.net/jdk/commit/3416bfa2560e240b5e602f10e98e8a06c96852df
25-04-2022

Moved to security-libs because the fix is in that area.
21-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8280 Date: 2022-04-18 05:06:26 +0000
18-04-2022

I will investigate this. Thank you.
17-03-2022

[~svkamath], please take a look at this.
17-03-2022

Workarounds: -XX:DisableIntrinsic=_galoisCounterMode_AESCrypt, or -XX:UseAVX=2
17-03-2022

ILW = incorrect crypto result; AVX512 only; disable intrinsic or AVX512 = HMM = P2
17-03-2022

This also fails in jdk-18+37 with -Xcomp.
17-03-2022

All of the failures seem to be with -Xcomp. I can't find any results for this test from jdk19 running with -Xcomp.
14-03-2022