RFR: 8306806: JMX agent with JDP enabled won't start when PerfData is disabled [v2]
Kevin Walls
kevinw at openjdk.org
Fri May 12 09:15:47 UTC 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).
Kevin Walls has updated the pull request incrementally with two additional commits since the last revision:
- undo (C)
- Handle BufferUndeflowException to leave IOException free for other failures
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/13928/files
- new: https://git.openjdk.org/jdk/pull/13928/files/fa0fa449..4dcaf76d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=13928&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=13928&range=00-01
Stats: 7 lines in 2 files changed: 1 ins; 3 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/13928.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/13928/head:pull/13928
PR: https://git.openjdk.org/jdk/pull/13928
More information about the serviceability-dev
mailing list