XMLWordPrintable

    • Community Consensus
    • Crash, World generation
    • Very Important

      Original Paper issue reported: https://github.com/PaperMC/Paper/issues/4272

      WorldGenRegion::startsForFeature(n.m.c.SectionPos,n.m.w.l.l.f.StructureFeature)

      is leaking access to the actual World object instead of the WorldGenRegion object by accessing world.getStructureManager()

       

      The WorldGenRegion needs to call StructureFeatureManager::forWorldGenRegion(n.m.s.l.WorldGenRegion) and store that in the WorldGenRegion instance and then startsForFeature needs to use that reference instead.

      With this bug, main thread blocks asking for a chunk, chunk goes to world generation, world generation then asks for a structure, hits real world object which does a .join on the getChunk to wait for main thread to generate the chunk.

      But because main thread is blocked, and the world gen thread is blocked, this dependent chunk can never be completed, resulting in a deadlock and the server crashes.

       

       

            boq [Mojang] Bartosz Bok
            aikar Aikar
            Votes:
            12 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: