Skip to content
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

Avoid stack overflow in native symbolification when debuginfod returns a file with MiniDebugInfo #639

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

godlygeek
Copy link
Contributor

  • Update our vendored libbacktrace
  • Avoid stack overflow in native symbolification when debuginfod returns a file with MiniDebugInfo
  • Prepare for 1.13.2 release

Fixes #636

@godlygeek godlygeek self-assigned this Jun 27, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.05%. Comparing base (41248ed) to head (1938667).
Report is 94 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #639      +/-   ##
==========================================
+ Coverage   92.55%   93.05%   +0.49%     
==========================================
  Files          91       94       +3     
  Lines       11304    11412     +108     
  Branches     1581     2089     +508     
==========================================
+ Hits        10462    10619     +157     
+ Misses        837      793      -44     
+ Partials        5        0       -5     
Flag Coverage Δ
cpp 93.05% <100.00%> (+7.11%) ⬆️
python_and_cython 93.05% <100.00%> (-2.67%) ⬇️

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

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

The patches had some minor conflicts that needed to be resolved in order
to upgrade:

- `elf_add` gained a new `struct elf_ppc64_opd_data *` parameter (which
  we're able to pass a null pointer for)
- One of our diff hunks can be dropped because it was applied upstream

The changes to `src/vendor/libbacktrace/` itself are all made
automatically by the `regenerate_libbacktrace.sh` script.

Signed-off-by: Matt Wozniski <[email protected]>
If looking up debug info by build id returns a file with MiniDebugInfo
(the `.gnu_debugdata` section), libbacktrace will infinitely recurse,
leading to a stack overflow unless the limit on the maximum number of
open file descriptors is reached before the stack can overflow.

Work around this by ignoring the MiniDebugInfo if we've already
successfully loaded the debug info by its build id.

Signed-off-by: Matt Wozniski <[email protected]>
See changelog for more details.

Signed-off-by: Matt Wozniski <[email protected]>
@godlygeek godlygeek force-pushed the fix_minidebuginfo_crash branch from c0d7631 to 1938667 Compare June 28, 2024 00:31
@godlygeek godlygeek requested a review from pablogsal June 28, 2024 02:02
@pablogsal pablogsal enabled auto-merge (rebase) June 28, 2024 09:29
@pablogsal pablogsal merged commit e7f1b32 into bloomberg:main Jun 28, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Segfault when trying to create flamegraph from native trace
3 participants