Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Server Tick Hang Caused by ChiseledBlockEntity LZ4 Sync

RaysWheelchair opened this issue · 0 comments

commented

Mod Version:
Chisels & Bits v1.4.148

Minecraft Version:
1.20.1

Loader/Platform:
Forge 47.2.20

Description:
Upon loading a specific area of the world, the server freezes completely with a ServerHangWatchdog error. The issue is consistently reproducible and directly traceable to ChiseledBlockEntity attempting to sync its data payload using LZ4StorageBasedStorageHandler.

Stack Trace (Excerpts)

mod.chiselsandbits.block.entities.ChiseledBlockEntity.m_6596_
→ ChiseledBlockEntity$LZ4StorageBasedStorageHandler.syncPayloadOnGameThread
→ ChiseledBlockEntity.syncDataToClient
...
net.minecraft.world.level.block.entity.BlockEntity.tick
...
[Server thread/WARN] ServerHangWatchdog: A single server tick took 60.00 seconds

Steps to Reproduce:

Place a chiseled block with a moderately detailed design (exact design unknown due to server freeze).

Restart the server with that chunk saved.

Re-enter the area or load the chunk (either naturally or via teleport).

Server tick hangs immediately after attempting to load the block entity.

What I've Tried:

Removed Chisels & Bits mod entirely — issue still occurs due to saved ChiseledBlockEntity NBT data.

Identified and manually removed block entities via NBTExplorer from r.1.0.mca, chunk [4,28] — resolved the issue.

Reintroducing a different C&B block does not cause the same issue, indicating the original was malformed or oversized.

Suggested Fixes or Mitigations:

Add a hard cap or fail-safe for LZ4StorageBasedStorageHandler.syncPayloadOnGameThread to avoid running indefinitely on the main thread.

Log a warning and drop malformed data instead of freezing the server.

Consider off-thread compression or graceful degradation if deserialization fails.

Additional Info

This occurred on a heavily modded server, but the issue is traceable to a single saved tile entity in a known chunk.

Willing to provide .mca file containing the corrupted block entity upon request.