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

Extension Host holds onto file locks causing builds to fail #68576

Closed
moizgh opened this issue Feb 12, 2019 · 12 comments
Closed

Extension Host holds onto file locks causing builds to fail #68576

moizgh opened this issue Feb 12, 2019 · 12 comments
Assignees
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@moizgh
Copy link

moizgh commented Feb 12, 2019

Issue Type: Bug

using the rush tool to build, Extension host keeps locks on files and rush build fails consistently.

VS Code version: Code 1.31.1 (1b8e830, 2019-02-12T02:21:36.727Z)
OS version: Windows_NT ia32 10.0.14393

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-1680 v4 @ 3.40GHz (16 x 3392)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 63.90GB (55.94GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (7)
Extension Author (truncated) Version
npm-intellisense chr 1.3.0
gitlens eam 9.5.0
tslint eg2 1.0.43
vscode-npm-script eg2 0.3.5
prettier-vscode esb 1.8.1
git-tree-compare let 1.5.0
code-spell-checker str 1.6.10
@alexdima
Copy link
Member

@moizgh AFAIK, the extension host does not hold any locks by itself. Could you figure out which files are locked? (it would help us try to identify which extension holds locks)

@alexdima alexdima added the info-needed Issue requires more information from poster label Feb 13, 2019
@moizgh
Copy link
Author

moizgh commented Feb 13, 2019 via email

@alexdima
Copy link
Member

alexdima commented Feb 14, 2019

@moizgh When this happens, can you please use ProcessExplorer or similar software to identify the process id which is holding on to the file?

e.g. https://social.technet.microsoft.com/Forums/windowsserver/en-US/504017c7-1a92-415e-b12c-03d44145e1db/how-to-find-which-process-locked-the-log-file

Once you have identified the process id, can you please include here the command line arguments for it (so we can find out which one of our processes it is)?

@moizgh
Copy link
Author

moizgh commented Feb 14, 2019 via email

@falsandtru
Copy link

I've seen a similar problem since 1.29.x or 1.30.x.

Error: EPERM: operation not permitted, stat ...

This error is caused by even another standalone terminal when vscode launched by code --disable-extensions is running . And this will be resolved by closing vscode. So vscode has almost definitely affected permissions. I'm unable to reproduce this problem on ubuntu so probably this problem can be seen only on windows.

@falsandtru
Copy link

falsandtru commented Feb 15, 2019

Repro:

  1. clone https://github.com/falsandtru/spica on Windows 10
  2. run npm i
  3. launch vscode
  4. launch a standalone terminal
  5. run gulp dist; this will be succeeded.
  6. run gulp dist again; this will be failed by a permission error.
  7. shutdown vscode
  8. run gulp dist; this will be succeeded.

@alexdima
Copy link
Member

@moizgh Can you please use the github UI at #68576 . All your email messages look funny and attachments are not making it through.


@falsandtru Can you please use ProcessExplorer or similar software to identify the process id which is holding on to the file?

e.g. https://social.technet.microsoft.com/Forums/windowsserver/en-US/504017c7-1a92-415e-b12c-03d44145e1db/how-to-find-which-process-locked-the-log-file

Once you have identified the process id, can you please include here the command line arguments for it (so we can find out which one of our processes it is)?

@falsandtru
Copy link

falsandtru commented Feb 15, 2019

@alexandrudima I confirmed Code.exe is the only holder of the directory handler using ProcessExplorer. But I don't know what the command line arguments mean.

@falsandtru
Copy link

@alexandrudima Ah probably you mean this, right?

 ...\spica\node_modules\typescript\lib\tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName ...\AppData\Local\Temp\vscode-typescript\tscancellation-98807ed02d080a987f69.tmp* --locale en --noGetErrOnBackgroundUpdate

@moizgh
Copy link
Author

moizgh commented Feb 15, 2019

vscode bug-edit

@vscodebot vscodebot bot removed the new release label Feb 17, 2019
@alexdima alexdima assigned mjbvz and unassigned alexdima Feb 18, 2019
@alexdima
Copy link
Member

Thank you for following through, from the command line arguments, that looks to be the TypeScript server process that is locking up those files/folders.

@alexdima alexdima added the typescript Typescript support issues label Feb 18, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented Feb 19, 2019

Tracked upstream by microsoft/TypeScript#29856 and similar to microsoft/TypeScript#29407

@mjbvz mjbvz closed this as completed Feb 19, 2019
@mjbvz mjbvz added upstream Issue identified as 'upstream' component related (exists outside of VS Code) and removed info-needed Issue requires more information from poster labels Feb 19, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript Typescript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants