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

8306806: JMX agent with JDP enabled won't start when PerfData is disabled #13928

Closed

Conversation

kevinjwalls
Copy link
Contributor

@kevinjwalls kevinjwalls commented May 11, 2023

Java Discovery Protocol (perhaps a hidden feature, but maybe should be more widely known!) and -XX:-UsePerfData together cause a failure to startup.

PerfData is the mechanism for communicating the URL and other properties for remote management, so disabling PerfData clearly breaks this. But there should be a clearer message, and not a fatal error.

e.g.
$ java -XX:-UsePerfData -Dcom.sun.management.jmxremote.autodiscovery=true -Dcom.sun.management.jmxremote.port=0 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false --version
Warning: Exception thrown by the agent : JDP not starting, PerfData not available: Empty PerfData buffer
java 21-internal 2023-09-19 LTS
...etc...

The use of PerfData is superior to the previous hard-coding of knowledge of the URL protocol and structure, and is required to communicate a dynamically assigned port (JDK-8167337).


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8306806: JMX agent with JDP enabled won't start when PerfData is disabled

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13928/head:pull/13928
$ git checkout pull/13928

Update a local copy of the PR:
$ git checkout pull/13928
$ git pull https://git.openjdk.org/jdk.git pull/13928/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13928

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13928.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented May 11, 2023

👋 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
Copy link

openjdk bot commented May 11, 2023

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

  • jmx
  • serviceability

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

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org jmx jmx-dev@openjdk.org labels May 11, 2023
@kevinjwalls kevinjwalls marked this pull request as ready for review May 11, 2023 12:05
@openjdk openjdk bot added the rfr Pull request is ready for review label May 11, 2023
@mlbridge
Copy link

mlbridge bot commented May 11, 2023

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Okay - seems reasonable.

Thanks.

@openjdk
Copy link

openjdk bot commented May 15, 2023

@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:

8306806: JMX agent with JDP enabled won't start when PerfData is disabled

Reviewed-by: dholmes, cjplummer

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 89 new commits pushed to the master branch:

  • d22bcc8: 8307403: java/util/zip/DeInflate.java timed out
  • 2210e06: 8306638: Open source some AWT tests related to datatransfer and Toolkit
  • 05b51c7: 8307567: Avoid relocating global roots to metaspaceObjs in CDS dump
  • 3168372: 8306597: Improve string formatting in EquivMapsGenerator.java
  • 7b0b9b5: 8308049: Refactor nested class declarations in FdLibm.java
  • cc80ada: 8306593: Fix nsk/jdi/stop/stop001 for virtual threads and remove from problem list
  • 43c8c65: 8307555: Reduce memory reads in x86 MD5 intrinsic
  • 01892f9: 8304913: Use OperatingSystem, Architecture, and Version in jlink
  • 0f7b1c5: 8299340: CreateProcessW lpCommandLine must be mutable
  • 57e7a3f: 8307959: Remove explicit type casts from SerializeClosure::do_xxx() calls
  • ... and 79 more: https://git.openjdk.org/jdk/compare/da2c9302628886bbdb4cf588f8275c4a44ff5ac9...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 15, 2023
Copy link
Contributor

@plummercj plummercj 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.

@kevinjwalls
Copy link
Contributor Author

Thanks for the reviews!

@kevinjwalls
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented May 16, 2023

Going to push as commit 0790f70.
Since your change was applied there have been 90 commits pushed to the master branch:

  • c2ef302: 8307968: serviceability/jvmti/vthread/StopThreadTest/StopThreadTest.java timed out
  • d22bcc8: 8307403: java/util/zip/DeInflate.java timed out
  • 2210e06: 8306638: Open source some AWT tests related to datatransfer and Toolkit
  • 05b51c7: 8307567: Avoid relocating global roots to metaspaceObjs in CDS dump
  • 3168372: 8306597: Improve string formatting in EquivMapsGenerator.java
  • 7b0b9b5: 8308049: Refactor nested class declarations in FdLibm.java
  • cc80ada: 8306593: Fix nsk/jdi/stop/stop001 for virtual threads and remove from problem list
  • 43c8c65: 8307555: Reduce memory reads in x86 MD5 intrinsic
  • 01892f9: 8304913: Use OperatingSystem, Architecture, and Version in jlink
  • 0f7b1c5: 8299340: CreateProcessW lpCommandLine must be mutable
  • ... and 80 more: https://git.openjdk.org/jdk/compare/da2c9302628886bbdb4cf588f8275c4a44ff5ac9...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label May 16, 2023
@openjdk openjdk bot closed this May 16, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels May 16, 2023
@openjdk
Copy link

openjdk bot commented May 16, 2023

@kevinjwalls Pushed as commit 0790f70.

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

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 jmx jmx-dev@openjdk.org serviceability serviceability-dev@openjdk.org
3 participants