-
Notifications
You must be signed in to change notification settings - Fork 12.2k
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
tsserver keeps a lock on tsconfig.json file #6337
Comments
After some investigation, I noticed the following:
In addition, I didn't find in the tsserver code where config file is ever opened without closing. So is it possible that this is not caused by tsserver? |
We use Code or CodeOSS when built from source as a node execution environment since it is actually node plus chrome :-). That is why the look is help by that process. However @claycephas nicely traced it down to the Code executable running the tsserver. See this comment: microsoft/vscode#1032 (comment) The interesting line is:
As you can see we launch code as a node environment and ask it to execute the tsserver.js IMO the lock might not be tacken by a open / read / close. Could it be that the lock is because of watching the tsconfig.json file ? |
Interestingly, in the latest vscode nightly build the locking seems to be gone. I am on the build of The watcher didn't hold handlers of the file though, I tried @dbaeumer Can you confirm that the locking is fixed in the latest VSCode build? If not I'll keep investigating to seem what could go wrong. |
@dbaeumer ,any news? |
As pointed out in previous comments the lock was taken by the tsserver. See comment #6337 (comment). According to @zhengbli the watching logic has been rewritten. If VSCode was used with typescript@next it could be that the problem is gone. But this can't be confirmed by me since the changed appeared in the tsserver. |
Closed for now, as I found no locks using the tsserver in master. If there is a repro in the future, this issue can be reopened. |
@zhengbli : please see the comment microsoft/vscode#1032 (comment). There is again a nice trace that the tsserver holds the lock. |
@dbaeumer Thanks for the reference. I also saw this lock happened when I was testing on 0.10.6. However it disappears now on recent nightly builds of VSCode with |
@zhengbli here are steps that reproduce the problem in case you want to verify on 1.8.x:
Run handle tsconfig.json and see that the process holding the lock is running the tsserver |
@dbaeumer I did the exact steps and handle showed "No matching handles found." I'm on the latest VSCode build, the commit is 11ab20. I'll try on several other machines to make sure. I saw your VSCode version is 0.10.6, yes on that one I did see the handle being held, but not on the new nightly builds. |
All the details are in microsoft/vscode#1032. Interesting comment is microsoft/vscode#1032 (comment)
The text was updated successfully, but these errors were encountered: