Skip to content

fix(native): reduce daemon stack usage - #2211

Open
jpnurmi wants to merge 1 commit into
v1from
jpnurmi/fix/native-stack-size
Open

jpnurmi wants to merge 1 commit into
v1from
jpnurmi/fix/native-stack-size

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

sentry__write_minidump() allocates a ~1.2 MB writer on the stack, including 4,096 memory-map records. Android API 36 e2e tests for #1725 exposed a daemon stack overflow on the crash service's Java worker. Logcat showed SIGSEGV / SEGV_ACCERR before minidump creation.

Heap-allocate minidump_writer_t with SENTRY_MAKE, preserving zero initialization and freeing it on every exit.

Android e2e testing for #1725 exposed a daemon stack overflow: the roughly
1.2 MB local `minidump_writer_t` exceeds the crash service Java worker's
stack, crashing the daemon before it writes a minidump.

Allocate the writer on the heap to avoid exhausting the daemon's stack.

#1725
@jpnurmi
jpnurmi force-pushed the jpnurmi/fix/native-stack-size branch from 277b651 to 7fbd5fa Compare October 16, 2026 15:05
@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

❌ Patch coverage is 23.52941% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.38%. Comparing base (4ce28e7) to head (7fbd5fa).

Additional details and impacted files
@@            Coverage Diff             @@
##               v1    #2211      +/-   ##
==========================================
+ Coverage   75.13%   75.38%   +0.25%     
==========================================
  Files         104      104              
  Lines       29630    29642      +12     
  Branches     5479     5480       +1     
==========================================
+ Hits        22263    22347      +84     
+ Misses       5960     5874      -86     
- Partials     1407     1421      +14     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

1 participant