Enigmatica 2: Expert - E2E

Enigmatica 2: Expert - E2E

2M Downloads

Memory/world leak after ~20 minutes of gameplay

sam23694 opened this issue ยท 17 comments

commented

Modpack version
Enigmatic 2 Expert 1.76a

Issue
Recently I have been receiving crashes after a few hours of game play, with the frequency slowly increasing until today where I can not play for more then 10-20 minutes. The game will simply hang, unresponsive, forcing me to close the window and wait ~10 minutes for it to close or terminate the process.

Diving into the debug log shows me a world leak error, getting to around 130 times on average before it hangs. This occurs every time before it hangs.

[07:02:13] [Server thread/DEBUG] [FML]: The world cfaf6d (Main) may have leaked: first encounter (5 occurrences).

I have allocated 10gb of RAM, tested with 16 as well, but it stays comfortably around 40-75%. I have reinstalled the pack, updated Java in the Twitch launcher, tried many different args. I have tried with certain mods disabled, such as foamfix, betterfps to list a few.

The only additions (which I have tried without as well) are optifine (with tipthescales and betterfps disabled, necessary to run optifine) and simply lights. The world was generated with Realistic Terrain Generation, but that has been removed since.

As for actual debugging in the world, I suspect it could be a strange interaction with dimensions and mobs, so I have killed every mob in and around my base using the kill comand, and removed all "stored" mobs in lasso's etc. There is also a "[THAUMCRAFT]: Stopping aura thread for x" for every single DIM preceding the world leak on every occasion.

I'm approaching end game so I have Astral, blood magic, thaumcraft and botania, all world interaction heavy, set up which may cause the issue.

Logs (Sorry too large for pastebin and gist)
debug.log
latest.log

commented

So, I have already tried combinations of args and memory allocations, but I have tried what you have suggested and there is no change. Today I have also tried playing a fresh singleplayer world and I still receive the world leak.

commented

Was the fresh singleplayer world also made with RTG?

commented

No RTG was removed a while ago, but my main world was generated with it. I'm testing a fresh install of everything now, including fresh world and I still get the error.

Every time the error occurs it seems to be preceded by this

[19:40:44] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:44] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world 1
[19:40:44] [Server thread/INFO] [FML]: Unloading dimension 1
[19:40:44] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:44] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world -1
[19:40:44] [Server thread/INFO] [FML]: Unloading dimension -1
[19:40:44] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:44] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world -11325
[19:40:44] [Server thread/INFO] [FML]: Unloading dimension -11325
[19:40:44] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:44] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world -2
[19:40:44] [Server thread/INFO] [FML]: Unloading dimension -2
[19:40:44] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:44] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world 7
[19:40:44] [Server thread/INFO] [FML]: Unloading dimension 7
[19:40:45] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[19:40:45] [Server thread/INFO] [THAUMCRAFT]: Removing aura cache for world 144
[19:40:45] [Server thread/INFO] [FML]: Unloading dimension 144
[19:40:45] [Thread-69/INFO] [THAUMCRAFT]: Stopping aura thread for dim 7
[19:40:45] [Thread-62/INFO] [THAUMCRAFT]: Stopping aura thread for dim 1
[19:40:45] [Thread-65/INFO] [THAUMCRAFT]: Stopping aura thread for dim -11325
[19:40:45] [Thread-63/INFO] [THAUMCRAFT]: Stopping aura thread for dim -1
[19:40:45] [Thread-67/INFO] [THAUMCRAFT]: Stopping aura thread for dim -2
[19:40:46] [Thread-64/INFO] [THAUMCRAFT]: Stopping aura thread for dim 144

Now on a fresh world the world leak repeats like this

`[20:41:21] [Server thread/DEBUG] [FML]: Gathering id map for writing to world save New World
[20:41:21] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[20:41:21] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[20:41:21] [Server thread/DEBUG] [enderio]: Saving ServerChannelRegister with gen=0
[20:41:41] [Server thread/DEBUG] [FML]: The world 5ed79be8 (New World) may have leaked: seen 10 times.

[20:41:41] [Server thread/DEBUG] [FML]: The world 2798a46d (New World) may have leaked: seen 10 times.

[20:41:41] [Server thread/DEBUG] [FML]: The world 1fd40e10 (New World) may have leaked: seen 10 times.

[20:41:41] [Server thread/DEBUG] [FML]: The world 1f48db77 (New World) may have leaked: seen 10 times.

[20:41:41] [Server thread/DEBUG] [FML]: The world 4fe7bc07 (New World) may have leaked: seen 10 times.

[20:41:41] [Server thread/DEBUG] [FML]: The world 7f21750b (New World) may have leaked: seen 10 times.`

I tried attaching the full log but it wouldn't upload.

commented

From what I have read elsewhere it must be something related to how forge loads/unloads dimensions. This new world already has the DIMs listed by thaumcraft, so thaumcraft must initiate whatever causes the world leak.

commented

You cannot assume that Thaumcraft is the cause of a chunk being loaded, just because it activates a log from Thaumcraft.
Is the new world actually lagging, or do you just see that message?

Edit: That came out rude. I'll have a look at your issue this evening, but short of removing mods I don't think there's much I can do.
Edit2: I won't have time to investigate this evening, but I will asap.

commented

That doesn't sound good :/

Please start by lowering RAM allocation to 8GB, and set these java parameters: -version:1.8+ -XX:+UseG1GC -Dsun.rmi.dgc.server.gcInterval=2147483646 -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M

I doubt that'll fix the issue, but it could make your world playable.

As for the actual cause of the leak, I'm afraid I don't have the time needed to track it down, it could be caused by thousands of different things.

Edit: Please let me know if the arguments and RAM change did anything :)

commented

Hmm. Do you happen to have any Docking Stations from DankNull?

commented

Totally fine, the issue is rather frustrating and I'm grasping at straws as it is.

There is only lag from my near-end game base, no stuttering from RAM hitting 100% or anything, the highest I have seen it get after using the args you suggested is 80%. It will just lock up at a random stage, not responding, and then respond for a few milliseconds. On such an occasion I was watching thaumicjei load its cache in the debug log while locked up, so it doesn't totally crash, however it also doesn't max out my CPU or anything.

No pressure on investigating either, I'm mostly posting here on the off chance there's a known or obvious fix I missed. I will keep working on it.

commented

No, nothing from DankNull

commented

The results are mostly the same, however the world has not yet locked up. The only thing I have changed since the last crash is to add LagGoggles. The debug.log still has the world leak issue, now up to 450.

I suppose the cause is not related to the world leak, and something within the world itself? It doesn't make sense considering I tested with fresh worlds as well. I'll keep running the world until it does lock up with my AE off for now.

commented

Yeah, I don't think it's a memory leak. The message in the debug log only says possible leak anyhow. Would you mind if we continue this in the performance channel on my discord?

commented

No problem

commented

Dammit :P Have you tried adding LagGoggles to find the issue(s)?

commented

I had LagGoggles added before this issue and nothing really lagged, the worst offender being enderio conduits. I removed it in case that was the cause.

I'll try adding it now and see if anything is lagging

commented
commented

Hmm. Could you try turning your AE system off and see if you still lag after the 20 minutes?

commented

We use the issue tracker exclusively for bug reports, development and feature requests. However, this issue appears to be a support request. Please use the support channel on our Discord to get help.