squaremap

squaremap

1.9k Downloads

Chunky + Squaremap causing server thread to hang?

astridos2go opened this issue ยท 3 comments

commented

I'd like to preface this by saying, these are not the only two mods I have running on my system, but wanted to throw this out here just in case.

I have a Fabric 1.20.1 server running, and recently I decided that I should be pre-loading the map, as to reduce chunk loading lag spikes. However, I noticed that every time I ran chunky radius 3000 and chunky start, it would work for a little while, until the server thread would get deadlocked.

After discovering what a Java stack trace is and how to force a running process to give it to me, I noticed that the Server thread seemed to be waiting on something related to squaremap.

"Server thread" #55 prio=5 os_prio=0 cpu=13814.00ms elapsed=419.53s tid=0x0000fffd8fc35100 nid=1562320 waiting on condition  [0x0000fffd1495d000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
	- parking to wait for  <0x0000000770b186a0> (a java.util.concurrent.CompletableFuture$Signaller)
	at java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
	at java.util.concurrent.CompletableFuture$Signaller.block([email protected]/CompletableFuture.java:1864)
	at java.util.concurrent.ForkJoinPool.unmanagedBlock([email protected]/ForkJoinPool.java:3464)
	at java.util.concurrent.ForkJoinPool.managedBlock([email protected]/ForkJoinPool.java:3435)
	at java.util.concurrent.CompletableFuture.waitingGet([email protected]/CompletableFuture.java:1898)
	at java.util.concurrent.CompletableFuture.join([email protected]/CompletableFuture.java:2117)
	at xyz.jpenilla.squaremap.common.util.chunksnapshot.VanillaChunkSnapshotProvider.fullChunkIfGenerated(VanillaChunkSnapshotProvider.java:59)
	at xyz.jpenilla.squaremap.common.util.chunksnapshot.VanillaChunkSnapshotProvider.lambda$asyncSnapshot$0(VanillaChunkSnapshotProvider.java:31)
	at xyz.jpenilla.squaremap.common.util.chunksnapshot.VanillaChunkSnapshotProvider$$Lambda$9131/0x0000000801440ed0.get(Unknown Source)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run([email protected]/CompletableFuture.java:1768)
	at net.minecraft.class_3738.run(class_3738.java:18)
	at net.minecraft.class_1255.method_18859(class_1255.java:156)
	at net.minecraft.class_4093.method_18859(class_4093.java:23)
	at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:782)
	at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164)
	at net.minecraft.class_1255.method_16075(class_1255.java:130)
	at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:10318)
	at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:758)
	at net.minecraft.class_1255.method_18857(class_1255.java:139)
	at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:743)
	at net.minecraft.server.MinecraftServer.handler$zkl000$carpet$modifiedRunLoop(MinecraftServer.java:11951)
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:650)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265)
	at net.minecraft.server.MinecraftServer$$Lambda$6903/0x0000000800fc7af0.run(Unknown Source)
	at java.lang.Thread.run([email protected]/Thread.java:833)

After (restarting the server to reset the thread), I decided to run

squaremap pauserender overworld

Before calling chunky start, and viola, the server thread did not lock up.

Again, I have multiple mods running, (most of them performance based), but was curious to see if anyone else had encountered this issue before, and if it really is squaremap causing it, or simply the side effect of another mod.

commented

Closing due to lack of response

commented

Same issue perceived on my end. Happens on a 1.20.x server with just Chunky & Squaremap.

commented

Are either of you able to reproduce this on the latest snapshot? I think the changes made to support Folia may have inadvertently fixed this, as I can't reproduce it in local testing (with only squaremap, Chunky, and Fabric API). A 3000-radius overworld pregenned just fine for me without any deadlocks or watchdog crashes, without using /map pauserender overworld.