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

Use jcmd to generate dumps for openj9 hangs #105

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

lumpfish
Copy link
Contributor

Signed-off-by: Simon Rushton [email protected]

@lumpfish
Copy link
Contributor Author

Fixes #103

@lumpfish
Copy link
Contributor Author

This PR does the following:

  1. Creates a getJavaProperties method to return the properties listed by java -XshowSettings:properties as a hash array
  2. Creates a java_properties_check.pl script which can be used to test the getJavaProperties method from the command line.
  3. Uses the getJavaProperties method to determine whether java.vm,name contains J9. If it does, and and there is a jcmd.exe executable in the jdk bin directory, jcmd is called to take the dumps rather than procdump.exe.

Output from a test run of the PR running the stf SampleOverrunTest:

15:53:16 STF 15:53:20.973 -
15:53:16 STF 15:53:20.973 - ==================== E X E C U T E - ====================
15:53:16 STF 15:53:20.973 - Running execute: perl C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/\TKG\output_16136635918689\system_custom_0/20210218-155315-SampleOverrunProcess/execute.pl
15:53:16 STF 15:53:21.337 -
15:53:16 STF 15:53:21.337 - Java version
15:53:16 STF 15:53:21.338 - Running: C:/Users/jenkins/workspace/Grinder@2/openjdkbinary/j2sdk-image/bin/java -version
15:53:16 Possible unintended interpolation of @2 in string at C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/\TKG\output_16136635918689\system_custom_0/20210218-155315-SampleOverrunProcess/execute.pl line 26.
15:53:17 openjdk version "1.8.0_292-internal"
15:53:17 OpenJDK Runtime Environment (build 1.8.0_292-internal-202102151834-b02)
15:53:17 Eclipse OpenJ9 VM (build master-14abebc65, JRE 1.8.0 Windows Server 2012 R2 amd64-64-Bit Compressed References 20210215_995 (JIT enabled, AOT enabled)
15:53:17 OpenJ9 - 14abebc65
15:53:17 OMR - a7e83c733
15:53:17 JCL - 182457fe based on jdk8u292-b02)

15:53:17 STF 15:53:21.978 -
15:53:17 STF 15:53:21.978 - +------ Step 1 - Run client
15:53:17 STF 15:53:21.978 - | Run foreground process
15:53:17 STF 15:53:21.978 - | Program: C:/Users/jenkins/workspace/Grinder@2/openjdkbinary/j2sdk-image/bin/java
15:53:17 STF 15:53:21.978 - | Mnemonic: CL
15:53:17 STF 15:53:21.978 - | Echo: ECHO_ON
15:53:17 STF 15:53:21.978 - | Expectation: NON_ZERO_EXIT [0] within 10s
15:53:17 STF 15:53:21.978 - |
15:53:17 STF 15:53:21.979 - Running command: C:/Users/jenkins/workspace/Grinder@2/openjdkbinary/j2sdk-image/bin/java -classpath C:\Users\jenkins\workspace\Grinder@2\jvmtest\system\stf\stf.samples\bin net.adoptopenjdk.stf.processManagement.apps.MiniClient 0 180000
15:53:17 STF 15:53:21.979 - Redirecting stderr to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.stderr
15:53:17 STF 15:53:21.979 - Redirecting stdout to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.stdout
15:53:17 STF 15:53:22.052 - Monitoring processes: CL
15:53:17 CL 15:53:22.495 Client started
15:53:17 CL 15:53:22.497 Client sleeping for 180000 milliseconds

15:53:28 STF 15:53:33.059 - FAILED Process CL has timed out
15:53:28 STF 15:53:33.059 - Collecting dumps for: CL
15:53:28 STF 15:53:33.063 - Running command: C:/Users/jenkins/workspace/Grinder@2/openjdkbinary/j2sdk-image/bin/java -XshowSettings:properties -version
15:53:28 STF 15:53:33.063 - Redirecting stderr to C:\Users\jenkins\AppData\Local\Temp\sJSoub0yfP\java_properties.stderr
15:53:28 STF 15:53:33.063 - Redirecting stdout to C:\Users\jenkins\AppData\Local\Temp\sJSoub0yfP\java_properties.stdout
15:53:28 STF 15:53:33.067 - Monitoring processes: stf::stfUtility->getJavaProperties

