Skip to content

Fix deadlocks in the GDB attach script - #966

Merged
godlygeek merged 1 commit into
bloomberg:mainfrom
godlygeek:disable_gdb_attach_scheduler_locking
Jul 22, 2026
Merged

Fix deadlocks in the GDB attach script#966
godlygeek merged 1 commit into
bloomberg:mainfrom
godlygeek:disable_gdb_attach_scheduler_locking

Conversation

@godlygeek

Copy link
Copy Markdown
Contributor

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.

@godlygeek godlygeek self-assigned this Jul 21, 2026
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
godlygeek force-pushed the disable_gdb_attach_scheduler_locking branch from d88ed9a to 16bc79d Compare July 21, 2026 23:41
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.18%. Comparing base (776fe15) to head (16bc79d).

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     
Flag Coverage Δ
cpp 92.18% <ø> (-0.04%) ⬇️
python_and_cython 92.18% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@godlygeek
godlygeek merged commit da05564 into bloomberg:main Jul 22, 2026
20 checks passed
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.

3 participants