Repository navigation
Name the cause of recorder helper exits and report an unexplained exit only once - #218
Merged
Merged
Conversation
…t only once The helper's watchdog exits (codes 31 to 35) now write a diagnostic line first with the media thread's last stage and the exit code, and a failed cleanup writes a cleanup_failed line naming the step. The client reports helper_exited only when the helper left no diagnostic; an exit that follows the helper's own failure line is already reported through that line. The protocol document lists the exit codes. Closes #216
Views2k
marked this pull request as ready for review
November 18, 2026 03:18
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.
Closes #216
Tools has shown "Recorder process exited" (reason
helper_exited) with only an exit code since October, four PCs in the last four days. TracingWisp.Recorder.exe: exit code 3 is the helper's own failure exit after it writes arecorder_failureline (stagehost_configuration,host_looporhost_exception), and a recoverable transition also ends with 3 when its cleanup fails. Exit code 35 is the watchdog's progress timeout (ProgressTimeoutExit), which wrote nothing. Of the 12 exits in 30 days, 8 already had the helper's own diagnostic beside them, so the board row duplicated a cause that was already reported, and the other 4 had no cause at all.What changed
Helper (
tools/Wisp.RecorderPrototype):helper_timeout, the media thread's last stage and the exit code as a FACILITY_ITFhr. The media thread's stage is published through a shared atomic (StageMarker) so the watchdog thread can read it; the spool-writer deadline uses the same path.cleanup_failedline naming the step (audio_cleanup,capture_cleanup,video_cleanup,spool_cleanup,runtime_cleanup) with its HRESULT, from a separate budget slot so the terminal failure's line is kept.Reason::HelperTimeoutis added to the protocol (diagnostic line only). RECORDER-PROTOCOL.md documents the exit codes.Client (
RecorderProcessClient):helper_exitedis reported as an incident only when the helper left no terminal diagnostic. The decision waits for the stderr drain (2 s cap), since the helper's line can arrive after stdout's EOF. The client failure, theerrorstate event and the service's recovery path (backoff, three attempts, then "Enable clipping to try again") are unchanged.helper_timeoutis accepted from the diagnostic line; the four cleanup stage tokens are in the diagnostic and incident allowlists.Transparent restart already exists in
ClipRecorderService.RequestRecovery, so no change there.Verified
helper_exitedwith its exit code; the stage-coverage test now also checks the cleanup stage tokens.BuildWispRecordertarget; it cannot be compiled here.Unverified