Skip to content

Fix console hang on first startup after upgrade#12919

Merged
melissa-barca merged 3 commits intomainfrom
bugfix/bootstrap-ext-hang
Apr 14, 2026
Merged

Fix console hang on first startup after upgrade#12919
melissa-barca merged 3 commits intomainfrom
bugfix/bootstrap-ext-hang

Conversation

@melissa-barca
Copy link
Copy Markdown
Contributor

@melissa-barca melissa-barca commented Apr 9, 2026

Addresses #11230.

After upgrading Positron, the first startup can cause the console to hang indefinitely. This is caused by a race condition between bootstrap extension installation and extension scanning. I was only able to reproduce the hang when I had existing bootstrapped extensions in my directory that needed to be upgraded.

With the fix, the extension service waits for bootstrapped extensions to be installed before starting scanning. Instead of the console hanging, users will see a brief pause on the first launch after upgrade while bootstrap extensions install.

Release Notes

New Features

  • N/A

Bug Fixes

QA Notes

@:console @:critical @:extensions

After upgrading Positron, the console should not hang on first launch.

On first startup after upgrade, extensions are scanned from the
pre-bootstrap profile while the shared process installs updated bootstrap
extensions. The subsequent delta-update events disrupt the running
extension host, causing the console to hang for several minutes.

Detect the version mismatch by reading the .version file before scanning
extensions. When a mismatch is found, wait for the shared process to
finish bootstrap installation before proceeding with the extension scan.
This ensures the extension host starts with the correct, post-bootstrap
extension list and eliminates the disruptive delta events.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2026

E2E Tests 🚀
This PR will run tests tagged with: @:console @:critical @:extensions

readme  valid tags

@melissa-barca melissa-barca marked this pull request as draft April 9, 2026 15:49
Match the logging convention used by the existing bootstrap
extension installer, which does not use a prefix.
@melissa-barca melissa-barca requested a review from jmcphers April 10, 2026 17:15
@melissa-barca melissa-barca marked this pull request as ready for review April 10, 2026 17:15
Comment thread src/vs/workbench/services/extensions/electron-browser/nativeExtensionService.ts Outdated
Comment thread src/vs/workbench/services/extensions/electron-browser/nativeExtensionService.ts Outdated
Log a warning when the version file exists but cannot be read, and
catch errors from the bootstrap wait so startup is never blocked.
@melissa-barca melissa-barca requested a review from timtmok April 13, 2026 15:56
@melissa-barca
Copy link
Copy Markdown
Contributor Author

@timtmok do you mind taking a look at this since Jonathan is out?

@timtmok
Copy link
Copy Markdown
Contributor

timtmok commented Apr 13, 2026

@melissa-barca Yes, I'll take a look now 👍

Copy link
Copy Markdown
Contributor

@timtmok timtmok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was easy to reproduce this and the fix works for me!

@melissa-barca melissa-barca dismissed jmcphers’s stale review April 14, 2026 13:32

Implemented requested changes

@melissa-barca melissa-barca merged commit 2d7ba55 into main Apr 14, 2026
35 of 36 checks passed
@melissa-barca melissa-barca deleted the bugfix/bootstrap-ext-hang branch April 14, 2026 13:33
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants