Leakchecker
Agent that detects certain memory leaks
Install / Use
/learn @elastic/LeakcheckerREADME
Leakchecker
This project creates a java agent used for checking for certain memory leaks.
Specifically it checks for new java.util.zip.Inflater with no following end()
call which might indicate a native memory leak.
The agent prints out potential new leaks every minute.
Building
make all
Running with test class
The test class is just a simple class that allocates Inflater and sleeps. It should print out that it found one leak, and the stacktrace for the allocation.
java -javaagent:agent/target/leakchecker-agent-1.0-SNAPSHOT.jar -jar agent/target/leakchecker-agent-1.0-SNAPSHOT.jar
Example output:
Potential leaks:
Total: 1
New:
java.lang.RuntimeException: Created: java.util.zip.Inflater@57d5872c
at java.util.zip.Inflater.<init>(Unknown Source)
at java.util.zip.Inflater.<init>(Unknown Source)
at co.elastic.leakchecker.TestMain.main(TestMain.java:8)
Running with Elasticsearch
Copy the agent into the Elasticsearch install directory.
ES_JAVA_OPTS="-javaagent:leakchecker-agent-1.0-SNAPSHOT.jar" bin/elasticsearch
It will report some allocations during startup and plugin loading, which will stay allocated due to various caches. The important part is that it doesn't continue to increase over time.
Related Skills
node-connect
349.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
