microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.33k stars 12.54k forks source link

typescript server keeps crashing #43858

Closed physk closed 3 months ago

physk commented 3 years ago

Issue Type: Performance Issue

unsure what is causing it, happens after i have had vscode open for a while, could be related to remote-ssh

VS Code version: Code 1.55.2 (3c4e3df9e89829dce27b7b5c24508306b151f30d, 2021-04-13T09:35:57.887Z) OS version: Windows_NT x64 10.0.19042 Remote OS version: Linux x64 5.8.0-50-generic

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)| |GPU Status|2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|undefined| |Memory (System)|31.92GB (9.37GB free)| |Process Argv|--crash-reporter-id 527459d9-a9bd-40ca-9783-519ba579304a| |Screen Reader|no| |VM|29%| |Item|Value| |---|---| |Remote|SSH: 192.168.0.190| |OS|Linux x64 5.8.0-50-generic| |CPUs|Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz (16 x 3600)| |Memory (System)|3.81GB (0.27GB free)| |VM|33%|
Process Info ``` CPU % Mem MB PID Process 0 95 23268 code main 0 84 13152 window (Issue Reporter) 0 102 18592 shared-process 0 60 14752 ptyHost 0 7 352 console-window-host (Windows internal process) 0 7 12176 console-window-host (Windows internal process) 0 7 12400 console-window-host (Windows internal process) 0 7 24660 console-window-host (Windows internal process) 0 4 26128 C:\Windows\System32\cmd.exe /c (type "C:\Users\chris\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.0.190-969567591.sh" | ssh -T -D 54957 "192.168.0.190" bash) & exit /b 0 0 8 26648 ssh -T -D 54957 "192.168.0.190" bash 0 5 28728 C:\Windows\System32\cmd.exe /c (type "C:\Users\chris\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.0.190-317322828.sh" | ssh -T -D 50201 "192.168.0.190" bash) & exit /b 0 0 8 29528 ssh -T -D 50201 "192.168.0.190" bash 0 6 30352 console-window-host (Windows internal process) 0 5 30764 C:\Windows\System32\cmd.exe /c (type "C:\Users\chris\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.0.190-693881601.sh" | ssh -T -D 51560 "192.168.0.190" bash) & exit /b 0 0 9 15164 ssh -T -D 51560 "192.168.0.190" bash 0 5 31388 C:\Windows\System32\cmd.exe /c (type "C:\Users\chris\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.0.190-107387454.sh" | ssh -T -D 50446 "192.168.0.190" bash) & exit /b 0 0 8 32012 ssh -T -D 50446 "192.168.0.190" bash 0 5 32264 C:\Windows\System32\cmd.exe /c (type "C:\Users\chris\AppData\Local\Temp\vscode-linux-multi-line-command-192.168.0.190-253938859.sh" | ssh -T -D 50709 "192.168.0.190" bash) & exit /b 0 0 8 32700 ssh -T -D 50709 "192.168.0.190" bash 0 569 22816 window (videoPlay.js - Salt Shakers (Workspace) [SSH: 192.168.0.190] - Visual Studio Code) 0 170 20076 extensionHost 0 65 30724 electron_node serverMain.js 0 161 24096 gpu-process 0 21 26908 crashpad-handler 0 42 29772 utility Remote: SSH: 192.168.0.190 CPU % Mem MB PID Process 0 0 5457 remote agent 0 0 5507 ptyHost 0 0 68237 /usr/bin/zsh 0 0 185109 /usr/bin/zsh 0 0 582443 /usr/bin/zsh 0 0 5546 extensionHost 0 0 5911 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=5546 0 0 6035 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/extensions/bradlc.vscode-tailwindcss-0.5.10/dist/server/index.js --node-ipc --clientProcessId=5546 0 0 6633 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/extensions/ms-azuretools.vscode-docker-1.12.1/dist/dockerfile-language-server-nodejs/lib/server.js --node-ipc --node-ipc --clientProcessId=5546 0 0 6831 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/extensions/dbaeumer.vscode-eslint-2.1.20/server/out/eslintServer.js --node-ipc --clientProcessId=5546 0 0 6875 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/extensions/pranaygp.vscode-css-peek-4.1.3/server/out/server.js --node-ipc --clientProcessId=5546 0 0 21609 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node /home/chris/.vscode-server/extensions/redhat.vscode-yaml-0.18.0/node_modules/yaml-language-server/out/server/src/server.js --node-ipc --clientProcessId=5546 0 0 585945 /home/chris/.vscode-server/data/User/globalStorage/tabnine.tabnine-vscode/binaries/3.3.118/x86_64-unknown-linux-musl/TabNine --client=vscode --no-lsp=true --client-metadata clientVersion=1.55.2 pluginVersion=3.4.3 t9-vscode-AutoImportEnabled=true t9-vscode-TSAutoImportEnabled=true t9-vscode-JSAutoImportEnabled=true vscode-telemetry-enabled=false vscode-remote=true vscode-remote-name=ssh-remote vscode-extension-kind=2 vscode-theme-name=Better Solarized Dark vscode-theme-kind=Dark vscode-machine-id=ed6afef593d18b9cc956d3735fe51882d367fc743ddb45517e3e0243e84bc542 vscode-is-new-app-install=false vscode-session-id=cc90ba4e-1c6e-4c59-933d-fa32116142071619378565910 vscode-language=en vscode-app-name=Visual Studio Code vscode-status-customization=unknown ide-restart-counter=1 0 0 585980 /home/chris/.vscode-server/data/User/globalStorage/tabnine.tabnine-vscode/binaries/3.3.118/x86_64-unknown-linux-musl/TabNine --client=vscode --no-lsp=true --client-metadata clientVersion=1.55.2 pluginVersion=3.4.3 t9-vscode-AutoImportEnabled=true t9-vscode-TSAutoImportEnabled=true t9-vscode-JSAutoImportEnabled=true vscode-telemetry-enabled=false vscode-remote=true vscode-remote-name=ssh-remote vscode-extension-kind=2 vscode-theme-name=Better Solarized Dark vscode-theme-kind=Dark vscode-machine-id=ed6afef593d18b9cc956d3735fe51882d367fc743ddb45517e3e0243e84bc542 vscode-is-new-app-install=false vscode-session-id=cc90ba4e-1c6e-4c59-933d-fa32116142071619378565910 vscode-language=en vscode-app-name=Visual Studio Code vscode-status-customization=unknown ide-restart-counter=1 --no_bootstrap 0 0 587196 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/node --max-old-space-size=3072 /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/extensions/node_modules/typescript/lib/tsserver.js --serverMode partialSemantic --useInferredProjectPerProjectRoot --disableAutomaticTypingAcquisition --cancellationPipeName /tmp/vscode-typescript1000/283abfb780382624d794/tscancellation-40698b9ad6b39ff35467.tmp* --globalPlugins typescript-vscode-sh-plugin --pluginProbeLocations /home/chris/.vscode-server/bin/3c4e3df9e89829dce27b7b5c24508306b151f30d/extensions/typescript-language-features --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation 0 0 5557 watcherService 0 0 587707 /bin/sh -c /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= 0 0 587708 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command= ```
Workspace Info ``` | Remote: SSH: 192.168.0.190; ```
Extensions (43) Extension|Author (truncated)|Version ---|---|--- Bookmarks|ale|13.0.4 bracket-pair-colorizer-2|Coe|0.2.0 auto-rename-tag|for|0.1.6 vscord|Leo|3.2.3 remote-containers|ms-|0.166.1 remote-ssh|ms-|0.65.4 remote-ssh-edit|ms-|0.65.4 remote-wsl|ms-|0.54.6 vscode-remote-extensionpack|ms-|0.20.0 brackets-keybindings|ms-|0.1.1 vs-keybindings|ms-|0.2.1 material-icon-theme|PKi|4.6.0 nextjs-vscode-snippets|ret|0.1.1 nunjucks|ron|0.3.0 errorlens|use|3.2.6 highlight-matching-tag|vin|0.10.0 vscode-todo-highlight|way|1.0.4 jinja|who|0.0.8 fluent-terminal|Xhe|0.1.0 vscode-tailwindcss|bra|0.5.10 path-intellisense|chr|2.3.0 vscode-eslint|dba|2.1.20 gitlens|eam|11.4.1 prettier-vscode|esb|6.3.2 nunjucks-template|ese|0.3.4 eventlistener-intellisense|fat|0.0.1 headwind|hey|1.7.0 import-sorter|mik|3.3.1 vscode-docker|ms-|1.12.1 brackets-keybindings|ms-|0.1.1 brackets-pack|ms-|0.1.1 vsliveshare|ms-|1.0.4131 vsliveshare-audio|ms-|0.1.91 resourcemonitor|mut|1.0.7 vscode-streamdeck|nic|4.1.5 vscode-nunjucks-formatter|oki|0.1.3 vscode-css-peek|pra|4.1.3 quicktype|qui|12.0.46 vscode-yaml|red|0.18.0 vs-code-prettier-eslint|rve|3.0.2 tabnine-vscode|Tab|3.4.4 shellcheck|tim|0.14.1 html-css-class-completion|Zig|1.20.0 (2 theme extensions excluded)
mjbvz commented 3 years ago

