Many players have experienced persistent server freeze issues after exploring the moon, which can only be fixed with a rollback. My server has taken to calling it the Moon Curse.
Symptoms of the Moon Curse
A player is exploring the Moon, and a stacktrace for a StackOverflowException involving NBTTagCompound code is displayed. Usually the player will get kicked/disconnected from the server at the same time. This is the trigger of the Moon Curse.
Once the Moon Curse has been triggered, the server will start freezing occasionally when players join the server. When it does, the server will stay frozen until the Watchdog thread kills it.
Steps to reproduce
Find a Summoning Altar on the moon
Fly away until the chunk containing the Summoning Altar unloads
Step 2 may need to be repeated multiple times. In my testing I have been able to consistently trigger the Moon Curse in a single pass with one Summoning Altar, but another altar took several passes before it triggered the Moon Curse.
Potential mitigations
Avoid exploring the moon. While the moon has tons of great loot, nothing there is necessary for progression (excluding the Moon quest page). Instead of building a space station using Dilithium, just add a Warp Core block to your rocket to enable travel to the gated planets.
Delete the moon dimension. This is untested, but could work if the issue is isolated to Moon data.
Remove all Summoning Altars you find with creative mode or /setblock
Existing reports about the same issue:
864
933
zmaster587/AdvancedRocketry#1992
Plus many more reports of similar behavior in the official MCEternal Discord server
Technical explanation of the Moon Curse
This is an overview of the information I've been able to derive from attaching a remote debugger to the server process, I'm still unsure on what the root causes are.
Normally, the NBT of the Summoning Altar looks something like this:
When the game attempts to write chunk data to the disk, it has to convert the data in memory to a string. This is done with indirect recursion through the write() (func_74734_a) and writeEntry() (func_150298_a) methods in NBTTagCompound.
I can't explain why, but occasionally the ForgeData tag of the Summoning Altar contains itself. This causes the indirect recursion to continue indefinitely, writing out an NBT tag that looks like this:
After the stackframe limit is reached (about 17k frames on my machine), the File IO Thread will crash with a StackOverflowError. As far as I can tell, the region file isn't actually written, so looking through the region file with an NBT viewer will show nothing amiss.
After the Moon Curse is triggered, players will occasionally cause the server to freeze by joining, even if no one is on the moon. The main server thread sleeps in a loop until an IO operation completes. I assume that this IO operation is stalling for the same reason as the stackoverflow.
Many players have experienced persistent server freeze issues after exploring the moon, which can only be fixed with a rollback. My server has taken to calling it the Moon Curse.
Symptoms of the Moon Curse
Steps to reproduce
Step 2 may need to be repeated multiple times. In my testing I have been able to consistently trigger the Moon Curse in a single pass with one Summoning Altar, but another altar took several passes before it triggered the Moon Curse.
Potential mitigations
Existing reports about the same issue:
864
933
Technical explanation of the Moon Curse
This is an overview of the information I've been able to derive from attaching a remote debugger to the server process, I'm still unsure on what the root causes are.
Normally, the NBT of the Summoning Altar looks something like this:
When the game attempts to write chunk data to the disk, it has to convert the data in memory to a string. This is done with indirect recursion through the
write()
(func_74734_a
) andwriteEntry()
(func_150298_a
) methods in NBTTagCompound.I can't explain why, but occasionally the ForgeData tag of the Summoning Altar contains itself. This causes the indirect recursion to continue indefinitely, writing out an NBT tag that looks like this:
After the stackframe limit is reached (about 17k frames on my machine), the File IO Thread will crash with a StackOverflowError. As far as I can tell, the region file isn't actually written, so looking through the region file with an NBT viewer will show nothing amiss.
After the Moon Curse is triggered, players will occasionally cause the server to freeze by joining, even if no one is on the moon. The main server thread sleeps in a loop until an IO operation completes. I assume that this IO operation is stalling for the same reason as the stackoverflow.