15:53:29 STF 15:53:33.331 - Monitoring Report Summary:
15:53:29 STF 15:53:33.331 - o Process stf::stfUtility->getJavaProperties ended sucessfully
15:53:29 STF 15:53:33.335 - Using jcmd.exe to generate .DMP files
15:53:29 STF 15:53:33.336 - Running command: C:\Program Files\AdoptOpenJDK\jdk-8.0.265.01-hotspot\bin\jcmd.exe 23096 Dump.java
15:53:29 STF 15:53:33.336 - Redirecting stderr to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.jvmdump.stderr
15:53:29 STF 15:53:33.336 - Redirecting stdout to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.jvmdump.stdout
15:53:29 STF 15:53:33.341 - Running command: C:\Program Files\AdoptOpenJDK\jdk-8.0.265.01-hotspot\bin\jcmd.exe 23096 Dump.system
15:53:29 STF 15:53:33.341 - Redirecting stderr to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.jvmdump.stderr
15:53:29 STF 15:53:33.341 - Redirecting stdout to C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/TKG/output_16136635918689/system_custom_0/20210218-155315-SampleOverrunProcess/results/1.CL.jvmdump.stdout
15:53:29 STF 15:53:33.345 - Pausing for 30 seconds

15:54:01 STF 15:54:03.345 - Process CL (pid 23096) is no longer running. Abandoning dump collection.
15:54:01 CL stderr JVMDUMP039I Processing dump event "abort", detail "" at 2021/02/18 15:53:33 - please wait.
15:54:01 CL stderr JVMDUMP032I JVM requested System dump using 'C:\Users\jenkins\workspace\Grinder@2\openjdk-tests\TKG\output_16136635918689\system_custom_0\20210218-155315-SampleOverrunProcess\results\core.20210218.155333.23096.0001.dmp' in response to an event
15:54:01 STF 15:54:03.345 - Monitoring Report Summary:
15:54:01 STF 15:54:03.345 - o Process CL has timed out
15:54:01 STF 15:54:03.345 - Killing processes: CL
15:54:01 STF 15:54:03.345 - o Process CL pid 23096 is not running
15:54:01 FAILED at step 1 (Run client). Expected return value=0 Actual=1 at C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/\TKG\output_16136635918689\system_custom_0/20210218-155315-SampleOverrunProcess/execute.pl line 80.
15:54:01 STF 15:54:03.774 - FAILED execute script failed. Expected return value=0 Actual=1
15:54:01 STF 15:54:03.774 -
15:54:01 STF 15:54:03.774 - ==================== T E A R D O W N ====================
15:54:01 STF 15:54:03.774 - Running teardown: perl C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/\TKG\output_16136635918689\system_custom_0/20210218-155315-SampleOverrunProcess/tearDown.pl
15:54:01 Possible unintended interpolation of @2 in string at C:/Users/jenkins/workspace/Grinder@2/openjdk-tests/\TKG\output_16136635918689\system_custom_0/20210218-155315-SampleOverrunProcess/tearDown.pl line 26.
15:54:01 STF 15:54:04.145 - TEARDOWN stage completed
15:54:01 STF 15:54:04.168 -
15:54:01 STF 15:54:04.168 - ===================== R E S U L T S =====================
15:54:01 STF 15:54:04.168 - Stage results:
15:54:01 STF 15:54:04.168 - setUp: pass
15:54:01 STF 15:54:04.168 - execute: fail
15:54:01 STF 15:54:04.168 - teardown: pass
15:54:01 STF 15:54:04.168 -
15:54:01 STF 15:54:04.168 - Overall result: FAILED

Full job link: https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/7098/console

@lumpfish lumpfish self-assigned this Feb 18, 2021
# - Gets java propertiesfor the Java on the PATH
#
# perl java_properties_check.pl -p <path>
# - Gets java propertiesfor the Java specified. Assumes the directory provided in the one above bin/java
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we fix this typo? "propertiesfor" -> "properties for".

Copy link
Contributor

@Mesbah-Alam Mesbah-Alam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Approving assuming the typo will be fixed.

@lumpfish lumpfish merged commit efe4d99 into adoptium:master Feb 18, 2021
@karianna karianna added this to the February 2021 milestone Feb 18, 2021
@lumpfish lumpfish deleted the use_jcmd_for_dump branch March 25, 2021 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants