I was trying to use the Agent attach feature with a version of Temurin JRE (11.0.17), but ran across an issue.
The AgentLoaders tries to attach using the SafeNativeAgentLoader, however this doesn't appear to work. Here is an excerpt from the failing stacktrace.
exc: java.lang.UnsatisfiedLinkError: Error looking up function 'Agent_OnAttach': /opt/.../jdk-11.0.17+8-jre//bin/java: undefined symbol: Agent_OnAttach
exc: at com.sun.jna.Function.<init>(Function.java:252)
exc: at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:620)
exc: at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:596)
exc: at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:582)
exc: at com.sun.jna.Library$Handler.invoke(Library.java:248)
exc: at net.tascalate.instrument.attach.core.$Proxy123.Agent_OnAttach(Unknown Source)
exc: at net.tascalate.instrument.attach.core.NativeAgentLoader.attach(Unknown Source)
exc: at net.tascalate.instrument.attach.core.SafeNativeAgentLoader.attach(Unknown Source)
exc: at net.tascalate.instrument.attach.api.AgentLoaders$WithArgsCheck.attach(Unknown Source)
exc: at net.tascalate.instrument.attach.api.AgentLoaders.attach(Unknown Source)
The same code is working with the Temurin JDK (11.0.18).