Bug Report: Potential memory leak
General information
Instance in question is experiencing offheap memory growth indicating native memory leak.
Therefore we ran netty with ResourceLeakDetector on level PARANOID
Stacktrace mentions a potential bytebuf object not being released before garbage collection
https://pastebin.com/UgzGqCMa
Steps to reproduce
- Join the server
- Run netty resource leak monitor on level paranoid
- Unsure how exactly to reproduce mentioned stacktrace - just let server run with players connecting
Sonar dump
[00:46:23 INFO]: [Sonar] Generated dump: {"memory":{"total":"6.4 GiB","max":"15.6 GiB","free":"795.4 MiB","used":"5.6 GiB"},"runtime":{"virtualCores":10,"jvmArguments":["-Xms128M","-Xmx15974M","-Dterminal.jline\u003dfalse","-Dterminal.ansi\u003dtrue","--add-modules\u003djdk.incubator.vector","-XX:+UseG1GC","-XX:+ParallelRefProcEnabled","-XX:MaxGCPauseMillis\u003d200","-XX:+UnlockExperimentalVMOptions","-XX:+DisableExplicitGC","-XX:+AlwaysPreTouch","-XX:G1HeapWastePercent\u003d5","-XX:G1MixedGCCountTarget\u003d4","-XX:InitiatingHeapOccupancyPercent\u003d15","-XX:G1MixedGCLiveThresholdPercent\u003d90","-XX:G1RSetUpdatingPauseTimePercent\u003d5","-XX:SurvivorRatio\u003d24","-XX:+PerfDisableSharedMem","-XX:MaxTenuringThreshold\u003d1","-Dusing.aikars.flags\u003dhttps://mcflags.emc.gs","-Daikars.new.flags\u003dtrue","-XX:G1NewSizePercent\u003d40","-XX:G1MaxNewSizePercent\u003d50","-XX:G1HeapRegionSize\u003d16M","-XX:G1ReservePercent\u003d15"],"vmName":"OpenJDK 64-Bit Server VM","vmVendor":"Eclipse Adoptium","vmVersion":"21.0.6+7-LTS"},"os":{"name":"Linux","arch":"amd64","version":"6.1.0-32-amd64"},"sonar":{"version":"2.1.28 (d67b61fa)","platform":"BUKKIT","gitBranch":"main","gitCommit":"d67b61fa"}}
(Note that this dump has been taken after a restart, the restart included a plugin update - previous plugin version v2.1.26)
Additional information
Since the previous plugin version was outdated - this may already be fixed on latest. However upon investigating mentioned code lines we werent able to confirm an implemented fix therefor we continued to create a ticket - investigating further whether it happens on latest release 2.1.28 (d67b61fa)
I'll look into it once I'm home.
I just tested PandaSpigot 1.8.8 and Paper 1.21.4 and I am unable to reproduce this.
Which Minecraft version is your server running on? Could you also provide a list of plugins?
the server version is 1.21.4 on paper with commit https://github.com/PaperMC/Paper/commit/9b1798d6438107fdf0d5939b79a8cf71f4d16e2c dont know why plugin list and reproducing is required but here you go:
apparently still persistent with d67b61fa354c240d804321c8e4e2c2820e4fd6ed
Could you give https://github.com/jonesdevelopment/sonar/actions/runs/14177621494 a try?
@c0dingnoobi Have you been able to test #463?
Keeping this open since I can't reproduce this nor confirm it has been fixed.