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

[Request] Document required JLink modules for Cryostat to work #682

Closed
andrewazores opened this issue Oct 7, 2024 · 4 comments
Closed
Labels
chore Refactor, rename, cleanup, etc. docs needs-documentation

Comments

@andrewazores
Copy link
Member

https://github.com/openjdk/jmc/blob/4c9d9e47bcf13d6c12ddfcdeddb2e90dbe3b691b/core/org.openjdk.jmc.rjmx.common/src/main/java/org/openjdk/jmc/rjmx/common/services/jfr/internal/FlightRecorderServiceFactory.java#L44

https://github.com/openjdk/jmc/blob/4c9d9e47bcf13d6c12ddfcdeddb2e90dbe3b691b/core/org.openjdk.jmc.rjmx.common/src/main/java/org/openjdk/jmc/rjmx/common/services/jfr/internal/FlightRecorderCommunicationHelperV2.java#L103

If the check in the second link fails then it will indeed fall back to trying to use V1, which is incorrect and would lead to the com.sun.management.MissionControl class loading (which will always fail on a modern JDK version - there is no module containing this class anymore as far as I can see).

$ jshell
jshell> javax.management.MBeanServerConnection.class.getModule()
$1 ==> module java.management

jshell> jdk.management.jfr.FlightRecorderMXBean.class.getModule()
$2 ==> module jdk.management.jfr

It looks like these two classes and respective modules might be the ones needed to get JFR V2 detection to work. Maybe adding jdk.management.jfr will help?

Originally posted by @andrewazores in #595 (reply in thread)

@andrewazores andrewazores added docs chore Refactor, rename, cleanup, etc. needs-documentation labels Oct 7, 2024
@andrewazores
Copy link
Member Author

@Josh-Matsuoka could you take a look at this? From my investigation (linked above) it seems like the real problem here is primarily a JMC bug. For our downstream purposes I think it would be enough for now to simply document what the required modules are, so that users know not to JLink those modules out of their application.

@andrewazores
Copy link
Member Author

See cryostatio/cryostat-core#447

@andrewazores
Copy link
Member Author

See also cryostatio/cryostatio.github.io#196

@andrewazores
Copy link
Member Author

I think between the website issue (our documentation) and the -core issue (really the upstream JMC bug) the work is covered, so I will close this issue as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Refactor, rename, cleanup, etc. docs needs-documentation
Projects
Status: Done
Development

No branches or pull requests

1 participant