Fix deadlocks in the GDB attach script - #966
Merged
godlygeek merged 1 commit intoJul 22, 2026
Merged
Conversation
We're getting deadlocks in the test suite on Alpine that are caused by the GDB attach script hanging while trying to make function calls in the context of the inferior process. It's not safe to make these calls with scheduler-locking enabled, since that prevents other threads that may be holding mutexes from running and releasing those mutexes, which can mean that when we make these calls, the thread we're running in isn't able to acquire a lock it needs in order to advance, and the GDB scheduler locking is preventing the resource our thread needs from ever being released by another thread. This locking seems to result in an worse problem than what we were trying to fix when we added it. Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
godlygeek
force-pushed
the
disable_gdb_attach_scheduler_locking
branch
from
July 21, 2026 23:41
d88ed9a to
16bc79d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #966 +/- ##
==========================================
- Coverage 92.22% 92.18% -0.04%
==========================================
Files 99 99
Lines 12556 12556
Branches 432 432
==========================================
- Hits 11580 11575 -5
- Misses 976 981 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pradyunsg
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We're getting deadlocks in the test suite on Alpine that are caused by the GDB attach script hanging while trying to make function calls in the context of the inferior process.
It's not safe to make these calls with scheduler-locking enabled, since that prevents other threads that may be holding mutexes from running and releasing those mutexes, which can mean that when we make these calls, the thread we're running in isn't able to acquire a lock it needs in order to advance, and the GDB scheduler locking is preventing the resource our thread needs from ever being released by another thread.
This locking seems to result in an worse problem than what we were trying to fix when we added it.