APM Java Agent (Agent.jar) Leaking Native Memory on OpenJ9 JVM
search cancel

APM Java Agent (Agent.jar) Leaking Native Memory on OpenJ9 JVM

book

Article ID: 385881

calendar_today

Updated On:

Products

DX SaaS CA Application Performance Management (APM / Wily / Introscope) CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management SaaS

Issue/Introduction

Over the course of the past several months, we observed a recurring memory leak on several of our OpenJ9 based JVMs:

JVM Version:

bash-5.1$ java -version
openjdk version "1.8.0_382"
IBM Semeru Runtime Open Edition (build 1.8.0_382-b05)
Eclipse OpenJ9 VM (build openj9-0.40.0, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230810_729 (JIT enabled, AOT enabled)
OpenJ9   - d12d10c9e
OMR      - e80bff83b
JCL      - c4d2c2bafb based on jdk8u382-b05)

After a deep dive investigation into the root cause of the native memory leak, we discovered that the source of the leak appears to be related to the use of the APM Java Agent; specifically when we use Agent.jar.   We do not observe the leak when we use AgentNoRedefNoRetrans.jar.

We have generated multiple core dumps over time and we have noticed that when we use the Agent.jar agent, Class instances are loaded multiple times within a given classloader instance.   

Resolution

Workaround:

introscope.agent.deep.entrypoint.enabled=false

introscope.agent.automatic.backend.detection.enabled=false

introscope.agent.deep.instrumentation.visibility.processor.enabled=false

Use a 24/25.x agent