Memory Leak Help
I'm the sysadmin for a heavily modded Minecraft server, keeping all of the different mods playing nice with each other through my own patch mod. I've been using Java for about 7 years now (sidenote: christ), and even worked with it professionally for a while. I'm trying to track down a memory leak that's running the thing to a halt.
Basically, Player objects are getting retained even after the players they correspond to have already disconnected, causing their packets to back up and overflow the heap. I opened the heap dump in Eclipse MAT and was able to figure that out after a lot of OQL, but I can't see what's retaining them. The shortest paths to all GC roots are weak references, and the incoming connections page is crowded by objects that will be freed when the player is.
Would anyone be willing to look over the heap dump with me, or otherwise help out through a call? I'm completely stumped, and I have 50 people relying on me to fix it, so I really need some help.
3 Replies
⌛
This post has been reserved for your question.
Hey @Haiku! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
I'm not posting a link to it here before responses because a) I don't know how much identifying information it has and b) it's a 2 GB zip file plus indices.
Although, clearly whatever is queueing the packets must have a way to reference the player it's giving them to. Problem is, this is my first time using OQL, so I have no idea how to filter out the recursive references.
I was able to filter out the recursive references with this statement:
SELECT * FROM OBJECTS (SELECT OBJECTS inbounds(obj) FROM OBJECTS 18164409 obj) incoming WHERE incoming NOT IN (SELECT AS RETAINED SET * FROM OBJECTS 18164409)
And regardless it turns out that I just wasn't paying enough attention to the paths to the GC roots before. Some mod is indexing a map with player references and accidentally retaining them that way, so that's fixed now.Post Closed
This post has been closed by <@67415933529894912>.