AllTheMods / Gravitas2

repo for ATM Gravitas sequel
21 stars 36 forks source link

Hangs on too much memory allocation and gets killed #70

Open Seegras opened 10 months ago

Seegras commented 10 months ago

There is no error message, and no crash-log, as it gets usually killed by the OOM-killer: [416990.398362] Out of memory: Killed process 1145328 (java) total-vm:39100136kB, anon-rss:26370808kB, file-rss:2545060kB, shmem-rss:0kB, UID:1000 pgtables:59752kB oom_score_adj:0

It has 10GB allocated, but as you can see, java tries to allocate a lot more memory than that (around 39GB). I'm assuming the modpack somehow triggers a bug in java itself.

I noticed it tends to happen after using waystones (not immediately, usually it starts stuttering and then hangs and finally crashes few seconds later), and it's more likely to crash the farther away I teleported with the waystones. 500 blocks is usually ok, 2000 blocks might be ok, but another teleport (even back to where I just ported from) over that distance will crash it, 4000 blocks will almost certainly lead to a crash later. It's also possible to get the same result by just traveling. It also might have something to do with the distance to spawn.

It also does not appear to be related to memory leaks that afflict the client as whole: exit to menu and reloading the save will reset the crashiness.

My assumption right now is a) TFC does something to far out lands when you visit them. Like keeping tabs on something there, even when the chunks are supposed to be unloaded. b) this makes java allocate memory, not related to the memory statically given to java upon startup. c) at some time, this becomes too much. And that is not related to the chunks traveled over, but rather the distance between either the two points, or the distance to spawn. Like if I visit something 4000 blocks out, it starts calculating/loading something for all these 4000 blocks; even if I don't even load these but use a waystone.

The bug is probably within TFC, not specific to ATM Gravitas, and thus upstream.

RCencelj commented 8 months ago

I believe I'm experiencing the same thing, though I'm allocating 7GB's and it's eating all the way to 10 and up. Did not use any waystones whatsoever, I did travel somewhat far though, couple of days (a thousand, two thousand blocks travelled?).