Skip to content

Fix tracy deadlock on WaitForSingleObject when unloading within DLLMain#1308

Open
ivan-flink wants to merge 1 commit intowolfpld:masterfrom
ivan-flink:ivan-flink/fix-wait-on-thread-deadlock
Open

Fix tracy deadlock on WaitForSingleObject when unloading within DLLMain#1308
ivan-flink wants to merge 1 commit intowolfpld:masterfrom
ivan-flink:ivan-flink/fix-wait-on-thread-deadlock

Conversation

@ivan-flink
Copy link
Copy Markdown

Fixes: #349

According to Microsoft official guidelines, synchronize with other threads within DLLMain is forbidden because it can cause a deadlock.

https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-best-practices

@ivan-flink ivan-flink force-pushed the ivan-flink/fix-wait-on-thread-deadlock branch from 0ec9bf1 to 40bddad Compare March 18, 2026 16:13
According to Microsoft official guidelines, synchronize with other threads
within DLLMain is forbidden because it can cause a deadlock.
@ivan-flink
Copy link
Copy Markdown
Author

@wolfpld could you please re-run linux job, because the error related to the runner, not the change itself

[build](https://github.com/wolfpld/tracy/actions/runs/23254744136/job/67616969586)
The hosted runner lost communication with the server. Anything in your workflow that terminates the runner process, starves it for CPU/Memory, or blocks its network access can cause this error.

@wolfpld
Copy link
Copy Markdown
Owner

wolfpld commented Mar 19, 2026

@wolfpld could you please re-run linux job

It will keep failing. Ignore it.

@slomp slomp self-requested a review April 8, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows - WaitForSingleObject never signalled when unloading tracy.dll while application remains active

2 participants