OpenBlocks

OpenBlocks

56M Downloads

World leak

LemADEC opened this issue ยท 10 comments

commented

As of Forge 1.12-2 14.23.5.2772 + OpenBlocks-1.12.2-1.8 + OpenModsLib-1.12.2-0.12.1 (no other mods), a world leak is reported in console:

[23:05:19] [Server thread/DEBUG] [FML]: The world 35296bee (New World) may have leaked: seen 35 times.

[23:05:29] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World
[23:06:09] [Server thread/DEBUG] [FML]: The world 68347a75 (New World) may have leaked: seen 40 times.

[23:06:09] [Server thread/DEBUG] [FML]: The world 35296bee (New World) may have leaked: seen 40 times.

[23:06:14] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World
[23:06:59] [Server thread/DEBUG] [FML]: The world 68347a75 (New World) may have leaked: seen 45 times.

[23:06:59] [Server thread/DEBUG] [FML]: The world 35296bee (New World) may have leaked: seen 45 times.

[23:06:59] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World
[23:07:44] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World
commented

What exactly were you doing?

commented

Standing still on a fresh new world.

commented

You need to check the debug.log, not the latest.log.

commented

Can't reproduce then...

commented

For reference, my configuration is slightly changed compared to default, not sure if it's relevant yet:

  • forge configuration is set to disable version check and enable alwaysSetupTerrainOffThread.
  • OpenBlocks configuration is set to disable graves.
  • Java 1.8.0-181
  • Twitch launcher with the Jar launcher (not the native one)
  • extra arguments "-Dfml.readTimeout=60"
  • 12GB allocated.

It seems to be world dependent, maybe due to mobs or blocks in presence? village close by?
Here's a sample debug log where I've loaded a non-leaking world (New World3) just fine, than loaded one triggering the leak (Copy of New World), then reloaded the non-leaking one (New World3).
https://gist.github.com/LemADEC/35c309c33fb62d41f78eccae3584ea03

The first world was fine initially, then second world leaked, then upon reloading, the first world started leaking too.

Worlds and configurations are attached
saves.zip

commented

I checked that and also analyzed heapdump. No references to world left after going back to menu. Do you have any custom JVM settings? They tend to mess those things.

commented

I could reproduce it with 'New World3' and only 1GB allocated.

commented

Ok, so here's a deal with this: all it checks is if GC has marked world object world cleanup. That's why it's just debug - this is way to unpredictable. Unless you actually get into OOM when reloading, I would not consider that as an issue.

commented

So far, the issue always happens right after loading the save (i.e. it doesn't happen after some time elapsed with the map already loaded).

The delay for GC isn't a strict constant but it still happens periodically every 10 to 30 seconds.
In comparison, the same object is reported as leaking after 30+ minutes.
At that point, I think it's clear that something isn't right with that object.

A more pressing question is the intermittent nature of the issue that could be polluting the initial hypothesis. In other words, can this be reproduced without OpenBlocks and its library?
And the answer yes, so it's actually a forge issue, probably related to enabling the alwaysSetupTerrainOffThread option.

commented

Yeah, 12 GB is bit excessive. GC probably chooses to skip cleanup. Anyway, no luck reproducing that on my side.