Bug - Won't Fix Prolonged network outage causes high memory (and CPU) usage

Atheist Nutter

New member
It's a slightly stupid scenario, but it reproduces reliably and it looks like a memory leak. I left KoLmafia running with the relay browser open and in chat. I then remotely reconfigured my router to drop all outbound HTTP packets. When I came back several hours later, KoLmafia was using all of the memory on offer (64MB) and 100% CPU (although this is probably just because it's out of memory). The gCLI showed a few (less than a whole screen's worth on my netbook) "X has returned an empty page" messages.
 

fronobulax

Developer
Staff member
So? This is interesting but are you really asking someone to spend time to try and resolve it? Without knowing anything more I wonder whether it is a true leak or a simple case of keeping things around for too long while waiting for a response.

I know I sound like a snarky a** but if this really is a problem that needs to be addressed then it would be an interesting challenge for me personally. But I'm not really certain it is worth the effort.
 

Atheist Nutter

New member
If there is no other way to run into this problem, then no it probably doesn't need to be fixed. It's very possible that if you restore network access before it's completely out of memory, it releases everything and there isn't a problem at all. If it's leaking a couple of MB of memory every time there's a network timeout, that isn't great. It's something to be aware of, more than anything else.
 

fronobulax

Developer
Staff member
Since it is repeatable, would you consider running a test to the point just before you start getting out of memory errors? At that point, press the garbage collect button on mafia (far right, top of main interface, tool tip says "Collect Garbage") and see what happens? If a significant amount of memory is freed (see output in the gCLI) then it sounds like some kind of performance constraint is preventing garbage from being collected automagically. If not much is freed then there is probably a structure being kept around waiting for a response that never comes.
 
Top