Skip to content

perf(crash): don't join an in-flight crash sample at exit - #382

Merged
zackees merged 1 commit into
mainfrom
fix/crash-sampler-exit-367
Sep 29, 2026
Merged

zackees merged 1 commit into
mainfrom
fix/crash-sampler-exit-367

Conversation

@zackees

@zackees zackees commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Fixes #367.

Teardown no longer blocks on a sampler that is mid-capture (the ~0.9 s first symbolization of a debug binary). It hands the spool-sink path to the sampler and returns; the sampler deletes the sink after dropping its handle (so Windows can delete it). A done flag under the same mutex closes the exit race. Budget test teardown_detaches_from_a_sampler_that_is_mid_capture asserts <500 ms teardown against a 1.5 s capture and that the sink is removed.

Local: crash tests (19), clippy, fmt, platform Dylint scan pass. Ordinary CI (no ci-full needed; no platform selector added).

@zackees zackees closed this Sep 29, 2026
@zackees zackees reopened this Sep 29, 2026
…oining it

The sampler's first sample symbolizes against the process binary and can
run ~1 s for a debug build; Runtime::drop joined it, so short-lived debug
CLIs blocked at exit. Teardown now hands the sink path to the sampler and
returns when a capture is in flight; the sampler removes the sink once it
has released its handle. Adds a budget test.

Fixes #367
@zackees
zackees force-pushed the fix/crash-sampler-exit-367 branch from 4fcccae to f3f89eb Compare September 29, 2026 20:30
@zackees
zackees merged commit 2995737 into main Sep 29, 2026
6 checks passed
@zackees
zackees deleted the fix/crash-sampler-exit-367 branch September 29, 2026 23:59
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.

perf(crash): short-lived processes block ~0.9 s at exit joining the crash sampler's first symbolization (debug binaries)

1 participant