mojira.dev

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.

 

 

Comments 12

Is this a Paper only issue or a Vanilla issue? If it's not Vanilla, then it's invalid here and should be brought up to the creators of Paper.

I am a creator of Paper, It is a vanilla issue.

Sorry for my very un-educated approach at this subject, I will try to learn more before giving out a random statement.

Please keep discussions on-topic. Off-topic comments and chatter may be hidden to avoid clutter, enabling us to focus on the information relevant to the bug.

2 more comments

Why the fix version is shown 1.16.4 Pre-release 1? not Future version 1.16+? 1.16.4 Pre-release 1 is still not released.

So what? It will be in it when it is.

 

Is there a specific way to trigger this, or does it just happen randomly? Does it only happen with custom world gen?

If I recall correctly it happens with certain shaders and AMD graphics cards, particularly when changing dimensions through portals.

Incorrect, it is a server side bug that generating chunks if the right scenarios come into play, will crash the server.

Aikar

boq

Community Consensus

Very Important

Crash, World generation

mojang_internal_1

1.16.2, 1.16.3

1.16.4 Pre-release 1

Retrieved