MrCrayfish's Furniture Mod: Refurbished

MrCrayfish's Furniture Mod: Refurbished

4M Downloads

Light Switch Block Entity Crashes Server

brianclogan opened this issue ยท 9 comments

commented

It appears that on 1.20.1 fabric, the light switch block, it can cause a crash when updating the tick pattern.

Full error log from the crash:

java.lang.Error: Watchdog
	at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
	at [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:269)
	at net.minecraft.class_1255.method_20813(class_1255.java:151)
	at net.minecraft.class_1255.method_18857(class_1255.java:141)
	at net.minecraft.class_3215.method_12121(class_3215.java:140)
	at net.minecraft.class_3215.method_20586(class_3215.java:123)
	at net.minecraft.class_3215$$Lambda/0x000071a972f16ee0.get(Unknown Source)
	at [email protected]/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
	at net.minecraft.class_1255.method_18859(class_1255.java:156)
	at net.minecraft.class_3215$class_4212.method_18859(class_3215.java:564)
	at net.minecraft.class_1255.method_16075(class_1255.java:130)
	at net.minecraft.class_3215$class_4212.method_16075(class_3215.java:573)
	at net.minecraft.class_1255.method_18857(class_1255.java:139)
	at net.minecraft.class_3215.method_12121(class_3215.java:140)
	at net.minecraft.class_1937.method_8402(class_1937.java:204)
	at net.minecraft.class_4538.method_22342(class_4538.java:156)
	at net.minecraft.class_1937.method_8497(class_1937.java:198)
	at net.minecraft.class_1937.method_8320(class_1937.java:370)
	at net.minecraft.class_7159$class_7161.method_41707(class_7159.java:131)
	at net.minecraft.class_7159.method_41702(class_7159.java:78)
	at net.minecraft.class_7159.method_41706(class_7159.java:65)
	at net.minecraft.class_7159.method_41705(class_7159.java:47)
	at net.minecraft.class_3218.method_8452(class_3218.java:1018)
	at net.minecraft.class_3218.method_8408(class_3218.java:1433)
	at net.minecraft.class_1937.method_30092(class_1937.java:246)
	at net.minecraft.class_1937.method_8652(class_1937.java:213)
	at com.mrcrayfish.furniture.refurbished.blockentity.LightswitchBlockEntity.setNodePowered(LightswitchBlockEntity.java:50)
	at com.mrcrayfish.furniture.refurbished.electricity.IModuleNode.updateNodePoweredState(IModuleNode.java:39)
	at com.mrcrayfish.furniture.refurbished.electricity.IModuleNode.moduleTick(IModuleNode.java:58)
	at com.mrcrayfish.furniture.refurbished.electricity.ElectricityTicker$$Lambda/0x000071a972c8af90.accept(Unknown Source)
	at com.mrcrayfish.furniture.refurbished.electricity.ElectricityTicker.tickSet(ElectricityTicker.java:78)
	at com.mrcrayfish.furniture.refurbished.electricity.ElectricityTicker.tick(ElectricityTicker.java:61)
	at net.minecraft.class_1937.handler$eic000$refurbished_furniture$refurbishedFurniture$TickBlockEntitiesHead(class_1937.java:4553)
	at net.minecraft.class_1937.method_18471(class_1937.java)
	at net.minecraft.class_3218.method_18765(class_3218.java:390)
	at net.minecraft.server.MinecraftServer.method_3813(MinecraftServer.java:897)
	at net.minecraft.class_3176.method_3813(class_3176.java:283)
	at net.minecraft.server.MinecraftServer.method_3748(MinecraftServer.java:824)
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:671)
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:265)
	at net.minecraft.server.MinecraftServer$$Lambda/0x000071a97274c000.run(Unknown Source)
	at [email protected]/java.lang.Thread.runWith(Thread.java:1596)
	at [email protected]/java.lang.Thread.run(Thread.java:1583)

This has happened twice within 5 minutes on our server. Any other information I can provide, let me know and I will be happy to share what I am able to.

commented

Can you please provide the full crash log? I would use a service like https://mclo.gs/ to share it as it will remove sensitive information like IPs.

commented

In server.properties, make sure max-tick-time is not a low number

commented

Will do! Sorry for the delay, I'll get that though when I am home. This whole weekend was just focused on getting the server back to a stable state.

commented

@MrCrayfish https://mclo.gs/8FNhrAZ Sorry again for the delay! If you end up finding that it might be something else, more than happy to share any other logs with you.

commented

Just based on the log, I assume you are using a Fabric + Spigot hybrid server? Although the error looks to be triggered by my mod, it may actually be your server software. I searched up Watchdog, and it seems like a feature built into some Minecraft server softwares. It purposely crashes the server if the time it takes to perform a game tick surpasses the max-tick-time defined in the server configuration, in order to avoid corruption. Try going through your server configuration to boost this value. Adding mods will definitely slow your tick rate, and the default max-tick-time may be only suitable for a minimal amount of mods.

commented

Might not be exactly related by here is the article I found on Watchdog
https://help.ggservers.com/en-us/article/what-is-watchdog-and-why-does-it-crash-my-server-n8aex/

commented

It's just Fabric, no spigot :)

commented

Apologies for the late reply @MrCrayfish! I am not getting any emails from Github right now for some reason. (I will be more diligent on checking notifications on Github though)

Max tick time is set to 60000ms.

commented

I've searched up the error and Dynmap seems to be a potential cause (and the 1.20.1 version is a beta version). Seeing as you have it installed, try removing it.

I am confident that the issue is not caused my mod, simply due to the fact that I am calling vanilla code to update the lightswitch from an unpowered to powered blockstate. This is identical to a vanilla furnace going from an unlit to lit state.

Let me know how that goes