-
Notifications
You must be signed in to change notification settings - Fork 73
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
JDK21+ AIX prints a warning message for the same library previously loaded #1264
Comments
Is there any workaround? How does the command option option affect the behavior? |
Added the following in the issue description: There are no new command line options. An agent library can be loaded via an existing command line option A workaround to avoid multiple warning messages is to only load the same library once. |
JEP451 adds a command line option, -XX:[+/-]EnableDynamicAgentLoading. So with -XX:-EnableDynamicAgentLoading you can't load the library at all, and with -XX:+EnableDynamicAgentLoading you get a warning if the library is loaded more than once (every time it's loaded), is that correct? |
And the difference between AIX and other platforms is that on AIX you get the warning every time the duplicate library is loaded, and for other platforms you only the warning the first time a dup library is loaded, correct? |
Also, for OpenJ9 this isn't a change in behavior from the previous release? But now OpenJDK has fixed AIX to only show the warning the first time, and OpenJ9 will make that change in the next release. |
Correct.
Correct.
Correct. Updated the issue description. |
So this means that now AIX systems can detect whether an agent was previously loaded or not if the agent was loaded through a platform-independent name or an absolute path to the platform-dependent library? Now, on AIX also if the
@pshipton @JasonFengJ9 - As per #1140, "For Java 21 and later, the warnings are issued when an agent is loaded dynamically into a running VM after startup without specifying the -XX:+EnableDynamicAgentLoading option and the same agent wasn't loaded before."
|
This hasn't happened yet until eclipse-openj9/openj9#18881 is approved & merged.
On AIX if the -XX:+EnableDynamicAgentLoading option is NOT set, the warning will be displayed but unlike other platforms, multiple warnings instead of a single warning will be displayed if the library is loaded more than once?
Good catch. The existing context is correct instead: |
So, should I be documenting this as of now or should I keep it ready and reviewed and it can be merged as and when it is approved? |
The PR won't be merged into |
Could you clarify what you meant by "This doc is for the
|
What changed is that in 21.0.2 the Hotspot behavior changed so that AIX doesn't have this problem any more, but OpenJ9 still has the issue with 21.0.2, it will be resolved in 21.0.3. |
So, what exact change is required in the following topic for release 0.43.0? https://eclipse.dev/openj9/docs/xxenabledynamicagentloading/ Confusion is because of this comment #1264 (comment) |
Just add a note that the AIX problem will be fixed in the next release. |
eclipse-openj9#1264 Added a note in the existing topic -XX:[+|-]EnableDynamicAgentLoading that a fix to restrict the display of multiple warnings will be provided in a future release. Closes eclipse-openj9#1264 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
Reopened and added to 0.44 milestone, to indicate the AIX problem has been resolved via eclipse-openj9/openj9#18881 |
eclipse-openj9#1264 Fix added to restrict display of multiple warnings on loading the same agent on AIX Closes eclipse-openj9#1264 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
eclipse-openj9#1264 Fix added to restrict display of multiple warnings on loading the same agent on AIX Closes eclipse-openj9#1264 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
eclipse-openj9#1264 Fix added to restrict display of multiple warnings on loading the same agent on AIX Closes eclipse-openj9#1264 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
eclipse-openj9#1264 Fix added to restrict display of multiple warnings on loading the same agent on AIX Closes eclipse-openj9#1264 Signed-off-by: Sreekala Gopakumar <sreekala.gopakumar@ibm.com>
Issue or pull request number:
eclipse-openj9/openj9#18845
eclipse-openj9/openj9#17990
Overview:
If an agent library was previously loaded via the command line or AttachAPI dynamically in the AIX platform and a warning message was printed, another loading of the same library will print "WARNING: A JVM TI agent has been loaded dynamically" again.
See #1264 (comment) for more details.
Release target:
Eclipse OpenJ9 0.44
Applies to the following JDK versions:
21 and later
Applies to the following platforms:
AIX
For new command line options:
An agent library can be loaded via an existing command line option
-agentpath:
.When
-XX:-EnableDynamicAgentLoading
is specified, there will be no agent dynamical loading allowed and no more than one warning message to be printed.When
-XX:+EnableDynamicAgentLoading
is specified which is on by default, an agent library can be loaded dynamically viajcmd
commandJVMTI.agent_load
.A workaround to avoid multiple warning messages is to only load the same library once.
FYI @pshipton @tajila
The text was updated successfully, but these errors were encountered: