Open Warriorrrr opened 2 years ago
Can you retest on the latest Paper version?
Retested on version 234, bug still occurs.
Replicable with the provided example plugin. The server hangs as the block mutation requests a chunk which is completed on the mainThreadProcessor which, after a long tick time out, dies prior to the execution of the setBlock method.
I've been looking into this issue a bit myself today, and it seems like throwing an exception if the current thread is the watchdog thread before it tries to complete it on the mainThreadExecutor fixes the issue. Would this be worth PRing, or is there possibly a better solution?
Expected behavior
The block to be set, and the watchdog thread to not stay paused.
Observed/Actual behavior
The watchdog thread pauses indefinitely, and the plugin that attempted to set the block never finishes shutting down.
Steps/models to reproduce
Reproducible using the code in this gist: https://gist.github.com/Warriorrrr/41345003f00f2482f3abde0335761ca3
The 'changed block' message will never be logged as the thread gets paused after the setType. (latest.log attached below)
Plugin and Datapack List
No plugins aside from the one used to replicate.
Paper version
This server is running Paper version git-Paper-224 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: 42a9c37) You are running the latest version
Other
latest.log jstack.txt
Watchdog thread from the jstack: