RFR: 8318306: java/util/Arrays/Sorting.java fails with "Array is not sorted at 8228-th position: 8251.0 and 8153.0" [v2]
Srinivas Vamsi Parasa
duke at openjdk.org
Fri Oct 20 16:32:55 UTC 2023
> The goal of this PR is to address the failure of AVX512 sort test when the following JVM options are enabled (particularly `-XX:+DeoptimizeALot`) :
> `-Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot`
>
> ### Description of the error:
> The sorting test (test/jdk/java/util/Arrays/Sorting.java) usually fails as shown below (from JBS bug report):
>
> [Arrays.parallelSort] 'Test with check sum' length = 10000, random = C0FFEE, m = 128, CHAR STAGGER
> [Arrays.parallelSort] 'Test with check sum' length = 10000, random = C0FFEE, m = 128, SHORT STAGGER
> [Arrays.parallelSort] 'Test with check sum' length = 10000, random = C0FFEE, m = 128, FLOAT STAGGER
> ----------System.err:(25/1026)----------
>
> *** TEST FAILED ***
>
> Array is not sorted at 8228-th position: 8251.0 and 8153.0
>
> java.lang.RuntimeException: Test failed
> at Sorting.fail(Sorting.java:644)
> at Sorting.checkSorted(Sorting.java:892)
> at Sorting.checkSorted(Sorting.java:841)
> at Sorting.checkWithCheckSum(Sorting.java:638)
> at Sorting.testWithCheckSum(Sorting.java:438)
> at Sorting.testBasic(Sorting.java:109)
> at Sorting.testCore(Sorting.java:122)
> at Sorting.testAll(Sorting.java:140)
> at Sorting.testAll(Sorting.java:135)
> at Sorting.main(Sorting.java:85)
> at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580)
> at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
> at java.base/java.lang.Thread.run(Thread.java:1570)
>
> JavaTest Message: Test threw exception: java.lang.RuntimeException: Test failed
> JavaTest Message: shutting down test
>
> STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Test failed
>
> ---------------------------------
> ### Reproducing the error:
> #### (1) Using test/jdk/java/util/Arrays/Sorting.java:
> `jtreg -jdk:$JDK_HOME/build/linux-x86_64-server-slowdebug/jdk/ -Xcomp -ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -server -XX:-TieredCompilation -XX:+DeoptimizeALot -timeoutFactor:100 -verbose:all test/jdk/java/util/Arrays/Sorting.java`
>
> This failure was also reproduced independently by the author of this PR as follows:
> **example 1:**
>
>
> [Arrays.parallelSort] 'Test with check sum' length = 10000, random = C0FFEE, m = 2048, DOUBLE REPEATED
> [Arrays.parallelSort] 'Test with check sum' length = 10000, random = C0FFEE, m = 2048, INT DUPLICATED
> STDERR:
> *** TEST FAILED ***
> Array is not...
Srinivas Vamsi Parasa has updated the pull request incrementally with one additional commit since the last revision:
Update test/jdk/java/util/Arrays/SortingDeoptimizationTest.java
Co-authored-by: Tobias Hartmann <tobias.hartmann at oracle.com>
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16230/files
- new: https://git.openjdk.org/jdk/pull/16230/files/cc59fed4..ac74afef
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16230&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16230&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16230.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16230/head:pull/16230
PR: https://git.openjdk.org/jdk/pull/16230
More information about the hotspot-compiler-dev
mailing list