-
Notifications
You must be signed in to change notification settings - Fork 763
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
tree-kill: spawns too many pgrep processes, causing the extension to become unresponsive #90
Comments
This exactly the same bug as microsoft/vscode-go/issues/3191, only difference few saves will trigger it, while in the previous case it was enough few slow saves. This behavior drives me crazy, and guys... I really don't want to use gogland. |
Forgot to attach both CPU profiles |
Hm, looks like you are encountering an issue with the
If I recall correctly, on the original issue, @hyangah mentioned that @butuzov: Is it possible you're encountering something like pkrumins/node-tree-kill#17 (comment)? |
Looks like you're encountering pkrumins/node-tree-kill#17. Seems like a simple workaround would be to at least wrap the tree-kill usage in a try-catch. Edit: The try-catch will not actually fix the issue, but it will at least catch the TypeError. To fix the underlying issue, we will either need to figure out the issue in tree-kill and contribute a fix, or fork and maintain tree-kill ourselves. |
Change https://golang.org/cl/235359 mentions this issue: |
@stamblerre great finding. I looked into the tree-kill code and definitely there is a race condition. But not only that, I also observed the default
I can't say all the pgrep issues users were reporting were due to this, but definitely, this can be one of them. @butuzov are you using |
This change won't actually fix the issue, but it will at least catch the TypeError. Updates #90 Change-Id: I07c47bc1fc91ce674ee21cea8f0f4918a8328366 GitHub-Last-Rev: af1b7dc GitHub-Pull-Request: #99 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/235359 Reviewed-by: Hyang-Ah Hana Kim <[email protected]>
@hyangah indeed my
And after I uninstall protocols, I am no more experience this issue. I am happy, really really happy! |
Invoke the default pgrep (/usr/bin/pgrep) and prevent a buggy pgrep from getting in the way. Fixes golang/vscode-go#90 Change-Id: Iea9944fa8688af7781a8665279ec3ac925b0e770
Change https://golang.org/cl/236145 mentions this issue: |
Until the fix lands upstream, we will vendor tree-kill. (fix will be in a separate CL to make the local modification clear. Updates golang/vscode-go#90 Change-Id: Iea9944fa8688af7781a8665279ec3ac925b0e770
We will need to invoke the default pgrep (/usr/bin/pgrep) and prevent a buggy pgrep from getting in the way. This CL checks in the copy of tree-kill (tree-kill-1.2.2) under third_party. Updates #90 Change-Id: Ibd8d1ecb15a8a09c2d638eabff1c4069eff8c97b GitHub-Last-Rev: 591b59d GitHub-Pull-Request: #167 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/236145 Reviewed-by: Rebecca Stambler <[email protected]>
The proctools' pgrep is problematic when running with -P. Fixes golang/vscode-go#90 Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
Change https://golang.org/cl/236538 mentions this issue: |
The proctools' pgrep is problematic when running with -P. Fixes golang/vscode-go#90 Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
The proctools' pgrep is problematic when running with -P. Fixes golang/vscode-go#90 Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
Use the default pgrep, available since os x mountain lion. proctools' pgrep does not implement `-P` correctly, returns unrelated processes, breaks tree-kill's assumption, and may cause a large number of pgrep processes. Reported in pkrumins#17 (comment) Update golang/vscode-go#90 (comment)
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insidersyarn watchd
.go env
to get the go development environment detailsShare the Go related settings you have added/edited
Run
Preferences: Open Settings (JSON)
command to open your settings.json file.Describe the bug
Pressing "save" (cmd+s) triggering state when vscode starts to overwhelm CPU with spawning new processes (via node module
tree-kill
as I understand). Spawning never stops, so you need to reload vscode.Steps to reproduce the behavior:
pgrep
processes spawned.Code- OSS Helper
Screenshots or recordings
If applicable, add screenshots or recordings to help explain your problem.
The text was updated successfully, but these errors were encountered: