Skip to content

fix(native): detect daemon startup failure to avoid 10s stall on init - #2349

Merged
jpnurmi merged 3 commits into
v1from
jpnurmi/fix/native-daemon-start
Nov 27, 2026
Merged

jpnurmi merged 3 commits into
v1from
jpnurmi/fix/native-daemon-start

Conversation

@jpnurmi

@jpnurmi jpnurmi commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Originates from the LLM analysis at:

A daemon that failed to exec or exited before signaling ready stalled sentry_init until the 10s ready timeout, e.g. after a failed deployment or a missing +x. The ready wait now returns as soon as the daemon exits, which it detects through the message socket on Linux and the daemon's process handle on Windows.

On Linux, a daemon that failed to exec or exited before signaling
ready stalled `sentry_init` until the ready timeout. Watch the message
socket during the wait, which only becomes readable when the daemon
exits.

Ref: getsentry/sentry-dart#3585
A daemon that `CreateProcess` started but that exited before signaling
ready still stalled `sentry_init` until the ready timeout. Keep the
daemon's process handle and wait on it along with the ready event.

Ref: getsentry/sentry-dart#3585
@jpnurmi jpnurmi changed the title fix(native): detect daemon startup failure to avoid 10s stall on Linux fix(native): detect daemon startup failure to avoid 10s stall on init Nov 27, 2026
@jpnurmi

jpnurmi commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

At first, this only targeted Linux, where the problem was most apparent due to potentially missing +x. However, it turns out the same problem was also partially applicable to Windows. Even if CreateProcess would fail fast, an early exit from the native daemon for other reasons would go unnoticed. Fixed by 9b976cb.

@jpnurmi
jpnurmi merged commit 9900968 into v1 Nov 27, 2026
75 checks passed
@jpnurmi
jpnurmi deleted the jpnurmi/fix/native-daemon-start branch November 27, 2026 13:50
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.

3 participants