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.28k stars 721 forks source link

cmdLineTester_getPid_0 failure on windows OpenJ9 OpenJDK10 #1630

Open vsebe opened 6 years ago

vsebe commented 6 years ago
13:23:02 ===============================================
13:23:02 Running test cmdLineTester_getPid_0 ...
13:23:02 ===============================================
13:23:03 cmdLineTester_getPid_0 Start Time: Fri Apr  6 18:23:15 2018 Epoch Time (ms): 1523035395772
13:23:03 test with NoOptions
13:23:03 { "C:\Users\j9build\jenkins\workspace\Test-Sanity-JDK10-win_x86-64_cmprssptrs/jdk/bin\\java"  -Xcompressedrefs  -DTESTDIR="C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\\cmdLineTests\\runtimemxbeanTests" -DRESJAR="C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\\cmdline_options_testresources\\cmdlinetestresources.jar" -DEXE='"C:\Users\j9build\jenkins\workspace\Test-Sanity-JDK10-win_x86-64_cmprssptrs/jdk/bin\\java"  -Xcompressedrefs ' -DTESTSJARPATH="C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\\cmdLineTests\\runtimemxbeanTests\\runtimemxbeanTests.jar" -jar "C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\\cmdline_options_tester\\cmdlinetester.jar" -config "C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\\cmdLineTests\\runtimemxbeanTests\\getPidTest.xml" -explainExcludes -nonZeroExitWhenError; \
13:23:03 if [ $? -eq 0 ] ; then echo ""; echo "cmdLineTester_getPid_0""_PASSED"; echo ""; else echo ""; echo "cmdLineTester_getPid_0""_FAILED"; echo ""; fi; } 2>&1 | tee -a "C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test/\\TestConfig\\test_output_15230353862082\\TestTargetResult";
13:23:04 *** Starting test suite: getPid test ***
13:23:04 Testing: Compare RuntimeMXBean.getPid() with getting PID from system
13:23:04 Test start time: 2018/04/06 18:23:16 Greenwich Mean Time
13:23:04 Running command: perl C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\cmdLineTests\runtimemxbeanTests/getPidTest.pl "C:\Users\j9build\jenkins\workspace\Test-Sanity-JDK10-win_x86-64_cmprssptrs/jdk/bin\\java"  -Xcompressedrefs  -cp C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\cmdLineTests\runtimemxbeanTests\runtimemxbeanTests.jar GetPid
13:23:04 Time spent starting: 23 milliseconds
13:23:04 Time spent executing: 309 milliseconds
13:23:04 Test result: FAILED
13:23:04 Output from test:
13:23:04  [OUT] FAIL: RuntimeMXBean.getPID() returned sh: C:Usersj9buildjenkinsworkspaceTest-Sanity-JDK10-win_x86-64_cmprssptrs/jdk/bin\java: No such file or directory
13:23:04  [OUT]  instead of 5176
13:23:04  [ERR] Argument "sh: C:Usersj9buildjenkinsworkspaceTest-Sanity-JDK10-win_..." isn't numeric in numeric eq (==) at C:/Users/j9build/jenkins/workspace/Test-Sanity-JDK10-win_x86-64_cmprssptrs/openj9/test///..//jvmtest\cmdLineTests\runtimemxbeanTests/getPidTest.pl line 37, <GEN1> line 1.
13:23:04 >> Success condition was not found: [Output match: PASS]
13:23:04 >> Failure condition was found: [Output match: FAIL]
13:23:04 
13:23:04 
13:23:04 ---TEST RESULTS---
13:23:04 Number of PASSED tests: 0 out of 1
13:23:04 Number of FAILED tests: 1 out of 1
13:23:04 
13:23:04 ---SUMMARY OF FAILED TESTS---
13:23:04 Compare RuntimeMXBean.getPid() with getting PID from system
13:23:04 -----------------------------
13:23:04 
13:23:04 
13:23:04 cmdLineTester_getPid_0_FAILED
13:23:04 
13:23:04 cmdLineTester_getPid_0 Finish Time: Fri Apr  6 18:23:17 2018 Epoch Time (ms): 1523035397295

Java version:

13:04:10 + build/windows-x86_64-normal-server-release/images/jdk/bin/java -version
13:04:10 openjdk version "10-internal" 2018-03-20
13:04:10 OpenJDK Runtime Environment (build 10-internal+0-adhoc..Build-JDK10-winx86-64cmprssptrs)
13:04:10 Eclipse OpenJ9 VM (build ibm_sdk-e9cc0eaf00, JRE 10 Windows Server 2008 R2 amd64-64 Compressed References 20180406_9 (JIT enabled, AOT enabled)
13:04:10 OpenJ9   - e9cc0eaf00
13:04:10 OMR      - 12d6fd9b
13:04:10 JCL      - fe3402a9c4 based on jdk-10+46)
vsebe commented 6 years ago

@llxia attn

babsingh commented 6 years ago

fyi - @Ailloviee

Ailloviee commented 6 years ago

Issue experimentation summary:

  1. On Windows: Tested with OpenJDK10(Both with Eclipse OpenJ9 and with Hotspot) and OpenJDK9, same issue exists that Pid returned from ProcessHandle.current().pid() in RuntimeMXBean.java does not match with the Pid returned from system command ps -ef | grep java. Meanwhile, Pid returned from open3($in, $out, $err, $javaCmd) in getPidTest.pl matches with that from ps -ef | grep java.

  2. On Linux (VM Farm machine): Issue does not exist, pids from both ProcessHandle and Perl script match.

NOTE: The above testing was done locally as there is path escape issue to be fixed for perl script before it can be tested on Jenkins.

babsingh commented 6 years ago

fyi - @tajila