JDK-8271078 : jdk/incubator/vector/Float128VectorTests.java failed a subtest
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,17,18,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: x86_64
  • Submitted: 2021-07-21
  • Updated: 2022-07-18
  • Resolved: 2022-05-19
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 11 JDK 17 JDK 19
11.0.17-oracleFixed 17.0.5-oracleFixed 19 b24Fixed
Related Reports
Relates :  
Description
The following test failed in the JDK18 CI:

jdk/incubator/vector/Float128VectorTests.java

Here's a snippet from the log file:

===============================================
jdk/incubator/vector/Float128VectorTests.java
Total tests run: 2501, Passes: 2500, Failures: 1, Skips: 0
===============================================

----------System.err:(15/928)----------
WARNING: Using incubator modules: jdk.incubator.vector
java.lang.Exception: failures: 1
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54)
	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)

JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1
----------rerun:(47/5389)*----------

Unfortunately the failure occurred in the elided portion of the log file:

test Float128VectorTests.EQFloat128VectorTestsBroadcastLongSmokeTest(float[cornerCaseValue(i)], float[i - 2]): success
test Float128VectorTests.EQFloat128VectorTestsBroadcastLongSmokeTest(float[cornerCaseValue(i)], float[zigZag(i)]): success
test Float128VectorTests.EQFloat128VectorTestsBroadcastLongSmokeTest(float[cornerCaseValue(i)], float[cornerCaseValue(i)]): success
test Float128VectorTests.EQFloat128VectorTestsBroadcastMaskedSmokeTest(float[i], float[i], mask[i % 2]): 

...
Output overflow:
JT Harness has limited the test output to the text
at the beginning and the end, so that you can see how the
test began, and how it completed.

If you need to see more of the output from the test,
set the system property javatest.maxOutputSize to a higher
value. The current value is 100000
...
Comments
Fix request [11u] I backport this for parity with 11.0.17-oracle. A C2 fix we should take, risk limited to x86_64. Clean backport from 17. SAP nightly testing passed.
16-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/1231 Date: 2022-07-15 13:46:58 +0000
15-07-2022

Fix request [17u] I backport this for parity with 17.0.5-oracle. A C2 fix we should take, risk limited to x86_64. Some simple resolves due to context. SAP nightly testing passed.
23-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/490 Date: 2022-06-21 18:18:21 +0000
21-06-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk18u/pull/162 Date: 2022-06-21 07:44:30 +0000
21-06-2022

Changeset: b0892295 Author: Dean Long <dlong@openjdk.org> Date: 2022-05-19 19:59:39 +0000 URL: https://git.openjdk.java.net/jdk/commit/b0892295ee12c0c58c0121ff7f5f585b32d60eeb
19-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8690 Date: 2022-05-13 02:21:06 +0000
13-05-2022

The test is only using 128-bit XMM registers, so the has_wide_vectors() returns false for the nmethods. This means we use the save_live_vectors() with save_vectors set to false. When it saves XMM16-XMM31, it only saves the low 64 bits.
12-05-2022

If I disable C2 from using XMM16-XMM31, the problem goes away, so there seems to be something going wrong with those AVX512 registers.
12-05-2022

I reproduced this with rr chaos mode, and the place where things go wrong seems to be an instruction like this: 153d vector_blend XMM2,XMM21,XMM2,K7 ! using R10 and k2 as TEMP The value of XMM2 is {-inf, -inf, 0, 0} instead of {-inf, -inf, -inf, -inf}, so I suspect that either XMM21 or K7 got partially corrupted, but "rr" isn't letting me print the values of avx512 registers.
11-05-2022

It seems to be only the mask[false] tests that are failing.
10-05-2022

I'm running out of ideas on this one. I thought it could be a problem similar to JDK-8256054, but I can't find any place where destination register might be reusing one of the source registers. [~vlivanov] or [~jbhateja], do you have any ideas?
09-05-2022

I guess reproducing in 3 runs was a fluke. Sometimes it runs 10000 times with no failure.
09-05-2022

Reproduced on 3rd attempt with the following flags: -XX:UseAVX=3 -XX:+DeoptimizeALot -XX:DeoptimizeALotInterval=100 -XX:CompileThresholdScaling=0.1 -XX:+TraceDeoptimization -XX:+PrintDeoptimizationDetails -XX:+PrintCompilation -XX:CompileCommand=print,*::MINReduceFloat128VectorTestsMasked -XX:CompileCommand=print,*::MAXReduceFloat128VectorTestsMasked -XX:CompileCommand=PrintOptoAssembly,*::MINReduceFloat128VectorTestsMasked -XX:CompileCommand=PrintOptoAssembly,*::MAXReduceFloat128VectorTestsMasked
05-05-2022

