Repository navigation
fix(gateway): prevent crashes when encoding images on windows - #1016
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 19, 2026 08:35
nixuuu
enabled auto-merge (squash)
November 19, 2026 08:35
This was referenced Nov 19, 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.
Summary
_get_osfhandlecould terminate the gateway process.Fixes: #651
Incident
The reported local gateway at 0.3.0-nightly.75 repeatedly exited with Windows status
0xc0000409and had no liveness failures leading up to the exits. On the affected builds, a pending image publication could replay after reconnect and wait for its 60-second database lease. The encoder crash reproduces on Windows with the same native status. The reporter's log leaves the trigger for each exit undetermined.Verification
0xc0000409during the new Windows regression. Windows run before the fix89027e38. Windows run with the fix89027e38, 26 focused tests passed throughcheck:tmpand 3 Windows-only cases were skipped. Gateway typecheck, scoped lint and the diff check passed. An isolated real sidecar on the same gateway implementation answered 27 probes and authenticated RPCs over 130 seconds before recovering from a forced exit.