New candidate JEP: 451: Prepare to Disallow the Dynamic Loading of Agents
Jack Shirazi
jacks at fasterj.com
Thu May 18 14:03:56 UTC 2023
Indeed, if this JEP were just about libraries, I wouldn't be objecting.
I'm not sure how something that has been disallowed for four and a half
years is relevant here, clearly I'm not objecting to that, as this JEP
doesn't change anything there. The JEP is more generic and affects
seviceability agents loaded after startup.
The assumption you made in the JEP has no evidence behind it. I saw no
analysis of agents available to the Java ecosystem and which of these
would be hindered, which would be the minimum needed to make that
assumption.
On 17/05/2023 12:47, Ron Pressler wrote:
>
>> On 16 May 2023, at 16:36, Jack Shirazi <jacks at fasterj.com> wrote:
>>
>> Thanks, "These warnings aim to prepare users for a future release which disallows the dynamic loading of agents by default" is pretty clearly deprecating frictionless agent loading. The non-goal part is the attach API, not agent loading.
>>
>> I understand the motivation, and have listed multiple reasons why I feel they are insufficient. But again, I'm happy to accept that my opinion may be the minority, or may be the majority. I'm saying let's try to find out
> A couple of clarifications:
>
> 1. The “frictionless” loading of agents after startup (aka “dynamic loading”) by libraries has been disabled by default in the JDK for the past four and a half years, and it has been impossible for libraries wishing to gain the power of agents not to notice they had to to hack around around that intentional limitation in JDK 9 and later. None of the techniques that such libraries employ could even remotely be described as “frictionless” (e.g. starting a child process that masquerades as a serviceability tool and attaches to the parent process to inject the library’s agent into the parent process).
>
> 2. The assumption is that a minority of serviceability use cases actually require a dynamically loaded agent *by reasonable necessity* (i.e. their use is significantly hindered by loading an agent at startup) rather than by choice.
>
> — Ron
More information about the jdk-dev
mailing list