mojira.dev
MC-169572

Cartographers time out server when searching for structures

When trading with cartographers the server will time out while searching through chunks to get structures for the maps. On my server this occurred when the woodland mansion map trade was unlocked, possibly because a woodland mansion could not be found. The stack was logged on a paper server, but the same bug happens on a vanilla server. The stack trace is as follows:

Server thread dump (Look for plugins here before reporting to Paper!):
[16:50:45 ERROR]: The server is waiting on these chunks: [[( -553,1236) in 'world']]
[16:50:45 ERROR]: ------------------------------
[16:50:45 ERROR]: Current Thread: Server thread
[16:50:45 ERROR]: PID: 33 | Suspended: false | Native: false | State: TIMED_WAITING 

{{{color:#172b4d}Stack:
[16:50:40 ERROR]: sun.misc.Unsafe.park(Native Method)
[16:50:40 ERROR]: java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.IAsyncTaskHandler.bk(IAsyncTaskHandler.java:131)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:120)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:285)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.World.getChunkAt(World.java:330)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.IWorldReader.getChunkAt(IWorldReader.java:87)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.StructureGenerator.getNearestGeneratedFeature(StructureGenerator.java:112)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.ChunkGenerator.findNearestMapFeature(ChunkGenerator.java:69)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.WorldServer.a(WorldServer.java:1661)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.VillagerTrades$k.a(VillagerTrades.java:96)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityVillagerAbstract.a(EntityVillagerAbstract.java:246)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityVillager.eC(EntityVillager.java:808)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityVillager.populateTrades(EntityVillager.java:639)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityVillager.mobTick(EntityVillager.java:154)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityInsentient.doTick(EntityInsentient.java:674)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityLiving.movementTick(EntityLiving.java:2594)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityInsentient.movementTick(EntityInsentient.java:506)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityAgeable.movementTick(EntityAgeable.java:171)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityLiving.tick(EntityLiving.java:2381)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityInsentient.tick(EntityInsentient.java:275)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.EntityVillager.tick(EntityVillager.java:185)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.WorldServer.entityJoinedWorld(WorldServer.java:722)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.WorldServer$$Lambda$3184/1614068161.accept(Unknown Source)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.World.a(World.java:878)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.WorldServer.doTick(WorldServer.java:488)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.MinecraftServer.b(MinecraftServer.java:1239)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.DedicatedServer.b(DedicatedServer.java:417)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.MinecraftServer.a(MinecraftServer.java:1106)
[16:50:40 ERROR]: net.minecraft.server.v1_15_R1.MinecraftServer.run(MinecraftServer.java:933)
[16:50:40 ERROR]: java.lang.Thread.run(Unknown Source)}}

Linked issues

Comments

Mr Harry Jackson

can confirm this happens

violine1101

Thank you for your report!
We're actually already tracking this issue in MC-126244, so I resolved and linked this ticket as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

Please note that we do not accept tickets for modded versions of the game. This includes both mods and third-party server software, such as paper.

If you haven't already, you might like to make use of the search feature in the future to see if the issue has already been reported.

Quick Links:
📓 Issue Guidelines – 💬 Community Support – 📧 Customer Support – 📖 Game Wiki

Zsigmond Németh

Same happens in 1.15.2 vanilla, for me 240k max-tick-time helped with the crash, but from this point all cartographers sell the same map. For the first 5 woodland maps everything went fine, no lag, no crash, but from the sixth, i had to tune up the max-tick-time, and got the same map as no.4 from the next 5 new cartographers. Of course after the ~1 minute lag + reconnecting, because after a ~30+s lag, all the players drop. I use a linux server dedicated, and 2 linux clients on different machines. All is new linux mint X64s with a lot of spare CPU-time and RAM and the newest available java.

Gregor

(Unassigned)

Unconfirmed

(Unassigned)

1.15.1

Retrieved