Skip to content

Bug Report: Potential memory leak #462

@c0dingnoobi

Description

@c0dingnoobi

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

  1. Join the server
  2. Run netty resource leak monitor on level paranoid
  3. 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 (d67b61f)

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions