Skip to content

8196743: jstatd doesn't see new Java processes inside Docker container#3908

Closed
kevinjwalls wants to merge 2 commits intoopenjdk:masterfrom
kevinjwalls:8196743_jstatd
Closed

8196743: jstatd doesn't see new Java processes inside Docker container#3908
kevinjwalls wants to merge 2 commits intoopenjdk:masterfrom
kevinjwalls:8196743_jstatd

Conversation

@kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented May 6, 2021

This is a merge request to fix the issue where a running jstatd does not see JVMs in docker containers started since the jstatd itself started.

jstatd was using the set of temp directories gathered on startup to scan for VMs, by reading their perfdata file. That includes existing running VMs in docker instances using tmp dirs such as /proc/PID/root/tmp/. But it needs to re-evaluate that set of temp dirs continually to see new VMs in docker containers. Rescanning also means it "forgets" about tmp dirs which have disappeared, for containers that have shutdown, and it will now not be scanning those directories forever.

Have been testing this manually, watching jps connecting to jstatd and show newly created JVMs in docker containers come and go. Running existing tests OK so far.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8196743: jstatd doesn't see new Java processes inside Docker container

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3908/head:pull/3908
$ git checkout pull/3908

Update a local copy of the PR:
$ git checkout pull/3908
$ git pull https://git.openjdk.java.net/jdk pull/3908/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3908

View PR using the GUI difftool:
$ git pr show -t 3908

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3908.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 6, 2021

👋 Welcome back kevinw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label May 6, 2021
@openjdk
Copy link

openjdk bot commented May 6, 2021

@kevinjwalls The following label will be automatically applied to this pull request:

  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label May 6, 2021
@mlbridge
Copy link

mlbridge bot commented May 6, 2021

Webrevs

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

Hi Kevin,
This looks okay to me modulo the question from Yasumasa.
Thanks,
Serguei

@openjdk
Copy link

openjdk bot commented May 7, 2021

@kevinjwalls This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8196743: jstatd doesn't see new Java processes inside Docker container

Reviewed-by: sspitsyn, ysuenaga

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 15 new commits pushed to the master branch:

  • ebb68d2: 8049700: Deprecate obsolete classes and methods in javax/swing/plaf/basic
  • 3a474d9: 8265612: revise the help info for jmap histo command
  • c97f56c: 8266172: -Wstringop-overflow happens in vmError.cpp
  • 43ad24f: 8265465: jcmd VM.cds should keep already dumped archive when exception happens
  • 66191ff: 8266193: BasicJMapTest does not include testHistoParallel methods
  • 36e5ad6: 8263236: runtime/os/TestTracePageSizes.java fails on old kernels
  • 0ca86da: 8266002: vmTestbase/nsk/jvmti/ClassPrepare/classprep001 should skip events for unexpected classes
  • 52f1db6: 8262002: java/lang/instrument/VerifyLocalVariableTableOnRetransformTest.sh failed with "TestCaseScaffoldException: DummyClassWithLVT did not match .class file"
  • 04f7112: 8266293: Key protection using PBEWithMD5AndDES fails with "java.security.InvalidAlgorithmParameterException: Salt must be 8 bytes long"
  • a90b33a: 8266573: Make sure blackholes are tagged for all JVMCI paths
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/2438498a3f6dfa53966a0f5b28af28617ca00e6b...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label May 7, 2021
Copy link
Member

@YaSuenag YaSuenag left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for fixing!

@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk openjdk bot closed this May 7, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 7, 2021
@openjdk
Copy link

openjdk bot commented May 7, 2021

@kevinjwalls Since your change was applied there have been 30 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

Pushed as commit 0790e60.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@kevinjwalls
Copy link
Contributor Author

(For the record, the tier1_serviceability tests run OK for me.)

@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Laurence Cable on serviceability-dev:

and sadly /proc does not support inotify()!!!!

On 5/6/21 1:48 PM, Kevin Walls wrote:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: larry_cable.vcf
Type: text/x-vcard
Size: 217 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20210506/2d0958e2/larry_cable.vcf>

1 similar comment
@mlbridge
Copy link

mlbridge bot commented May 14, 2021

Mailing list message from Laurence Cable on serviceability-dev:

and sadly /proc does not support inotify()!!!!

On 5/6/21 1:48 PM, Kevin Walls wrote:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: larry_cable.vcf
Type: text/x-vcard
Size: 217 bytes
Desc: not available
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20210506/2d0958e2/larry_cable.vcf>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants