Repository navigation
fix: check update mutex before claiming instance ownership - #336253
Merged
Merged
Conversation
This prevents a manually launched instance from briefly claiming singleton ownership while the update is still completing. Without this ordering, the new instance could make itself discoverable and begin using the shared user data before it detects the update mutex and exits, potentially overlapping with processes from the version being replaced.
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Secondary launches no longer forward to an existing instance while a background update holds the mutex.
Get a fresh assessment by requesting another Copilot review.
Review tier: Balanced
Findings: 1
What changed in this PR
Moves the Windows update mutex check before instance ownership to avoid startup races.
Changes:
- Reorders update mutex validation before IPC ownership.
- Bumps the Windows updater package version.
| File | Description |
|---|---|
src/vs/code/electron-main/main.ts |
Reorders mutex and instance checks. |
build/win32/Cargo.toml |
Bumps updater version. |
build/win32/Cargo.lock |
Synchronizes locked version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Robo (deepak1556)
marked this pull request as draft
September 15, 2026 10:31
auto-merge was automatically disabled
September 15, 2026 10:31
Pull request was converted to draft
Preserve normal secondary instance behavior while a background update is running by first attempting to claim the main IPC server. If another instance already owns it, continue connecting and forwarding the launch without waiting for inno setup. When this process would otherwise become the primary instance, check the updating mutex. Release the provisional IPC server before waiting so other launches cannot connect to a process that has not completed startup, then retry instance ownership after the update finishes.
Robo (deepak1556)
marked this pull request as ready for review
September 15, 2026 11:02
Robo (deepak1556)
enabled auto-merge (squash)
September 15, 2026 11:02
Benjamin Christopher Simmonds (benibenj)
approved these changes
Sep 15, 2026
Christof Marti (chrmarti)
approved these changes
Sep 15, 2026
Robo (deepak1556)
deleted the
robo/fix_locked_user_resources_windows
branch
September 15, 2026 12:33
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

Fixes #335295