Skip to content

fix(unwinder): Reduce maps buffer stack usage - #2212

Merged
jpnurmi merged 3 commits into
v1from
jpnurmi/fix/unwinder-stack-size
Oct 19, 2026
Merged

jpnurmi merged 3 commits into
v1from
jpnurmi/fix/unwinder-stack-size

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

#2174 brought the SDK unwinder's 4 KiB /proc/self/maps buffer onto the native signal-handler stack in the v1 branch:

Use 512 bytes; preserve oversized lines and address prefixes split across reads without new allocations. GCC 15 -O3, Linux x86-64, Ryzen AI 9 HX 370:

Measurement 4096 B 512 B
Native handler peak (B) 6,344 3,424
Maps lookups, 190 KiB / 1,900 mappings (ms) 0.406 0.490
Maps lookups, 308 KiB / 3,053 mappings (ms) 0.776 0.972

This saves 2,920 bytes of handler stack at the cost of more reads. Lookup timings are warm code/stack lookup pairs: medians of nine rotating batches, excluding unwinding and other crash handling.

#2174 brought the SDK unwinder's 4 KiB `/proc/self/maps` buffer onto
the native signal-handler stack. Use 512 bytes; preserve oversized
lines and address prefixes split across reads without new allocations.

GCC 15 `-O3`, Linux x86-64, Ryzen AI 9 HX 370:

| Measurement | 4096 B | 512 B |
| --- | ---: | ---: |
| Native handler peak (B) | 6,344 | 3,424 |
| Maps lookups, 190 KiB / 1,900 mappings (ms) | 0.406 | 0.490 |
| Maps lookups, 308 KiB / 3,053 mappings (ms) | 0.776 | 0.972 |

This saves 2,920 bytes of handler stack at the cost of more reads.
Lookup timings are warm code/stack lookup pairs: medians of nine
rotating batches, excluding unwinding and other crash handling.
@jpnurmi jpnurmi added the v1 Targets 1.0 (v1 branch) label Oct 16, 2026
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.56%. Comparing base (eaca2f9) to head (594df3a).
⚠️ Report is 1 commits behind head on v1.

Additional details and impacted files
@@            Coverage Diff             @@
##               v1    #2212      +/-   ##
==========================================
+ Coverage   75.48%   75.56%   +0.07%     
==========================================
  Files         105      105              
  Lines       29642    29642              
  Branches     5479     5479              
==========================================
+ Hits        22375    22398      +23     
+ Misses       5851     5820      -31     
- Partials     1416     1424       +8     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jpnurmi
jpnurmi merged commit 839f510 into v1 Oct 19, 2026
67 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/unwinder-stack-size branch October 19, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v1 Targets 1.0 (v1 branch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants