Repository navigation
fix(etw): retain cleanup authority after original main loss - #972
Merged
Merged
Conversation
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.
Description
When original Electron main, broker, collector, guard and fallback all exit, no original process remains to finish ETW cleanup. Protocol v9 now reserves cleanup authority in a temporary elevated custodian before StartTrace. It retains five verified original process objects and can control only the reserved trace after all five exit. Cleanup does not restart the application or capture. Custodian-only loss fails the sensor and uses the existing cleanup path.
A temporary qualification launch host shares one explicit UAC consent across the batch while main and broker remain normal-token. It accepts only fixed-image collector/cleanup-worker requests from authenticated native children of packaged main, under a bounded lifetime and launch count. It holds no reservation or recovery handles. No service, account, global permission or UAC setting changes. A delayed-reader test exposed an unread-pipe disconnect race; startup now waits for acknowledgment of the validated query-only child reference. Capture exit codes and scan-readiness observations are preserved.
Type of change
Testing
6ede1763: six original-main/custodian cases and all 22 earlier regressions. One host consent, 28 collector launches, two cleanup-worker launches, zero remaining host children. Independent final query returned absence 4201.882e348a, including coverage, witness/count gates and Windows fixtures.ENOENT). No human review is claimed.The temporary custodian must survive outside the original five-process failure set. Qualification used the one-consent activation host; individual ordinary ShellExecute activation, protected installation, durable recovery, sleep/wake, forced real PID/TID reuse and production/path admission remain separate boundaries. Production ETW stays disabled by default.
See the recovery contract and bounded source-bound evidence. The final commit changes documentation/evidence only; runtime and harness remain frozen.
Checklist