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

Project dependency files remain locked indefinitely #29856

Closed
oliversalzburg opened this issue Feb 8, 2019 · 12 comments
Closed

Project dependency files remain locked indefinitely #29856

oliversalzburg opened this issue Feb 8, 2019 · 12 comments
Assignees
Labels
Duplicate An existing issue was already created

Comments

@oliversalzburg
Copy link

Issue Type: Bug

When I open a project in VS Code, VS Code will lock node_modules folders in my project dependencies, preventing me from running npm install successfully. This worked fine in 1.30.

VS Code version: Code 1.31.0 (7c66f58312b48ed8ca4e387ebd9ffe9605332caa, 2019-02-05T22:35:56.624Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)
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.91GB (37.85GB free)
Process Argv build-utils-ui/build-utils-ui.code-workspace
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
pascal-formatter ale 2.1.0
better-toml bun 0.3.2
bracket-pair-colorizer Coe 1.0.61
vscode-eslint dba 1.8.0
gitlens eam 9.5.0
EditorConfig Edi 0.12.8
JSDocTagComplete Hoo 0.0.2
vscode-esformatter how 1.6.0
output-colorizer IBM 0.1.2
code-beautifier mic 2.1.0
vscode-lebab mrm 2.6.0
vscode-puglint mrm 2.3.0
debugger-for-chrome msj 4.11.1

(1 theme extensions excluded)

@dbaeumer
Copy link
Member

dbaeumer commented Feb 8, 2019

Very likely caused by TypeScript.

@oliversalzburg
Copy link
Author

I've been through this process a couple of times today and it seems like always the same dependencies are the ones that remain locked.

image

This is happening a lot, so if there is any information I can gather to help, please let me know.

@mjbvz
Copy link
Contributor

mjbvz commented Feb 9, 2019

Sounds similar to #29407

Can you please try disabling all extensions, restarting VS Code to reproduce the problem and then sharing the full process details of the process that is holding the file locks

@oliversalzburg
Copy link
Author

When I reproduced it right now on a different machine, this process was having locks open:

"C:\Users\oliver\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\oliver\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\tsserver.js" --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName C:\Users\oliver\AppData\Local\Temp\vscode-typescript\tscancellation-ce678a48cbadcff8df2f.tmp* --locale en --noGetErrOnBackgroundUpdate

I'll check again on the original machine tomorrow. I feel like there was something else going on.

@oliversalzburg
Copy link
Author

Yeah, it always seems to be the tsserver.js process, even though the locked directory does not always contain @types.

@mjbvz mjbvz transferred this issue from microsoft/vscode Feb 11, 2019
@mjbvz mjbvz removed their assignment Feb 11, 2019
@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Feb 14, 2019
@falsandtru
Copy link
Contributor

See also microsoft/vscode#68576

This bug doesn't depend on extensions and seems to happen anywhere in the project directory.

@falsandtru
Copy link
Contributor

Today, on Ubuntu this bug appeared in my haskell project which has no .ts file.

@sheetalkamat
Copy link
Member

Closing this as this is duplicate of #29407

@oliversalzburg
Copy link
Author

oliversalzburg commented Feb 27, 2019

@sheetalkamat I didn't have this issue prior to the latest update, no @types folders are involved in the mix and this affects projects that don't use gulp at all. Are you sure this is related to #29407?

@jasonswearingen
Copy link

@sheetalkamat ocasionally I also have the same issue as @oliversalzburg the node_modules folder becomes locked, not the @types folder. So I do not think this is a dupe of #29407

I only notice when doing a delendency reinstall (using yarn) but I don't know if it's related, just when I notice it.

I used LockHunter on windows to determine the cause of the lock (tsserver, which helped me find this issue).

speculative cause:

yesterday I commented out compileOnSave:true and composite:true in my tsconfig.json and I haven't seen the error occur since. I will add an update if this turns out to not be the case.

@oliversalzburg
Copy link
Author

I remember there was a reply here, explaining to some degree that it is a dupe, but the reply seems to have been removed. Issue is still closed though :( I'll just wait for #29407 to be resolved, then I report again if the issue remains.

@falsandtru
Copy link
Contributor

Probably her fix will cover the cases provided here since she found the core problem: #29407 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

7 participants