eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.23k stars 711 forks source link

JDK22 cmdLineTester_loadLibraryTests_0_FAILED #18975

Open JasonFengJ9 opened 4 months ago

JasonFengJ9 commented 4 months ago

Failure link

From an internal build(win10x86-svl-rt1-1):

01:46:23  openjdk version "22-internal" 2024-03-19
01:46:23  OpenJDK Runtime Environment (build 22-internal-adhoc.jenkins.buildjdk22x86-64windowspersonal)
01:46:23  Eclipse OpenJ9 VM (build master-f524f995be4, JRE 22 Windows 10 amd64-64-Bit Compressed References 20240215_22 (JIT enabled, AOT enabled)
01:46:23  OpenJ9   - f524f995be4
01:46:23  OMR      - 0966eb360f6
01:46:23  JCL      - ff0372607f0 based on jdk-22+35)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

cmdLineTester_loadLibraryTests_0 Start Time: Fri Feb 16 00:04:39 2024 Epoch Time (ms): 1708070679163
variation: NoOptions
JVM_OPTIONS:  

TEST SETUP:
JVMSHRC005I No shared class caches available
JVMSHRC005I No shared class caches available
cache cleanup done

TESTING:
*** Starting test suite: LoadLibrary test intended for CMVC 201408 ***
Testing: LoadLibrary testcase with invalid paths specified in the library path list
Test start time: 2024/02/16 00:04:45 Pacific Standard Time
Running command: C:/Users/jenkins/workspace/Test_openjdk22_j9_sanity.functional_x86-64_windows_Personal_testList_1/jdkbinary/j2sdk-image\bin\java -Djava.library.path=".;'C:\\Program Files (x86)\\ibm\\tivoli';C:\\Users\\j9build;C:\\dev;." -cp C:/Users/jenkins/workspace/Test_openjdk22_j9_sanity.functional_x86-64_windows_Personal_testList_1/aqa-tests///..//jvmtest\functional\cmdLineTests\loadLibraryTest\loadLibraryTest.jar org.openj9.test.loadLibrary.TestLoadLibrary
Time spent starting: 78 milliseconds
Time spent executing: 2110 milliseconds
Test result: FAILED
Output from test:
>> Success condition was not found: [Output match: Not found in java.library.path]
>> Success condition was not found: [Output match: The specified network name is no longer available]
>> Success condition was not found: [Output match: java.lang.UnsatisfiedLinkError: Can't load abcdef]
>> Failure condition was not found: [Output match: The specified path is invalid]
>> Failure condition was not found: [Output match: Could not find or load main class Files]
>> Failure condition was not found: [Output match: Unhandled Exception]
>> Failure condition was not found: [Output match: corrupt]
>> Failure condition was not found: [Output match: Processing dump event]
>> Failure condition was not found: [Output match: JVM requested Java dump]
>> Failure condition was not found: [Output match: JVM requested Snap dump]

---TEST RESULTS---
Number of PASSED tests: 0 out of 1
Number of FAILED tests: 1 out of 1

---SUMMARY OF FAILED TESTS---
LoadLibrary testcase with invalid paths specified in the library path list
-----------------------------

-----------------------------------
cmdLineTester_loadLibraryTests_0_FAILED

50x internal grinder

pshipton commented 4 months ago

Grinder failed 100%

JasonFengJ9 commented 4 months ago

JDK22 x86-64_windows

13:43:34  variation: NoOptions
13:43:34  JVM_OPTIONS:  

13:43:38  TESTING:
13:43:40  *** Starting test suite: LoadLibrary test intended for CMVC 201408 ***
13:43:40  Testing: LoadLibrary testcase with invalid paths specified in the library path list
13:43:40  Test start time: 2024/03/03 10:43:39 Pacific Standard Time
13:43:40  Running command: C:/Users/jenkins/workspace/Test_openjdk22_j9_sanity.functional_x86-64_windows_Personal_testList_1/jdkbinary/j2sdk-image\bin\java -Djava.library.path=".;'C:\\Program Files (x86)\\ibm\\tivoli';C:\\Users\\j9build;C:\\dev;." -cp C:/Users/jenkins/workspace/Test_openjdk22_j9_sanity.functional_x86-64_windows_Personal_testList_1/aqa-tests///..//jvmtest\functional\cmdLineTests\loadLibraryTest\loadLibraryTest.jar org.openj9.test.loadLibrary.TestLoadLibrary
13:43:40  Time spent starting: 140 milliseconds
13:43:43  Time spent executing: 2332 milliseconds
13:43:43  Test result: FAILED
13:43:43  Output from test:
13:43:43  >> Success condition was not found: [Output match: Not found in java.library.path]
13:43:43  >> Success condition was not found: [Output match: The specified network name is no longer available]
13:43:43  >> Success condition was not found: [Output match: java.lang.UnsatisfiedLinkError: Can't load abcdef]
13:43:43  >> Failure condition was not found: [Output match: The specified path is invalid]
13:43:43  >> Failure condition was not found: [Output match: Could not find or load main class Files]
13:43:43  >> Failure condition was not found: [Output match: Unhandled Exception]
13:43:43  >> Failure condition was not found: [Output match: corrupt]
13:43:43  >> Failure condition was not found: [Output match: Processing dump event]
13:43:43  >> Failure condition was not found: [Output match: JVM requested Java dump]
13:43:43  >> Failure condition was not found: [Output match: JVM requested Snap dump]
13:43:43  
13:43:43  
13:43:43  ---TEST RESULTS---
13:43:43  Number of PASSED tests: 0 out of 1
13:43:43  Number of FAILED tests: 1 out of 1
13:43:43  
13:43:43  ---SUMMARY OF FAILED TESTS---
13:43:43  LoadLibrary testcase with invalid paths specified in the library path list
13:43:43  -----------------------------
13:43:43  
13:43:43  -----------------------------------
13:43:43  cmdLineTester_loadLibraryTests_0_FAILED
JasonFengJ9 commented 4 months ago

JDK21 x86-64_windows passed

03:23:25  ===============================================
03:23:25  Running test cmdLineTester_loadLibraryTests_0 ...
03:23:25  ===============================================
03:23:25  cmdLineTester_loadLibraryTests_0 Start Time: Wed Feb 21 03:23:25 2024 Epoch Time (ms): 1708503805821
03:23:25  variation: NoOptions
03:23:26  JVM_OPTIONS:  

03:23:26  TESTING:
03:23:27  *** Starting test suite: LoadLibrary test intended for CMVC 201408 ***
03:23:27  Testing: LoadLibrary testcase with invalid paths specified in the library path list
03:23:28  Test start time: 2024/02/21 03:23:27 Eastern Standard Time
03:23:28  Running command: C:/Users/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_windows_Nightly_testList_1/jdkbinary/j2sdk-image\bin\java -Djava.library.path=".;'C:\\Program Files (x86)\\ibm\\tivoli';C:\\Users\\j9build;C:\\dev;." -cp C:/Users/jenkins/workspace/Test_openjdk21_j9_sanity.functional_x86-64_windows_Nightly_testList_1/aqa-tests///..//jvmtest\functional\cmdLineTests\loadLibraryTest\loadLibraryTest.jar org.openj9.test.loadLibrary.TestLoadLibrary
03:23:28  Time spent starting: 172 milliseconds
03:23:28    Match (success): Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load abcdef
03:23:28  Time spent executing: 1063 milliseconds
03:23:28  Test result: PASSED
03:23:28  
03:23:28  
03:23:28  ---TEST RESULTS---
03:23:28  Number of PASSED tests: 1 out of 1
03:23:28  Number of FAILED tests: 0 out of 1
03:23:28  -----------------------------------
03:23:28  cmdLineTester_loadLibraryTests_0_PASSED
JasonFengJ9 commented 4 months ago

JDK 8/11/17/21/22 personal build

JDK8 x86-64_windows cmdLineTester_loadLibraryTests_0_PASSED(win22x86-svl-rt5-1) JDK11 x86-64_windows cmdLineTester_loadLibraryTests_0_PASSED(win11x86-svl-rt8-1) JDK17 x86-64_windows cmdLineTester_loadLibraryTests_0_PASSED(win19x86-svl-rt5-1) JDK21 x86-64_windows cmdLineTester_loadLibraryTests_0_PASSED(win16x64rt-1-9)

JDK22 x86-64_windows cmdLineTester_loadLibraryTests_0_FAILED(win11x86-rtp-rt5-1) This is a JDK22-specific issue.

tajila commented 3 months ago

Ive determined that in JDK22 the exception is thrown and the application is termitnated, but for some reason the exception trace isnt printed.

tajila commented 3 months ago

Also, I dont think this issue is windows specific. It failed on Linux for me.

I think the issue is that in JDK22 instance main methods are turned on by default. The first time it tries to call main it fails, then it tries again 3 more times, it looks like that eats the pending exception.

tajila commented 3 months ago

This test also failed with RI

openjdk version "23-beta" 2024-09-17
OpenJDK Runtime Environment Temurin-23+13-202403072022 (build 23-beta+13-ea)
OpenJDK 64-Bit Server VM Temurin-23+13-202403072022 (build 23-beta+13-ea, mixed mode, sharing)
tajila commented 3 months ago

I think the issue is the launcher code, it clears any exception after calling mainID = (*env)->GetStaticMethodID(env, mainClass, "main",, so the static init failure remains hidden.

The JDK21 launcher code would check the exception and then print it. So this looks like a regression in openjdk code.

pshipton commented 3 months ago

Presumably the change is intentional? If so this becomes a test issue and the test needs to be updated.

tajila commented 3 months ago

It may be a bug on their part. Either way, the test should be excluded on JDK22+ for the time being

pshipton commented 3 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.functional_x86-64_windows_Release_testList_1/1 cmdLineTester_loadLibraryTests_0

pshipton commented 3 months ago

Created https://github.com/eclipse-openj9/openj9/pull/19171 to exclude the test.

pshipton commented 2 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.functional_x86-64_windows_Release_testList_1/8 0.45 release build which didn't get the exclude.

Created https://github.com/eclipse-openj9/openj9/pull/19409

pshipton commented 1 month ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk22_j9_sanity.functional_x86-64_windows_Release_testList_1/9

The exclude isn't working because we are using the v1.0.1-release branch and testenv which specifies the 0.44 openj9 branch.