Skip to content

Add pthread mutex deadlock detection for debug builds #24607

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jun 18, 2025

This would really have helped in at least detecting the deadlock that was found in #24570 / #24565

@sbc100 sbc100 force-pushed the deadlock_detection branch from a57b588 to 0e10a5e Compare June 18, 2025 23:59
@sbc100 sbc100 requested review from brendandahl, kripken and juj June 18, 2025 23:59
@sbc100 sbc100 force-pushed the deadlock_detection branch from 0e10a5e to efb88c5 Compare June 19, 2025 00:02
@sbc100 sbc100 force-pushed the deadlock_detection branch from efb88c5 to a8d3d3f Compare June 19, 2025 14:20
@sbc100 sbc100 requested review from RReverser and kripken July 7, 2025 17:10
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nits optional)

@sbc100 sbc100 force-pushed the deadlock_detection branch from a8d3d3f to e59d085 Compare July 7, 2025 21:45
@brendandahl
Copy link
Collaborator

I tried out this change and it does cause an assert in test_pthread_cancel.c, though that test is only run in -O3 currently.

@sbc100 sbc100 force-pushed the deadlock_detection branch 2 times, most recently from c06ae77 to cf6ce4a Compare July 8, 2025 21:07
@sbc100 sbc100 enabled auto-merge (squash) July 8, 2025 21:34
@sbc100 sbc100 force-pushed the deadlock_detection branch 3 times, most recently from 2b24c68 to 264052a Compare July 8, 2025 23:02
This would really have helped in at least detecting the deadlock that
was found in emscripten-core#24570 / emscripten-core#24565
@sbc100 sbc100 force-pushed the deadlock_detection branch from 264052a to 42fb00c Compare July 8, 2025 23:40
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.

4 participants