Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only acquire workspace storage locks on the remote extension host #128528

Closed
alexdima opened this issue Jul 13, 2021 · 2 comments
Closed

Only acquire workspace storage locks on the remote extension host #128528

alexdima opened this issue Jul 13, 2021 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders verified Verification succeeded

Comments

@alexdima
Copy link
Member

In some cases, when the extension host is unresponsive, a window reload can lead to the new extension host process not being able to acquire the lock for workspace storage, since it is still held on by the old (unresponsive) extension host process (#128237).

There are even greater concerns that the current way to resolve lock contention (i.e. generating a fresh workspace storage folder e.g. ../${workspaceId}-1) is problematic if extensions store very important data in these folders. e.g. suppose a lock cannot be acquired, the workspace storage folder is changed to ../${workspaceId}-1, the extension writes very important data to ../${workspaceId}-1, VS Code is closed and reopened the next day, when the extension will end up using ../${workspaceId} as the workspace storage folder, missing out on the data written in ../${workspaceId}-1 (#128234).

As a low-risk band-aid, we can limit the acquiring of locks to only the remote extension host, where we have initially observed problems with multiple extension hosts sharing a single workspace storage folder, bringing the local extension host behavior back to what it was in 1.57.x and in the past.

@alexdima alexdima self-assigned this Jul 13, 2021
@alexdima alexdima added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release labels Jul 13, 2021
@alexdima alexdima added this to the June 2021 Recovery 2 milestone Jul 13, 2021
alexdima added a commit that referenced this issue Jul 13, 2021
@alexdima
Copy link
Member Author

To verify:

  • open a remote window.
  • look at the local extension host log and check that it says Skipping acquiring lock...
  • look at the remote extension host log and check that it says Acquiring lock...

@hediet
Copy link
Member

hediet commented Jul 14, 2021

The remote extension host log does not say Acquiring lock..., but instead Lock acquired.. I guess that counts too.

The local extension host reads Skipping acquiring lock for ....

@hediet hediet added the verified Verification succeeded label Jul 14, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants
@hediet @alexdima and others