Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK22 cmdLineTester_loadLibraryTests_0_FAILED #18975

Open
JasonFengJ9 opened this issue Feb 16, 2024 · 14 comments
Open

JDK22 cmdLineTester_loadLibraryTests_0_FAILED #18975

JasonFengJ9 opened this issue Feb 16, 2024 · 14 comments

Comments

@JasonFengJ9
Copy link
Member

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
Copy link
Member

Grinder failed 100%

@JasonFengJ9
Copy link
Member Author

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
Copy link
Member Author

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

@tajila
Copy link
Contributor

tajila commented Mar 6, 2024

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

@tajila
Copy link
Contributor

tajila commented Mar 8, 2024

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 tajila self-assigned this Mar 11, 2024
@tajila
Copy link
Contributor

tajila commented Mar 13, 2024

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
Copy link
Contributor

tajila commented Mar 13, 2024

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
Copy link
Member

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

@tajila
Copy link
Contributor

tajila commented Mar 14, 2024

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

@pshipton
Copy link
Member

pshipton commented Mar 18, 2024

pshipton added a commit to pshipton/openj9 that referenced this issue Mar 18, 2024
Issue eclipse-openj9#18975

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@pshipton
Copy link
Member

Created #19171 to exclude the test.

@pshipton
Copy link
Member

pshipton commented Apr 29, 2024

pshipton added a commit to pshipton/openj9 that referenced this issue Apr 29, 2024
Issue eclipse-openj9#18975

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
pshipton added a commit to pshipton/openj9 that referenced this issue May 6, 2024
Issue eclipse-openj9#18975

Signed-off-by: Peter Shipton <Peter_Shipton@ca.ibm.com>
@pshipton
Copy link
Member

pshipton commented May 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants