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

tree-kill: spawns too many pgrep processes, causing the extension to become unresponsive #90

Closed
butuzov opened this issue May 24, 2020 · 9 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. upstream-tools Issues that are caused by problems in the tools that the extension depends on.

Comments

@butuzov
Copy link
Contributor

butuzov commented May 24, 2020

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go
    • go version go1.14.3 darwin/amd64 (both computers affected macOS 10.13 (macpro 4.1) and 10.14 (MacBook 2015))
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders
    • a most recent version of the vscode created with yarn watchd.
  • Check your installed extensions to get the version of the VS Code Go extension
    • just go (1.14.3)
  • Run go env to get the go development environment details
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/butuzov/Library/Caches/go-build"
GOENV="/Users/butuzov/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/butuzov/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/go-build894571270=/tmp/go-build -gno-record-gcc-switches -fno-common"

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.

{
        // Go
        "go.useLanguageServer": false,
        "go.languageServerFlags": [],
        "go.languageServerExperimentalFeatures": {
            "autoComplete": true,
            "diagnostics": true,
            "documentLink":  true,
            "documentSymbols": true,
            "findReferences": true,
            "format": true,
            "goToDefinition": true,
            "goToImplementation": true,
            "goToTypeDefinition": true,
            "hover": true,
            "rename": true,
            "signatureHelp": true,
            "workspaceSymbols": true,
        },
        "[go]": {
            "editor.formatOnSave": true,
            "editor.rulers": [
                {  "column": 80, "color": "#61bde670"},
                {  "column": 100, "color": "#35ace270"},
                {  "column": 120, "color": "#0053b070"},
            ],
            "editor.snippetSuggestions": "top",
            "editor.codeActionsOnSave": {
                "source.organizeImports": true
            }
        },
        "[go.mod]": {
            "editor.formatOnSave": true,
            "editor.codeActionsOnSave": {
                "source.organizeImports": true,
            },
        },
        "go.formatTool": "goimports",
        // "go.lintTool": "golint",
    
        "go.gotoSymbol.ignoreFolders": [],
        "go.gotoSymbol.includeImports": true,
        "go.gotoSymbol.includeGoroot": false,
    
    
        // "go.lintTool": "golint",
        "go.lintTool": "golangci-lint",
        "go.lintFlags": [
            "--disable-all",
            "--fast",
            "--print-issued-lines=false",
            "--out-format=colored-line-number",
            "--issues-exit-code=0",
            "--enable=deadcode",
            "--enable=gocyclo",
            "--enable=golint",
            "--enable=varcheck",
            "--enable=structcheck",
            "--enable=maligned",
            "--enable=errcheck",
            "--enable=dupl",
            "--enable=ineffassign",
            "--enable=interfacer",
            "--enable=unconvert",
            "--enable=goconst",
            "--enable=gosec",
            "--enable=megacheck"
        ],
        "go.delveConfig": {
            "dlvLoadConfig": {
                "followPointers": true,
                "maxVariableRecurse": 1,
                "maxStringLen": 64,
                "maxArrayValues": 64,
                "maxStructFields": -1
            },
            "apiVersion": 2,
            "showGlobalVariables": true
        },
    
        "go.editorContextMenuCommands": {
            "toggleTestFile": false,
            "addTags": false,
            "removeTags": false,
            "fillStruct": true,
            "testAtCursor": false,
            "testFile": false,
            "testPackage": false,
            "generateTestForFunction": true,
            "generateTestForFile": true,
            "generateTestForPackage": false,
            "addImport": false,
            "testCoverage": true,
            "playground": true,
            "debugTestAtCursor": true
        },  
}

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:

  1. Open the typical main.go
  2. cmd+s few times
  3. see pgrep processes spawned.

Code- OSS Helper

[32307:0524/212738.492110:INFO:CONSOLE(152)] "Extension Host", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (152)
[32307:0524/212738.492232:INFO:CONSOLE(153)] "%cDebugger attached.
 color: red", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (153)
