Tiny Skeletons [Forge & Fabric]

Tiny Skeletons [Forge & Fabric]

16M Downloads

[Crash]: 1.19.4 Forge tick timeout in nether

MrKashew opened this issue ยท 4 comments

commented

Mod Loader (Required)

Forge

Minecraft Version (Required)

1.19.4

Mod Version (Required)

v6.0.0

Notes (Required)

Taking a guess in determining it is this mod for tick timeout
here are logs (last 9 occurences of "Server thread" in the latest.log thread dump reference tiny skeletons / puzzles lib?)
attached debug.log in crash report field, latest.log in latest log

Crash Report (Required)

https://gist.github.com/MrKashew/7727a1a8fbd44ac2df3e27fa7cdc3a36

latest.log (Optional)

https://gist.github.com/MrKashew/2be55005fc48fc47e578c8ea3d94e3bf

commented

Can you please upload the crash-report? Those two files are just logs.
Also what did you do for the crash to happen? Can you go a little into detail?

commented

The issue is fixed in Puzzles Lib for 1.20.1. 1.19.4 is no longer supported.

commented

I have a user on Forge 1.20.1 who appears to be experiencing the same issue with Tiny Skeletons 8.0.0 and Puzzles Lib 8.0.23.

They reported the following when talking about using my Better Fortresses mod:

once the game tries generating a majority of the fortress (some underground bits can generate) world generation completely stops, as does everything tick related
placing one with commands seems to work though?
i've had it happen once before in the overworld and earlier i tried going to a nether fortress 3 times
first two locked up, third everything ran fine

Thread dump:
message.txt

Notably, the server thread has a similar stack trace:

"Server thread" prio=5 Id=109 TIMED_WAITING on java.lang.String@15f0dc59
	at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
	-  waiting on java.lang.String@15f0dc59
	at [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:252)
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_5667_(BlockableEventLoop.java:151)
	at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:141)
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerChunkCache.getChunkBlocking(ServerChunkCache.java:1768)
	at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerChunkCache.m_7587_(ServerChunkCache.java:1664)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_6522_(Level.java:187)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_46865_(Level.java:2543)
	...

extended trace:
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_46745_(Level.java:2538)
	at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.m_6436_(Level.java:862)
	at TRANSFORMER/[email protected]/fuzs.tinyskeletons.handler.BabyConversionHandler.createAndSpawnBabyMob(BabyConversionHandler.java:81)
	at TRANSFORMER/[email protected]/fuzs.tinyskeletons.handler.BabyConversionHandler.onEntityLoad(BabyConversionHandler.java:34)
	at TRANSFORMER/[email protected]/fuzs.tinyskeletons.TinySkeletons$$Lambda$6462/0x0000000801b9a858.onEntityLoad(Unknown Source)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl.lambda$static$40(ForgeEventInvokerRegistryImpl.java:305)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$$Lambda$5830/0x0000000801aaba88.accept(Unknown Source)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry.lambda$register$0(ForgeEventInvokerRegistry.java:24)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.api.event.v1.core.ForgeEventInvokerRegistry$$Lambda$5560/0x0000000801a4a630.accept(Unknown Source)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker.lambda$register$1(ForgeEventInvokerRegistryImpl.java:565)
	at TRANSFORMER/[email protected]/fuzs.puzzleslib.impl.event.ForgeEventInvokerRegistryImpl$ForgeEventInvoker$$Lambda$6449/0x0000000801b93758.accept(Unknown Source)
	```
commented

Whoops, looks like I originally closed this when I adjusted the implementation on Fabric, not Forge. The Fabric issues seems unrelated in hindsight...

So the stacktrace points to Level::getCurrentDifficultyAt causing this deadlock when calling Level::getChunk. No clue why a deadlock would happen, works fine on its own. Judging from the line counts in the stacktrace there seems to be a substantial number of mixins involved, so anything is possible I guess.

I've now just simplified the Level::getCurrentDifficultyAt so it does not query any chunk which doesn't really change the mod behavior and shouldn't be able to yield such severe issue.