/needsMoreInfo

physk commented 3 years ago

I have a workspace with 5 typescript projects in. (Web, API etc) On a "remote" server (a VM on the same machine as the dev machine)

Each project has a 'yarn dev' which uses nodeamon to rebuild the typescript

The typescript service will crash repeatedly after having the workspace open for a few hours developing. I will get a little popup in the corner saying "the typescript service has crashed unexpectedly 5 times in the last 15 mins" and while this happened it pins my CPU to 100% for a few seconds then typescript will crash again and repeat.

This is not an issue with my code as when this issue is not happening my code transpires properly and runs fine.

This started happening when I created a folder with some files that are shared between the projects (libraries/secrets files for testing that I've written) which when I edit it can be copied into the other projects. this seems to cause the typescript service to crash.

mjbvz commented 3 years ago

Please try collecting the TS Server log from the crashed instance:

  1. Set "typescript.tsserver.log": "verbose"
  2. Restart VS Code and reproduce the problem
  3. Open the TypeScript section of the output panel
  4. At the very top, find the first line that prints to path to the semantic error log file. It should look something like:

    [Info  - 19:54:59.247] <semantic> Log file: /Users/matb/Library/Application Support/Code - Insiders/logs/20200213T104930/exthost55/vscode.typescript-language-features/tsserver-log-ZT2zau/tsserver.log

    That file contains the typescript logs.

Look through that log file for the first error or stack trace you see. If you can share the log, I can also take a look to see if anything stands out

⚠️Warning: The TypeScript log may include information from your workspace, including file paths and source code. If you have any concerns about posting this publicly on Github, just let me know and we can arrange something else. On our side, we only use these logs to investigate issues like this