[SPIGOT-6362] ConcurrentModificationException: null --> Server Crash Created: 12/Feb/21  Updated: 29/Jun/22  Resolved: 13/Feb/21

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Tobias Weiher Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: crash, spigot

Attachments: File Minecraft.7z     Text File crash-2021-02-13_00.52.16-server.txt    
Issue Links:
Relates
relates to SPIGOT-6110 Breaking BELL after ringing sometimes... Closed
Version: 3007-Spigot-cd23533-a82b212 (MC: 1.16.5)
Guidelines Read: Yes

 Description   

Whenever a player logs onto the world, something at his region seems to crash the server. I am not entirely sure what to make out of it, but it seems to be due to a piston, probably? I also tried to manually delete the chunks inside the region at the position of this player's position at the time of the crash, so I don't have to reset everything at this region.

Either way, here follows the crash output:

-------------------

Description: Exception ticking world

java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
at java.util.HashMap$KeyIterator.next(HashMap.java:1469)
at net.minecraft.server.v1_16_R3.WorldServer.notify(WorldServer.java:1227)
at net.minecraft.server.v1_16_R3.World.notifyAndUpdatePhysics(World.java:334)
at net.minecraft.server.v1_16_R3.World.a(World.java:310)
at net.minecraft.server.v1_16_R3.World.setTypeAndData(World.java:225)
at net.minecraft.server.v1_16_R3.World.a(World.java:374)
at net.minecraft.server.v1_16_R3.BlockPiston.a(BlockPiston.java:224)
at net.minecraft.server.v1_16_R3.BlockBase$BlockData.a(BlockBase.java:493)
at net.minecraft.server.v1_16_R3.WorldServer.a(WorldServer.java:1299)
at net.minecraft.server.v1_16_R3.WorldServer.ak(WorldServer.java:1289)
at net.minecraft.server.v1_16_R3.WorldServer.doTick(WorldServer.java:346)
at net.minecraft.server.v1_16_R3.MinecraftServer.b(MinecraftServer.java:1105)
at net.minecraft.server.v1_16_R3.DedicatedServer.b(DedicatedServer.java:355)
at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:1008)
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:847)
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164)
at java.lang.Thread.run(Thread.java:748)

-------------------
Some details:

– System Details –
Details:
Minecraft Version: 1.16.5
Minecraft Version ID: 1.16.5
Operating System: Linux (amd64) version 4.15.0-124-generic
Java Version: 1.8.0_275, Private Build
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Private Build
Memory: 2331479352 bytes (2223 MB) / 3092250624 bytes (2949 MB) up to 11453595648 bytes (10923 MB)
CPUs: 4
JVM Flags: 2 total; -Xmx12G -Xms2G
CraftBukkit Information:
Running: CraftBukkit version 2991-Spigot-018b9a0-f3f3094 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT) true
Plugins: {}
Warnings: DEFAULT
Reload Count: 0

-------------------

I thought it might have been due to some plugins, but it also occurs without any plugins... I am not sure, if you need any additional data, but I can offer some up if necessary.
The minimal reproduceable issue can be seen when teleported at the position -606 67 234. It seems to happen ONLY when both regions r.-1.0 and r.-2.0 are present. Removing either one will not trigger this crash.
https://mega.nz/file/Og0EyApQ#LrGp14DqoAOpf0efZTjArUTdTWALoreqlhCluDTA8JE



 Comments   
Comment by md_5 [ 14/Feb/21 ]

You can view the fix here: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/commits/d5c5d998af4dfc868fbbe85a678827dbab3c246c
Update Spigot to receive it

Comment by Tobias Weiher [ 14/Feb/21 ]

Thank you for your time and effort!
How will this 'fix' look like? As it happens on vanilla, I doubt you can prevent this one, right? Will you adapt the error handling and logging?

Comment by md_5 [ 13/Feb/21 ]

Since this is a crash I've added a fix for it

Comment by md_5 [ 13/Feb/21 ]

Happens in Vanilla as well, consider opening a report to bugs.mojang.com

Generated at Tue Apr 22 06:21:06 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.