JDK-8274323 : compiler/codegen/aes/TestAESMain.java failed with "Error: invalid offset: -1434443640" after 8273297
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 18
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux,windows
  • CPU: x86_64
  • Submitted: 2021-09-26
  • Updated: 2024-08-21
  • Resolved: 2021-12-20
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 b29Fixed 19Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8275171 :  
Description
The following test failed in the JDK18 CI:

compiler/codegen/aes/TestAESMain.java

Here's a snippet from the log file:

----------System.err:(24/1636)----------
java.lang.Error: invalid offset: -1434443640
	at compiler.codegen.aes.TestAESDecode.run(TestAESDecode.java:51)
	at compiler.codegen.aes.TestAESMain.main(TestAESMain.java:192)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.RuntimeException: invalid offset: -1434443640
	at java.base/com.sun.crypto.provider.GHASH.ghashRangeCheck(GHASH.java:252)
	at java.base/com.sun.crypto.provider.GHASH.update(GHASH.java:179)
	at java.base/com.sun.crypto.provider.GaloisCounterMode$DecryptOp.update(GaloisCounterMode.java:1777)
	at java.base/com.sun.crypto.provider.GaloisCounterMode$GCMDecrypt.decryptBlocks(GaloisCounterMode.java:1638)
	at java.base/com.sun.crypto.provider.GaloisCounterMode$GCMDecrypt.doFinal(GaloisCounterMode.java:1484)
	at java.base/com.sun.crypto.provider.GaloisCounterMode.engineDoFinal(GaloisCounterMode.java:439)
	at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2418)
	at compiler.codegen.aes.TestAESDecode.run(TestAESDecode.java:43)
	... 7 more

JavaTest Message: Test threw exception: java.lang.Error: invalid offset: -1434443640
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Error: invalid offset: -1434443640
----------rerun:(54/8744)*----------
Comments
Changeset: 819f9bd0 Author: Smita Kamath <svkamath@openjdk.org> Committer: Sandhya Viswanathan <sviswanathan@openjdk.org> Date: 2021-12-20 20:09:42 +0000 URL: https://git.openjdk.java.net/jdk18/commit/819f9bd084fa49222a4310fbcf4933005e9f0ca4
20-12-2021

testing V02: t1: https://mach5.us.oracle.com/mdash/jobs/vkozlov-8274323_v02_t1-20211220-0637-27463586 t2: https://mach5.us.oracle.com/mdash/jobs/vkozlov-8274323_v02_t2-20211220-0718-27463856 t3: https://mach5.us.oracle.com/mdash/jobs/vkozlov-8274323_v02_t3-20211220-0718-27463858
20-12-2021

@Vladmir Kozlov Thank you for providing the details. Yes, I was able to reproduce it with the flags. I'm in the process of debugging the issue.
06-10-2021

[~svkamath] Was you able to reproduce the issue with these flags?
06-10-2021

There is no hs_err file because test failed with Java error.
04-10-2021

Flags (with run command from test): -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -XX:-TieredCompilation -XX:+DeoptimizeALot -Xbatch -DcheckOutput=true -Dmode=GCM -DencInputOffset=1 -DmsgSize=8326 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:. compiler.codegen.aes.TestAESMain It also failed with -XX:+TieredCompilation
04-10-2021

I'm not able to reproduce the error. Could you please upload the hs_err file?
04-10-2021

Failures seem to have started right after 8273297 got pushed.
02-10-2021

Initial ILW = Runtime exception in test, single test but reliably triggered, no workaround = MMH = P3
27-09-2021