remote VS Code instances and their subprocesses won't quit automatically
Issue Type: Bug
When local VS Code quits ,some remote VS Code instances and their subprocesses won't quit automatically, such as python language server's processes and pylint processes which cost too much memory(10+Gb of my 32Gb ubuntu server)
Extension version: 0.44.2 VS Code version: Code 1.36.1 (2213894ea0415ee8c85c5eea0d0ff81ecc191529, 2019-07-08T22:59:35.033Z) OS version: Windows_NT x64 10.0.18362 Remote OS version: Linux x64 4.15.0-55-generic
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8809G CPU @ 3.10GHz (8 x 3096) |
| GPU Status | 2d_canvas: enabled flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software oop_rasterization: disabled_off protected_video_decode: unavailable_off rasterization: enabled skia_deferred_display_list: disabled_off skia_renderer: disabled_off surface_synchronization: enabled_on video_decode: enabled viz_display_compositor: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 7.92GB (2.64GB free) |
| Process Argv | --folder-uri vscode-remote://ssh-remote%2Bduyixian.ubuntu.dev/root/workspace/mz-wireless-web |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: duyixian.ubuntu.dev |
| OS | Linux x64 4.15.0-55-generic |
| CPUs | Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz (8 x 1999) |
| Memory (System) | 31.41GB (24.74GB free) |
| VM | 0% |
Can you tell whether the remote extension host is still alive when this happens? Would be helpful if you could get the full process tree from the server.sh process before and after closing the window.
If vscode goes down cleanly, then it should kill the remote EH and extension processes. If the remote EH is left open for some reason, then it should shut down 3 hours later. If it has gone down but there are still extension processes around, then we should file an issue on the extensions for leaking processes.
After some minutes I closed all VS Code instances on local machine, there are no server.sh processes, but some vsls-agent processes and lots of pylint processes
➜ ~ ps aux | grep vsls-agent
root 14568 0.0 0.0 4628 800 ? S Aug02 0:00 /bin/sh -c "/root/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.614/dotnet_modules/vsls-agent" --autoexit --enableRpcInitialize --pipe vscode.0c2895728feede19aca0b6aff572de7f --service https://prod.liveshare.vsengsaas.visualstudio.com/
root 14569 0.0 0.2 3429020 73112 ? SLl Aug02 1:02 /root/.vscode-server/extensions/ms-vsliveshare.vsliveshare-1.0.614/dotnet_modules/vsls-agent --autoexit --enableRpcInitialize --pipe vscode.0c2895728feede19aca0b6aff572de7f --service https://prod.liveshare.vsengsaas.visualstudio.com/
root 28679 0.0 0.0 16284 2624 pts/4 S+ 14:00 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn vsls-agent
➜ ~ pstree -p -s -a 14568
systemd,1 maybe-ubiquity
└─sh,14568 -c...
└─vsls-agent,14569 --autoexit--enableRpcIniti
├─{vsls-agent},14571
├─{vsls-agent},14572
├─{vsls-agent},14573
├─{vsls-agent},14574
├─{vsls-agent},14575
├─{vsls-agent},14584
├─{vsls-agent},27242
└─{vsls-agent},28604
➜ ~ ps aux | grep pylint | wc -l
86
➜ ~ ps aux | grep pylint | tail
root 26427 0.0 0.2 126592 74604 ? S Aug02 0:02 /root/.local/share/virtualenvs/kanjia-pGwJjzah/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/kanjia/tests/grpc_service/test_wl_luckydraw_seller_service.py
root 27452 0.0 0.1 312216 36872 ? Sl Aug02 0:22 /root/.local/share/virtualenvs/kanjia-pGwJjzah/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/kanjia/tests/grpc_service/test_wl_luckydraw_seller_service.py
root 27460 0.0 0.2 126644 74608 ? S Aug02 0:02 /root/.local/share/virtualenvs/kanjia-pGwJjzah/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/kanjia/tests/grpc_service/test_wl_luckydraw_seller_service.py
root 31068 0.0 0.0 16284 1024 pts/4 S+ 14:07 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn pylint
root 31991 0.0 0.1 311952 36932 ? Sl Aug02 0:22 /root/.local/share/virtualenvs/kanjia-pGwJjzah/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/kanjia/tests/actions/test_wl_luckydraw.py
root 31999 0.0 0.1 113912 61904 ? S Aug02 0:01 /root/.local/share/virtualenvs/kanjia-pGwJjzah/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/kanjia/tests/actions/test_wl_luckydraw.py
root 32243 0.0 0.1 311960 36892 ? Sl Aug02 0:23 /root/.local/share/virtualenvs/mz-wireless-web-RAvchBXD/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/mz-wireless-web/tests/test_app.py
root 32251 0.0 0.2 129692 77504 ? S Aug02 0:01 /root/.local/share/virtualenvs/mz-wireless-web-RAvchBXD/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/mz-wireless-web/tests/test_app.py
root 32724 0.0 0.1 311960 36872 ? Sl Aug02 0:24 /root/.local/share/virtualenvs/mz-wireless-web-RAvchBXD/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/mz-wireless-web/tests/test_app.py
root 32732 0.0 0.2 129692 77544 ? S Aug02 0:01 /root/.local/share/virtualenvs/mz-wireless-web-RAvchBXD/bin/python -m pylint --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text /root/workspace/mz-wireless-web/tests/test_app.py
➜ ~ pstree -s -a -p 26427
systemd,1 maybe-ubiquity
└─python,26427 -m pylint--msg-template='{line},{column},{category},{symbol}:
➜ ~ pstree -s -a -p 27452
systemd,1 maybe-ubiquity
└─python,27452 -m pylint--msg-template='{line},{column},{category},{symbol}:
├─{python},27453
└─{python},27464
➜ ~
Please file an issue about this on the live share extension and whatever extension you are using for pylint, thanks.