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.24k stars 714 forks source link

testJitserverArguments, Test SSL success condition - failed to configure SSL ecdh #18599

Open pshipton opened 7 months ago

pshipton commented 7 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/601/ - cent6-x64-1 testJitserverArguments_0

Testing: Test SSL success condition
Test start time: 2023/12/12 07:21:23 Eastern Standard Time
Running command: bash /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jitserver/jitserverScript.sh /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jitserver /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin "-Xjit" "-XX:+UseJITServer -Xjit:count=0,verbose={JITServer},verbose={JITServerConns},verbose={compilePerformance} -XX:-JITServerLocalSyncCompiles -XX:JITServerSSLRootCerts=cert.pem" false
Time spent starting: 3 milliseconds
Time spent executing: 2589 milliseconds
Test result: FAILED
Output from test:
 [OUT] start running script
 [OUT] Generate SSL certificates
 [OUT] Creating SSL certificates
 [OUT] Certificates generated
 [OUT] Starting /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/jdkbinary/j2sdk-image/bin/jitserver -XX:JITServerPort=39661  -Xjit -XX:JITServerSSLKey=key.pem -XX:JITServerSSLCert=cert.pem
 [OUT] JITSERVER DOES NOT EXIST
 [OUT] finished script
 [ERR] /home/jenkins/workspace/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_0/aqa-tests/TKG/../../jvmtest/functional/cmdLineTests/jitserver/jitserverconfig.sh: line 30: lsof: command not found
 [ERR] Generating RSA private key, 2048 bit long modulus
 [ERR] ............+++
 [ERR] ............................................................................................................................................................................+++
 [ERR] e is 65537 (0x10001)
 [ERR] Generating a 2048 bit RSA private key
 [ERR] ....+++
 [ERR] ....+++
 [ERR] writing new private key to 'wrongKey.pem'
 [ERR] -----
 [ERR] 
 [ERR] JITServer is ready to accept incoming requests
 [ERR] failed to configure SSL ecdh: Success
 [ERR] Failed to initialize the SSL context
>> Success condition was not found: [Output match: (java|openjdk|semeru) version]
>> Required condition was not found: [Output match: JITServer Client Mode.]
>> Success condition was not found: [Output match: Successfully initialized SSL context]
>> Required condition was not found: [Output match: SSL connection on socket]
>> Success condition was not found: [Output match: Connected to a server]
>> Failure condition was not found: [Output match: (Fatal|Unhandled) Exception]
>> Success condition was not found: [Output match: JITSERVER EXISTS]
>> Success condition was not found: [Output match: JITSERVER STILL EXISTS]
>> Failure condition was found: [Output match: JITSERVER DOES NOT EXIST]
>> Failure condition was not found: [Output match: JITSERVER NO LONGER EXISTS]
pshipton commented 7 months ago

@mpirvu fyi I wonder if this is a machine problem, perhaps related to running on centos6.

mpirvu commented 7 months ago

I started a small grinder (1 iteration) with the failed test on the same machine where it failed: https://openj9-jenkins.osuosl.org/job/Grinder/3144/

pshipton commented 7 months ago

https://openj9-jenkins.osuosl.org/job/Test_openjdk8_j9_sanity.functional_x86-64_linux_Nightly_testList_1/602 - cent6-x64-4

mpirvu commented 7 months ago

The output from the test is:

 [OUT] Starting /home/jenkins/workspace/Grinder/jdkbinary/j2sdk-image/bin/jitserver -XX:JITServerPort=58564  -Xjit -XX:JITServerSSLKey=key.pem -XX:JITServerSSLCert=cert.pem
 [OUT] JITSERVER DOES NOT EXIST

so the server doesn't even start

mpirvu commented 7 months ago

I downloaded the latest nightly build and tried to launch jitserver in a centos6 container with SSL enabled and I get:

[root@c4042a3af982 bin]# ./jitserver -XX:JITServerPort=58564  -Xjit -XX:JITServerSSLKey=key.pem -XX:JITServerSSLCert=cert.pem
failed to configure SSL ecdh: Success
Failed to initialize the SSL context

Not using SSL options, works fine. Also, using SSL in centos7 works fine, so only centos6 has a problem.