JDK-8195809 : [TESTBUG] jps and jcmd -l support for containers is not tested
  • Type: Bug
  • Component: core-svc
  • Sub-Component: tools
  • Affected Version: 11,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-01-19
  • Updated: 2024-06-04
  • Resolved: 2021-09-13
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 11 JDK 17 JDK 18
11.0.24-oracleFixed 17.0.7-oracleFixed 18 b15Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
The following 2 tests are planned for this feature:
1. Execute "jps" and "jcmd -l" with several JVMs running inside the containers.
    Ensure jps/jcmd that runs on a host system can see the Java processes running inside containers, and report correct PIDs.
    This only works if access is configured correctly.

2. Exercise PerfDataFile.getFile(..)
Comments
Fix request [17u] I backport this for parity with 17.0.7-oracle. No risk, only a test change. Clean backport. Test passes. SAP nighlty testing passed.
10-02-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk17u-dev/pull/1151 Date: 2023-02-09 15:11:33 +0000
09-02-2023

Changeset: 7c26ddb5 Author: Mikhailo Seledtsov <mseledtsov@openjdk.org> Date: 2021-09-13 17:36:23 +0000 URL: https://git.openjdk.java.net/jdk/commit/7c26ddb575bb6f1161850c31a933d154ae8b96e3
13-09-2021

Development of JTReg test in progress: https://github.com/mseledts/jdk/tree/jcmd-container-test-8195809 https://github.com/mseledts/jdk/blob/jcmd-container-test-8195809/test/hotspot/jtreg/containers/docker/TestJcmd.java
05-08-2021

Updated (v08) of the test prototype: - using jcmd -l instead of ps - extra debug info for target in-container jvm https://bugs.openjdk.java.net/secure/attachment/94994/docker-jps-8193710-proto-v08.tar.gz
02-06-2021

Webrev: http://cr.openjdk.java.net/~mseledtsov/8195809.01/ Testing: 1. Ran the new test on Linux-x64: PASS 2. Ran all hotspot and JDK container tests on Linux-x64: test/hotspot/jtreg/containers/docker test/jdk/jdk/internal/platform/docker/ All PASS
17-04-2020

WebRev: http://cr.openjdk.java.net/~mseledtsov/8195809.00/ Testing: - ran the new test multiple times on Linux-x64 - ran TestJCMDWithSideCar multiple times on Linux-x64 - ran all Docker/Container tests (HotSpot and JDK) All PASS
30-07-2019

Here is the preliminary updated change: http://cr.openjdk.java.net/~mseledtsov/8195809.pre.01/ It works, but needs some cleanup and more testing. It can be used to reproduce a problem with 'jcmd help'. (jcmd -l works).
18-07-2019

Here is the preliminary test code: http://cr.openjdk.java.net/~mseledtsov/8195809.pre.00/ Will send a webrev after some more testing and cleanup.
17-07-2019