byte-buddy
byte-buddy copied to clipboard
AgentBuilder.LambdaInstrumentationStrategy.ENABLED crashes minecraft server
public static AgentBuilder createAgentBuilder() {
return new AgentBuilder.Default()
.with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION);
}
works, but
public static AgentBuilder createAgentBuilder() {
return new AgentBuilder.Default()
.with(AgentBuilder.RedefinitionStrategy.RETRANSFORMATION)
.with(AgentBuilder.LambdaInstrumentationStrategy.ENABLED);
}
doesn't. my creation logic is
ByteBuddyHelper.createAgentBuilder()
.with(AgentBuilder.Listener.StreamWriting.toSystemError())
.type(ElementMatchers.is(clazz))
.transform((builder, typeDescription, classLoader, module, protectionDomain) -> builder
.visit(
Advice.withCustomMapping().bind(PluginName.class, pluginname)
.to(MethodAdvice.class).on(ElementMatchers.named("j").and(ElementMatchers.takesArguments(argclass)))
)
)
.installOn(ByteBuddyHelper.AGENT);
Server crashes gradually with systems going out step by step, log is too big.
Lambda instrumentation is fairly experimental and I recommend against using it unless using a controlled JVM version that is proven to work with a specific setup.
Is there a crash dump? And what JVM and version ate you using?