You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#96760 makes it so the WTP is finalized before the servers have a chance to shut down. When using the MT thread model, the servers yield to the WTP until a command is pushed to them.
During finalizing, the WTP waits for all threads to finish, this locks the main thread. However, the command to finalize the rendering thread happens after the WTP finalizes. So the main thread gets stuck indefinitely.
This bug also impacts any other system that creates a long running thread through the WTP and relies on yielding.
Tested versions
System information
Godot v4.4.dev (2d1dd41) - Pop!_OS 22.04 LTS - X11 - Vulkan (Forward+) - integrated Intel(R) Xe Graphics (TGL GT2) - 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz (8 Threads)
Issue description
The WorkerThreadPool deadlocks in the
main::cleanup()
function during shutdown.This is a regression and I bisected it to 2d1dd41
#96760 makes it so the WTP is finalized before the servers have a chance to shut down. When using the MT thread model, the servers yield to the WTP until a command is pushed to them.
During finalizing, the WTP waits for all threads to finish, this locks the main thread. However, the command to finalize the rendering thread happens after the WTP finalizes. So the main thread gets stuck indefinitely.
This bug also impacts any other system that creates a long running thread through the WTP and relies on yielding.
Steps to reproduce
Minimal reproduction project (MRP)
mt-deadlock.zip
The text was updated successfully, but these errors were encountered: