-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix bug in JmxServerFeature resource registration #11568
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
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR, @roberttoyonaga! @zapster what's the best way to protect from such issues in the future? Should we annotate the feature with |
I think for things link resource/reflection config, In in situations like this, I think the best protection is having a unittest/integration test for the feature. @roberttoyonaga what do you think? Is it possible to write a unit test that triggers the issue? Alternatively, do you think it would be worth adding (a version of) your reproducer as an integration test? |
It bugs me that we don't detect resource registrations that are just missing. Turns out that we realize that something is off. If we run with
we actually see that something is wrong, but it is hidden in a lot of clutter
@fniephaus I think we could do better, e.g., have a flag where errors are fatal and use that for (most of) our gate jobs? |
Thanks, @zapster. I agree. Let's get this fix in and make this better in a follow up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@zapster Yes I agree that a unit test would be the best way to catch these problems. We currently have multiple unittests testing remote JMX, but none checking ssl and authentication. @fniephaus I made a PR adding authentication and SSL tests for remote JMX a while ago: #6275 |
Yes, I remember...let me comment on the PR. |
This updates the resource bundle registration for the JMX server feature. This is needed to use remote JMX with password authentication.
This OpenJDK upstream PR resulted in the original resource registration going out-of-date: openjdk/jdk#22774
See this commit.
Without this fix the following error can be expected when attempting password authentication:
Steps to reproduce can be found here https://github.com/roberttoyonaga/RJMXTests/tree/main/Standalone (the SSL configuration can be ignored).
This bug affects the GraalVM for JDK 25 release branch (https://github.com/oracle/graal/tree/release/graal-vm/25.0) as well and should be backported to it.