JDK-8229204 : [AOT] 4 nsk/jdi tests consistently fail on some hosts
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 14
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-08-06
  • Updated: 2019-10-11
  • Resolved: 2019-10-11
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 14
14Resolved
Related Reports
Duplicate :  
Relates :  
Description
The following 4 tests are failing, but only on certain hosts:

vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses035
vmTestbase/nsk/jdi/VirtualMachine/redefineClasses/redefineclasses034
vmTestbase/nsk/jdi/ReferenceType/nestedTypes/nestedtypes001
vmTestbase/nsk/jdi/ClassLoaderReference/definedClasses/definedclasses002

The failures in general are all class loading related. They are 100% reproducible on the hosts in question, and never reproduce on other hosts. Also, they only reproduce when using AOT.
Comments
Confirmed. Bug is fixed.
11-10-2019

Could you please verify if the fix for https://bugs.openjdk.java.net/browse/JDK-8228903 also addresses this issue (the corresponding "Update Graal" issue is at https://bugs.openjdk.java.net/browse/JDK-8229201)? We tested locally with an AVX512BW VL machine and the tests pass.
07-10-2019

ILW = Same as JDK-8228903 = P2 This should be closed as duplicate once we've verified that it's the same issue.
12-08-2019

This looks like JDK-8228903. Though it doesn't explain why this one machine is different to others.
07-08-2019

Looks like there might be an issue with String.compareTo when running with AOT on these machines. I instrumented the test to see why we think the ClassLoader might be incorrect: This is without AOT: testedClass :nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035b class loader :nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ clsLdrName = nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB, hashCode = -1248506115, length = 70 expectedName = nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB, hashCode = -1248506115, length = 70 Result compareTo = 0, equals = true, equalsIgnoreCase = true and with AOT: testedClass :nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035b class loader :nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ clsLdrName = nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB, hashCode = -1248506115, length = 70 expectedName = nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB, hashCode = -1248506115, length = 70 Result compareTo = -4, equals = true, equalsIgnoreCase = true Wrote a smaller reproducer for this that fails when run with AOT: public class Test { public static void main(String... args) { String s1 = "nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB"; if (s1.compareTo(args[0]) != 0) { System.out.println("compareTo failed"); } } } java -XX:AOTLibrary=/opt/mach5/ctornqvi/build/linux-x64/test-support/aot/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi_VirtualMachine_redefineClasses_redefineclasses035_TestDescription_java/libjava.base.so Test nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB compareTo failed java Test nsk.jdi.VirtualMachine.redefineClasses.redefineclasses035aClassLoaderB
07-08-2019

To run these tests from the command line using AOT, use the following: make run-test TEST=:vmTestbase_nsk_jdi JTREG_EXTRA_PROBLEM_LISTS=ProblemList-aot.txt TEST_OPTS_AOT_MODULES=java.base JTREG_TIMEOUT_FACTOR=10
06-08-2019