Repository navigation
fix(inproc): remove options lock from the handler thread - #2252
Merged
Merged
Conversation
jpnurmi
force-pushed
the
jpnurmi/fix/inproc-options
branch
from
October 27, 2026 11:39
4dab40b to
4500337
Compare
jpnurmi
changed the base branch from
jpnurmi/ref/session-options
to
jpnurmi/ref/envelope-options
October 27, 2026 11:39
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
β Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3f3015b. Configure here.
jpnurmi
force-pushed
the
jpnurmi/fix/inproc-options
branch
from
October 27, 2026 14:34
3f3015b to
5cdee6c
Compare
jpnurmi
changed the base branch from
jpnurmi/ref/envelope-options
to
jpnurmi/ref/session-options
October 27, 2026 14:35
`sentry_close()` holds `g_options_lock` while joining the handler thread, so a crash during `sentry_close()` deadlocked in the `SENTRY_WITH_OPTIONS` of `process_ucontext_deferred()`. Pass the handler thread a counted options reference as its start argument, released when the thread exits. In-handler fallbacks keep using `SENTRY_WITH_OPTIONS`. Fixes: #2244
`startup_inproc_backend()` returned an error after `install_signal_handlers()` failed but left the handler thread running with the options of the failed `sentry_init()`. The next `sentry_init()` kept that thread instead of starting one with its own options.
jpnurmi
force-pushed
the
jpnurmi/fix/inproc-options
branch
from
October 27, 2026 14:42
5cdee6c to
2282203
Compare
Codecov Reportβ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## jpnurmi/ref/session-options #2252 +/- ##
===============================================================
+ Coverage 75.44% 75.68% +0.24%
===============================================================
Files 103 103
Lines 28266 28281 +15
Branches 5194 5199 +5
===============================================================
+ Hits 21324 21405 +81
+ Misses 5596 5529 -67
- Partials 1346 1347 +1 π New features to boost your workflow:
|
mujacica
approved these changes
Oct 27, 2026
JoshuaMoelans
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

sentry_close()holdsg_options_lockwhile joining the handler thread, so a crash duringsentry_close()deadlocked in theSENTRY_WITH_OPTIONSofprocess_ucontext_deferred().Pass the handler thread a counted options reference as its start argument, released when the thread exits. In-handler fallbacks keep using
SENTRY_WITH_OPTIONS.Fixes: #2244