I was able to reproduce this on linux with -XX:UseAVX=3: test Float128VectorTests.MAXReduceFloat128VectorTestsMasked(float[i * 5], mask[false]): failure java.lang.AssertionError: Final result is incorrect! expected [-Infinity] but found [0.0] at org.testng.Assert.fail(Assert.java:99) at org.testng.Assert.failNotEquals(Assert.java:1037) at org.testng.Assert.assertEquals(Assert.java:774) at Float128VectorTests.assertReductionArraysEqualsMasked(Float128VectorTests.java:152) at Float128VectorTests.MAXReduceFloat128VectorTestsMasked(Float128VectorTests.java:2518) This was 1 failure out of 1000 runs.
04-05-2022

Here's a log file snippet from the jdk-19+21-1461-tier3 sighting: jdk/incubator/vector/Float128VectorTests.java =============================================== jdk/incubator/vector/Float128VectorTests.java Total tests run: 2518, Passes: 2517, Failures: 1, Skips: 0 =============================================== ----------System.err:(13/739)---------- WARNING: Using incubator modules: jdk.incubator.vector java.lang.Exception: failures: 1 at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96) at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127) at java.base/java.lang.Thread.run(Thread.java:828) JavaTest Message: Test threw exception: java.lang.Exception: failures: 1 JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1 ----------rerun:(46/5265)*---------- Unfortunately, this test generates a "success" line for every passing sub-test. So the failure gets lost in the truncated output of 2517 passes.
03-05-2022

No recent failures. Reopen if problem comes back.
08-02-2022

I ran MINReduceFloat128VectorTestsMasked (using a cut down version of the test file) multiple times using a debug build on machines with the same OS and CPU architecture and could not reproduce.
28-10-2021

For jdk-18+21-1299-tier3 windows-x64 windows-x64-debug -XX:UseAVX=3 tier3-vector-avx512 open/test/jdk/:jdk_vector From the XML that TestNG produces: <test-method signature="MINReduceFloat128VectorTestsMasked(java.util.function.IntFunction, java.util.function.IntFunction)[pri:0, instance:Float128VectorTests@1494a913]" started-at="2021-10-25T17:14:48 UTC" name="MINReduceFloat128VectorTestsMasked" data-provider="floatUnaryOpMaskProvider" finished-at="2021-10-25T17:14:48 UTC" duration-ms="15" status="FAIL"> <params> <param index="0"> <value> <![CDATA[float[i * 5]]]> </value> </param> <param index="1"> <value> <![CDATA[mask[false]]]> </value> </param> </params> <exception class="java.lang.AssertionError"> <message> <![CDATA[Final result is incorrect! expected [Infinity] but found [0.0]]]> </message> <full-stacktrace> <![CDATA[java.lang.AssertionError: Final result is incorrect! expected [Infinity] but found [0.0] at org.testng.Assert.fail(Assert.java:99) From the prior mach5 links i can conform the same test is failing. Very hard to track down the actual reason, as it appears to be intermittent. Probably need to run a separate test X number of times.
26-10-2021

Here's a log file snippet for the jdk-18+15-761-tier3 sighting: jdk/incubator/vector/Float128VectorTests.java =============================================== jdk/incubator/vector/Float128VectorTests.java Total tests run: 2501, Passes: 2500, Failures: 1, Skips: 0 =============================================== ----------System.err:(15/928)---------- WARNING: Using incubator modules: jdk.incubator.vector java.lang.Exception: failures: 1 at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:96) at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:54) 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) JavaTest Message: Test threw exception: java.lang.Exception: failures: 1 JavaTest Message: shutting down test STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1 ----------rerun:(47/5412)*---------- Again, the failing test info is lost in the elided section: ... Output overflow: JT Harness has limited the test output to the text at the beginning and the end, so that you can see how the test began, and how it completed. If you need to see more of the output from the test, set the system property javatest.maxOutputSize to a higher value. The current value is 100000 ...
09-09-2021

ILW = MLH = P4
21-07-2021

I downloaded the test run's artifacts and I can't find a more complete log that shows the entire failure message for this test: Float128VectorTests.EQFloat128VectorTestsBroadcastMaskedSmokeTest(float[i], float[i], mask[i % 2])
21-07-2021