Disallowing the dynamic loading of agents by default

Andrew Dinn adinn at redhat.com
Mon Apr 3 14:19:09 UTC 2017


On 03/04/17 13:23, Alan Bateman wrote:
> On 03/04/2017 07:28, Christoph Engelbert wrote:
> 1. Whether the agent depends on instrumentation of classes in core
> modules (java.base in particular).
> 
> 2. Whether the agent is deployed as a library that load an agent into
> the current VM.
> 
> The combination of #1 and #2 is the problem in the cross-hairs. There
> isn't any desire to disrupt out of process tools that load
> instrumentation agents into a target VM.

Well, Byteman is definitely in the cross hairs by virtue of both counts
if those are the criteria (but I still don't see Byteman as a problem
that requires disruption :-)

That said, I don't quite follow how your last statement relates to the
proposed change. It reads to me as if EnableDynamicAgentLoading=true is
intended to stop out of process loading of instrumentation agents like
Byteman as well as foil code that hoists an agent into the current JVM
process. Have I misread the proposed behaviour? Or have I read it right?
(with the corollary, I assume, that here you are you merely setting out
what you would prefer to implement in contrast to what you can actually
achieve).

Also, can you provide a reason why you are so agin agent-hoisting from
within a JVM? Is there a reason why it is such a cardinal sin?

regards,


Andrew Dinn
-----------
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander


More information about the jigsaw-dev mailing list