[32307:0524/212738.492311:INFO:CONSOLE(154)] "console.groupEnd", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (154)
[32307:0524/212740.631879:INFO:CONSOLE(139)] "%c WARN color: #993 UNRESPONSIVE extension host, 'ms-vscode.Go' took 85% of 1949.038ms, saved PROFILE here: '/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/exthost-732eca.cpuprofile' [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
[32307:0524/212740.697337:INFO:CONSOLE(143)] "%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5870/b1fad246-b102-4417-8e40-987d28420cf3 color: blue color:", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (143)
[32307:0524/212744.225285:INFO:CONSOLE(152)] "Extension Host", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (152)
[32307:0524/212744.225409:INFO:CONSOLE(153)] "%cDebugger attached.
 color: red", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (153)
[32307:0524/212744.225500:INFO:CONSOLE(154)] "console.groupEnd", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (154)
[32307:0524/212749.476305:INFO:CONSOLE(139)] "%c WARN color: #993 UNRESPONSIVE extension host, 'ms-vscode.Go' took 99% of 5099.625ms, saved PROFILE here: '/var/folders/kj/45dsds7s53948lz3sf0_ddc80000gn/T/exthost-a4b283.cpuprofile' [object Object],[object Object],[object Object],[object Object]", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
[32307:0524/212749.553382:INFO:CONSOLE(143)] "%c[Extension Host] %cdebugger inspector at chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=127.0.0.1:5870/b1fad246-b102-4417-8e40-987d28420cf3 color: blue color:", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/electron-browser/extensionHost.js (143)
[32307:0524/212757.658456:INFO:CONSOLE(144)] "%c  ERR color: #f33 Server returned 422: Error: Server returned 422
    at Object.asText (file:///Volumes/develop/vscode/out/vs/platform/request/common/request.js:19:19)
    at createSlowExtensionAction (file:///Volumes/develop/vscode/out/vs/workbench/contrib/extensions/electron-browser/extensionsSlowActions.js:83:41)
    at async ExtensionsAutoProfiler._processCpuProfile (file:///Volumes/develop/vscode/out/vs/workbench/contrib/extensions/electron-browser/extensionsAutoProfiler.js:131:32)", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (144)
[32307:0524/212901.205451:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.205714:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.205900:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206012:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206194:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206455:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206576:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206671:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.206780:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.206958:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207141:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207244:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207530:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207620:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.207774:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.207884:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212901.208032:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212901.208124:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.516893:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517060:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517150:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517236:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517328:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517669:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517768:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.517851:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.517939:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518018:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518101:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518183:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518272:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518384:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518476:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518557:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212912.518643:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212912.518729:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550162:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.550403:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550495:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.550578:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.550672:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551013:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551110:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551191:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551280:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551364:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551452:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551537:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551627:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551708:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551795:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.551877:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.551968:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.552053:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
[32307:0524/212926.552138:INFO:CONSOLE(44)] "[[object Object]]Cannot read property 'on' of undefined", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (44)
[32307:0524/212926.552224:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)
^C[32307:0524/212927.646430:INFO:CONSOLE(106)] "Extension host terminated unexpectedly. Code:  null  Signal:  SIGINT", source: file:///Volumes/develop/vscode/out/vs/workbench/services/extensions/common/abstractExtensionService.js (106)
[32307:0524/212927.696065:INFO:CONSOLE(30)] "Extension host terminated unexpectedly.", source: file:///Volumes/develop/vscode/out/vs/workbench/browser/parts/notifications/notificationsAlerts.js (30)
[32307:0524/212927.712090:INFO:CONSOLE(139)] "%c WARN color: #993 Canceled: Canceled", source: file:///Volumes/develop/vscode/out/vs/platform/log/common/log.js (139)
 $ butuzov  (⎈  minikube@default)  /Volumes/develop/vscode
 >

Screenshots or recordings

If applicable, add screenshots or recordings to help explain your problem.
image

@butuzov
Copy link
Contributor Author

butuzov commented May 24, 2020

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.

@butuzov
Copy link
Contributor Author

butuzov commented May 25, 2020

Forgot to attach both CPU profiles
Archive.zip

@hyangah hyangah added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 26, 2020
@stamblerre
Copy link
Contributor

stamblerre commented May 27, 2020

Hm, looks like you are encountering an issue with the tree-kill package (or perhaps our usage of it).

[32307:0524/212901.205714:INFO:CONSOLE(45)] "TypeError: Cannot read property 'on' of undefined
	at buildProcessTree (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:92:15)
	at /Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:113:11
	at Array.forEach (<anonymous>)
	at ChildProcess.onClose (/Users/butuzov/.vscode-oss-dev/extensions/ms-vscode.go-0.14.3/node_modules/tree-kill/index.js:108:31)
	at ChildProcess.emit (events.js:210:5)
	at maybeClose (internal/child_process.js:1021:16)
	at Socket.<anonymous> (internal/child_process.js:430:11)
	at Socket.emit (events.js:210:5)
	at Pipe.<anonymous> (net.js:658:12)", source: file:///Volumes/develop/vscode/out/vs/workbench/api/browser/mainThreadExtensionService.js (45)

If I recall correctly, on the original issue, @hyangah mentioned that golangci-lint was causing the problem. If you remove that from your settings, do you still experience this issue?

@butuzov: Is it possible you're encountering something like pkrumins/node-tree-kill#17 (comment)?

@stamblerre
Copy link
Contributor

stamblerre commented May 27, 2020

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.

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/235359 mentions this issue: util: wrap tree-kill in try-catch

@stamblerre stamblerre added the upstream-tools Issues that are caused by problems in the tools that the extension depends on. label May 27, 2020
@stamblerre stamblerre changed the title UNRESPONSIVE extension host tree-kill: spawns too many pgrep processes, causing the extension to become unresponsive May 27, 2020
@hyangah
Copy link
Contributor

hyangah commented May 27, 2020

@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 /usr/bin/pgrep (I've been using) and the pgrep from proctools behave differently inside vscode. In particular, pgrep -P from proctools does not behave as expected but returns all processes.

(base) ~/projects/vscode-go$ $HOMEBREW/bin/pgrep -P 21385 | wc -l
     444
(base) ~/projects/vscode-go$ /usr/bin/pgrep -P 21385 | wc -l
       3
(base) ~/projects/vscode-go$ $HOMEBREW/bin/pgrep -P 21385 | wc -l
     444

tree-kill builds a process tree by invoking pgrep recursively. This incorrect results can easily cause many pgrep calls (but failing to construct the right tree to kill).

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 pgrep from proctools by any chance? If so, do you still see the same issue if you uninstall proctools or teach the vscode to prefer /usr/bin/pgrep?

gopherbot pushed a commit that referenced this issue May 27, 2020
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 <hyangah@gmail.com>
@butuzov
Copy link
Contributor Author

butuzov commented May 27, 2020

@hyangah indeed my pgrep comes form proctools, I didn't notice pgrep comes with pgkill ( I did install ).

 > ls -lah $(dirname $(which pgrep)) | grep [p]grep
lrwxr-xr-x    1 butuzov admin   37 May 24 09:23 pgrep -> ../Cellar/proctools/0.4pre1/bin/pgrep

And after I uninstall protocols, I am no more experience this issue. I am happy, really really happy!

butuzov added a commit to butuzov/dots that referenced this issue May 27, 2020
hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 3, 2020
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
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/236145 mentions this issue: third_party/tree-kill: vendor and fix the pgrep issue

hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 3, 2020
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
gopherbot pushed a commit that referenced this issue Jun 3, 2020
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 <rstambler@golang.org>
hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 4, 2020
The proctools' pgrep is problematic when running with -P.

Fixes golang/vscode-go#90

Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/236538 mentions this issue: third_party/tree-kill: always use the default pgrep on mac

hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 17, 2020
The proctools' pgrep is problematic when running with -P.

Fixes golang/vscode-go#90

Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
hyangah added a commit to hyangah/vscode-go-old that referenced this issue Jun 17, 2020
The proctools' pgrep is problematic when running with -P.

Fixes golang/vscode-go#90

Change-Id: If3e306cd725a7c88873ca40d74c1581e2d695ea4
hyangah added a commit to hyangah/node-tree-kill that referenced this issue Jun 17, 2020
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)
@golang golang locked and limited conversation to collaborators Jun 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. upstream-tools Issues that are caused by problems in the tools that the extension depends on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants