JDK-8340391 : Windows jcmd System.map and System.dump_map tests failing
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 24
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2024-09-18
  • Updated: 2024-09-23
  • Resolved: 2024-09-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b16Fixed
Related Reports
Relates :  
Description
The tests are failing on Windows:
SystemMapTest.java
SystemDumpMapTest.java

Since integrating:
8319873: Add windows implementation for jcmd System.map and System.dump_map 

-XX:+UseZGC is a common factor in the failures.

Sample output:

serviceability/dcmd/vm/SystemMapTest.java
...   
Missing patterns in dump:
0x\\p{XDigit}+-0x\\p{XDigit}+ +\\d+ +[\\-rwxcin]* +c-pvt +(0x\\p{XDigit}+|\\d+) +JAVAHEAP.*
test SystemDumpMapTest.jmx(): failure
java.lang.RuntimeException: java.lang.RuntimeException: Missing patterns
	at SystemDumpMapTest.run_test(SystemDumpMapTest.java:100)
	at SystemDumpMapTest.run(SystemDumpMapTest.java:106)
	at SystemDumpMapTest.jmx(SystemDumpMapTest.java:112)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at org.testng.TestRunner.privateRun(TestRunner.java:764)
	at org.testng.TestRunner.run(TestRunner.java:585)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
	at org.testng.TestNG.runSuites(TestNG.java:1069)
	at org.testng.TestNG.run(TestNG.java:1037)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1576)
Caused by: java.lang.RuntimeException: Missing patterns
	at SystemDumpMapTest.run_test(SystemDumpMapTest.java:96)
	... 31 more

===============================================
serviceability/dcmd/vm/SystemDumpMapTest.java
Total tests run: 1, Passes: 0, Failures: 1, Skips: 0
===============================================

----------System.err:(17/767)----------
 stdout: [Memory map dumped to "test-map.txt".
];
 stderr: []
 exitValue = -1

java.lang.Exception: failures: 1
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:104)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1576)

JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1



serviceability/dcmd/vm/SystemDumpMapTest.java


   
Missing patterns in dump:
0x\\p{XDigit}+-0x\\p{XDigit}+ +\\d+ +[\\-rwxcin]* +c-pvt +(0x\\p{XDigit}+|\\d+) +JAVAHEAP.*
test SystemDumpMapTest.jmx(): failure
java.lang.RuntimeException: java.lang.RuntimeException: Missing patterns
	at SystemDumpMapTest.run_test(SystemDumpMapTest.java:100)
	at SystemDumpMapTest.run(SystemDumpMapTest.java:106)
	at SystemDumpMapTest.jmx(SystemDumpMapTest.java:112)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:132)
	at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:599)
	at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:174)
	at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
	at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:822)
	at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:147)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
	at org.testng.TestRunner.privateRun(TestRunner.java:764)
	at org.testng.TestRunner.run(TestRunner.java:585)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
	at org.testng.SuiteRunner.run(SuiteRunner.java:286)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1218)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1140)
	at org.testng.TestNG.runSuites(TestNG.java:1069)
	at org.testng.TestNG.run(TestNG.java:1037)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:102)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1576)
Caused by: java.lang.RuntimeException: Missing patterns
	at SystemDumpMapTest.run_test(SystemDumpMapTest.java:96)
	... 31 more

===============================================
serviceability/dcmd/vm/SystemDumpMapTest.java
Total tests run: 1, Passes: 0, Failures: 1, Skips: 0
===============================================

----------System.err:(19/991)----------
Java HotSpot(TM) 64-Bit Server VM warning: Option ZGenerational was deprecated in version 23.0 and will likely be removed in a future release.
Java HotSpot(TM) 64-Bit Server VM warning: Non-generational ZGC is deprecated.
 stdout: [Memory map dumped to "test-map.txt".
];
 stderr: []
 exitValue = -1

java.lang.Exception: failures: 1
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:104)
	at com.sun.javatest.regtest.agent.TestNGRunner.main(TestNGRunner.java:58)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:573)
	at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
	at java.base/java.lang.Thread.run(Thread.java:1576)

JavaTest Message: Test threw exception: java.lang.Exception: failures: 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.Exception: failures: 1




Comments
The fix for this bug is integrated in jdk-24+16-1784.
18-09-2024

Changeset: 9cfc03aa Branch: master Author: Kevin Walls <kevinw@openjdk.org> Date: 2024-09-18 19:17:26 +0000 URL: https://git.openjdk.org/jdk/commit/9cfc03aa81f2ae20616c8cc27e3467ad01cf985f
18-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/21073 Date: 2024-09-18 18:05:27 +0000
18-09-2024

This is testing OK for me: ZGC JAVAHEAP is not private in terms of Windows _MEMORY_BASIC_INFORMATION bash-4.2$ git diff diff --git a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java index bd3f97f7643..6507117df35 100644 --- a/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java +++ b/test/hotspot/jtreg/serviceability/dcmd/vm/SystemMapTestBase.java @@ -78,7 +78,7 @@ private static final String winbase = range + space + someSize + space + winprot + space; private static final String winimage = winbase + "c-img" + space + someNumber + space; - private static final String wincommitted = winbase + "c-pvt" + space + someNumber + space; + private static final String wincommitted = winbase + "(c-pvt|c-map)" + space + someNumber + space; private static final String winreserved = winbase + "r-pvt" + space + someNumber + space;
18-09-2024

Added the 'regression' label since this appears to be caused by the fix for: JDK-8319873 Add windows implementation for jcmd System.map and System.dump_map
18-09-2024

JAVAHEAP is not "c-pvt", has "offset" of zero ? e.g. from to vsize prot state offset vminfo/file =========================================================================================== ... 0x0000040000000000-0x0000040000200000 2097152 rw- c-map 0 JAVAHEAP 0x0000040000200000-0x0000040000400000 2097152 rw- c-map 0 JAVAHEAP 0x0000040000400000-0x0000040000600000 2097152 rw- c-map 0 JAVAHEAP ... test SystemMapTest.jmx(): failure java.lang.RuntimeException: '0x\\p{XDigit}+-0x\\p{XDigit}+ +\\d+ +[\\-rwxcin]* +c-pvt +(0x\\p{XDigit}+|\\d+) +JAVAHEAP.*' missing from stdout/stderr at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:372) at SystemMapTest.run(SystemMapTest.java:50) at SystemMapTest.jmx(SystemMapTest.java:57) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke( In a passing test, I see: 0x00000000c0000000-0x00000000d8000000 402653184 rw- c-pvt 0 JAVAHEAP 0x00000000d8000000-0x0000000100000000 671088640 --- r-pvt 0x18000000 JAVAHEAP
18-09-2024