mojira.dev
MC-302549

Server main thread deadlock during respawn position resolution when the entire world spawn radius is filled with fluids

When the respawn area is completely filled with water, setting the gamerule spawnRadius to higher values can cause the game to freeze completely right after the player respawns.
Commands still work, but world ticks stop (/debug shows 0 ticks in 0s).
If Immediate Respawn is enabled, the player can rotate the camera, but the world does not update.
Exiting the world causes it to remain stuck on “Saving world…”.

The occurrence of this freeze follows a probabilistic distribution that increases with the value of spawnRadius.
At small radii the issue rarely occurs, while the probability of freezing approaches 1 as the radius becomes larger.
The phenomenon does not depend on any specific value but on the gradual increase of spawn radius.

Steps to Reproduce:

  1. Create a new flat world.

  2. Run the following commands:

    /spawnpoint @s ~ ~ ~
    /fill ~-50 ~ ~-50 ~50 ~ ~50 water
    /gamerule spawnRadius 32
    /gamerule doImmediateRespawn true
    

    (Any large spawnRadius value may be used for testing.)

  3. Use /kill to respawn.

  4. If the freeze does not occur immediately, repeat /kill a few times.

Observed Result:

  • The game occasionally or frequently freezes completely after respawn, depending on the spawn radius.

  • Commands remain functional, but no ticks are processed.

  • With Immediate Respawn enabled, the player can still look around.

  • The world never finishes saving after exit.

Comments 2

Can confirm this issue in 1.21.10-rc1 and 1.21.9

Please edit your report to change the Affected Version to the version shown on the Minecraft title screen

FourArtist7779

(Unassigned)

Confirmed

Platform

Important

Chunk loading, Player

1.21.9, 1.21.10 Release Candidate 1, 1.21.10

25w41a

Retrieved