Code:
Problem description:
Randomly on tgstation13's ss13 server, the game will enter some state where the "Out of resources" runtime will trigger (the server has 64gb of ram, so running out of ram isn't gonna be an issue, but running out of 32bit accessible ram might) followed by a bunch of bad list runtimes on anything that accesses our global lists followed by dd fully hanging.
I am trying to figure out how one would go about hunting this down to determine if this is a byond bug or a id10t error in our coding department.
One thing I might suggest is that before you get to that point, run a debug verb a few times (every so often) that dumps all of your types and a count of each.
proc/CountItems() Note that the "in world" list will pick up items that have only circular references, so if as Ter suggests there's some kind of pernicious chain going on, you should see increases in the types of objects involved. |
In order to catch this kind of thing, you have to have a really deep understanding of what code does what and what objects reference what other objects.
Memory leaks generally originate from circular references, though. Look for anything that uses a large number of lists and simultaneously has circular references with those lists or owning objects.