Mekanism

Mekanism

111M Downloads

Server crash & world corrupted trying to use anchor upgrade in digi miner

maxhenkes opened this issue ยท 3 comments

commented

We're on version 292 on Forge 2067 (1.10.2) and one of my players just attempted to chunkload his digital miner with an anchor upgrade and caused the following crash:
http://pastebin.com/FVdr03Ue

The server starts back up automatically and it ended up with this crash right afterwards, I am not sure it is related? (Ignore if not)
http://pastebin.com/rXzazCb6

I'm guessing in the area he attempted to use the miner he also had a lot of extraUtils generators which chunkload if that might be an issue. We don't have any other means of chunkloading atm.

How it happened:

What exactly did you do?
bluesilverxiii - Today at 11:51 PM
Putting all upgrades on the miner in a loaded chunk
CreeperShift - Today at 11:52 PM
Around your base?
bluesilverxiii - Today at 11:52 PM
Yea
CreeperShift - Today at 11:52 PM
So it could have possibly already be chunkloaded there?
bluesilverxiii - Today at 11:52 PM
It is chunkloaded.
CreeperShift - Today at 11:52 PM
And as soon as you put the anchor upgrade in it crashed the server?
bluesilverxiii - Today at 11:53 PM
As soon as it was done installing the upgrade

I can provide more information, just tell me what you need :)

commented

Pretty sure that's because it was already chunkloaded, yeah. FTBUtils had the same issue when it first came out for 1.10.2. Which explains the already existing chunkloading ticket key.

commented

People are chunkloading with exutils on my server, we're a small group and I'm sure he especially follows that rule.

This however is definitely on the side of mekanism as all other chunkloaders, even some that have now been removed because they were obsolete with exutils, played together nicely.

We haven't had another crash since this one tho, so I'm not sure if this was some special case.

commented

I've done some serious research into this issue and after countless tests I can't reproduce or even see how this kind of interaction would be possible. This could have been a concurrency issue or another mod interacting with the ForgeChunkManager chunk multimap incorrectly. Here's a technical description of what I think is going on:

If you take a close look at the log, you can see that there is a conflict between two different key-value pairs, [0@-85,62] and [-85, 62]. Default ChunkPos implementation would return [-85, 62] as its toString() value, but for some reason there's another ChunkPos with toString() returning [0@-85,62]. ForgeChunkManager uses an ImmutableSetMultimap which uses hashes to determine key-value positions, allowing for multiple values to be added to a single key's value collection, but judging from this differing toString() value we're also likely dealing with a different hash. Basically, this is adding ANOTHER key-value pair to the entry set which is making things go wonky and cause the crash.

Ultimately, I'm not at fault for this behavior, although I'm not sure what mod is. Good luck!