rwtema / extrautilities_old_issues

Issue tracker
70 stars 45 forks source link

Chunks Refusing to Save (Forge confirmed and replicatable) #675

Open BlackAce21 opened 9 years ago

BlackAce21 commented 9 years ago

After 10 hours of laborious effort from 2 admins and a developer on our server we managed to track down a very vague concurrent modification exception error that we were seeing in our console. Here is a brief overview of the problem.

Issue: Chunk was refusing to save out during unload and due to this any block removed from the chunk would dupe itself by reappearing in the old chunk that didn't save and being in the chunk it was moved to that DID save. The only clue was a CME that happened whenever leaving the chunk and thus unloading it. Pastebin of the exception as seen in the log: http://pastebin.com/R9397Rkt

Process Used: I will try and keep it short but we copied our whole server to a private server to recreate the issue, systematically removing all plugins and mods from the server (we use cauldron but did repeat the problem in forge as well). Eventually I removed Extra Utilities and the problem ceased. From there I moved to inspection of the chunks involved, using a backup I had made prior to removing the mods. After systematically removing as many Extra Utilities blocks in the persons base as I could find I eventually landed on a Trash Can sitting on top of an MFR Deep Storage Unit. Removal of the trash can caused the issue to cease. Creating a new world with a newly generated level.dat and fresh world files produced the same exact issue. The issue is very sporadic and happens in about 80% of chunks tested, it doesn't seem to happen within certain limits near the world spawn protection area although I did not test this extensively. Sufficed to say you can reproduce it if you place any MFR Tile entity or machine next to a trash can in multiple chunks, unload the chunks, and you will see the error. It is NOT limited to MFR Deep Storage Units and seemed to work with any MFR tile entity including conveyer belts and the Rednet Computer

ModPack: Infinity Mod pack version 1.7.0 Extra Utilities Mod version: 1.2.5 Forge versions Tested: 1408 and 1448 (both have the issue) Kcauldron versions Tested: 1408.95

Link to effected region file: https://www.dropbox.com/s/zow6guyh0uo80w6/r.16.14.mca?dl=0 Trash Can Block Location: (x: 8489, y: 61, z: 7393) Mods required to reproduce: Extra Utilties version 1.2.5 Minefactory Reloaded version 2.8.0-104

Comments: I did not test if this was an issue in different versions of the mods involved, honestly after 10 hours I am happy to make my report to you, make a script to stop placement of a trash can next to MFR blocks on my server and hope it gets fixed down the road lol. I will report this issue to both MFR and Extra Utilities Mod devs. If any further information is needed that I missed let me know and I will do my best to get it to you.

For other server owners: I will post a link to my Bukkit based plugin that will stop players from being able to abuse this issue. It will be custom tailored to the issue and should work no matter what item ID your server has the blocks set to. You have my permission in advance to decompile it, modify it, and use it however you wish.

BlackAce21 commented 9 years ago

Link to the plugin mentioned above, config options for disabling the scanner which checks 9 blocks around all players every 10 ticks by default, configurable in frequency for slower servers. Scanner will remove the trash can and try to add it to the players inventory and sends a message explaining. Also a simple block place listener which checks surrounding blocks when placing an MFR machine or trash can for the other and sends a message. Place listener can be disabled in config as well. Alternately banning the trash cans would solve this issue as well.

https://www.dropbox.com/s/1v7cvdi2m55v1li/InfinityBugFixer.jar?dl=0

RoyCurtis commented 9 years ago

For the sake of comparing notes, I too had found this issue but only reported it on the Direwolf20 pack bugs forum, because I was unable to reproduce this bug with only ExUtils and MFR in a pack. FWIW, this issue is still present in DW20 1.5.0.

This may mean that it is a misconfiguration in Direwolf20/Infinity, or that the later version of MFR fixes this issue.

Perhaps I should have reported it here to save the many hours you guys spent; sorry! Thanks for the fix.

xvolution commented 9 years ago

We are also having the same issue with a custom modpack we put together, which has both MFR and Extra Utilities. Blocks and tiles broken in the affected chunks would revert back to their previous states once the chunk was unloaded and reloaded. Checking the server logs, each time the rollback occured the console would throw a ConcurrentModificationError:

[07:34:01] [Server thread/WARN]: at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429) [07:34:01] [Server thread/WARN]: at java.util.HashMap$ValueIterator.next(HashMap.java:1458) [07:34:01] [Server thread/WARN]: at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75820_a(AnvilChunkLoader.java:388) [07:34:01] [Server thread/WARN]: at net.minecraft.world.chunk.storage.AnvilChunkLoader.func_75816_a(AnvilChunkLoader.java:218) [07:34:01] [Server thread/WARN]: at net.minecraft.world.gen.ChunkProviderServer.func_73242_b(ChunkProviderServer.java:358) [07:34:01] [Server thread/WARN]: at net.minecraft.world.gen.ChunkProviderServer.func_73156_b(ChunkProviderServer.java:503) [07:34:01] [Server thread/WARN]: at net.minecraft.world.WorldServer.func_72835_b(WorldServer.java:261) [07:34:01] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:931) [07:34:01] [Server thread/WARN]: at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:431) [07:34:01] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:809) [07:34:01] [Server thread/WARN]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:669) [07:34:01] [Server thread/WARN]: at java.lang.Thread.run(Thread.java:745)

For now we're using the plugin that BlackAce21 provided, and haven't seen a CME yet.

BlackAce21 commented 9 years ago

Posting this for the benefit of my fellow server owners:

" skyboy commented 6 hours ago

There was a minor error in the trashcan's saving method causing this. Next ExtraUtilities update will resolve this. "

He posted that on the MFR issue post I made