-
Notifications
You must be signed in to change notification settings - Fork 1.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
Remote extension host terminated unexpectedly 3 times within the last 5 minutes #23906
Comments
Here is the log file 20240805T145926.tar.gz in the remote server This problem appeared after I moved the LXC container from machine A to machine B, when I moved back to A again, the extension worked fine. |
Hi @limstash Thank you much for filing this. Just for the sake of diagnosing where this issue is coming from, are you using pixi for your Python project? |
@anthonykim1 Thanks for your reply, I don't use pixi. It seems that this is an issue unrelated to pixi. I rolled back the versions of Python and Pylance, and the last usable versions were Python v2024.0.1 and Pylance v2024.2.3. When Python v2024.2.0 OR Pylance v2024.3.1 are installed, the extension host crashes. |
For: #23911 and #23906 (For virtual/remote scenario) Locating pixi environment, regardless of presence of pixi environment, is leading to crash. Hoping to address this and handle errors more gracefully so program does not terminate. /cc @baszalmstra
Hello @limstash Thanks for the feedback here.
in your logs so it may be implicitly related to pixi. I just merged in #23937 so hoping this will take of the problem. That being said, the changes should be available starting tomorrow's pre-release version of the Python extension. |
I have additional efforts #23942 which might help you resolve issue. |
Hi @anthonykim1 Thanks for your efforts in investigating and fixing this. After updating to Python Additionally, as I mentioned before, I only encounter this issue when running virtual containers on specific host machines, and their hard drive contents are exactly the same (mirrored). In another host machine, the pixi error still occurs, but it doesn't crash. Output: Python (same disk image on another host machine)2024-08-13 17:07:27.643 [info] Experiment 'pythonCreateEnvOnPipInstall' is active
2024-08-13 17:07:27.643 [info] Experiment 'pythonRecommendTensorboardExt' is active
2024-08-13 17:07:27.643 [info] Experiment 'pythonSurveyNotification' is active
2024-08-13 17:07:27.643 [info] Experiment 'pythonTerminalEnvVarActivation' is active
2024-08-13 17:07:27.643 [info] Experiment 'pythonTestAdapter' is active
2024-08-13 17:07:27.643 [error] Reading directory to watch failed [Error: ENOENT: no such file or directory, scandir '/home/limstash/AMIC/.pixi/envs'
at Object.readdirSync (node:fs:1507:26)
at /home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:586747
at /home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:586938
at Array.map (<anonymous>)
at d.initWatchers (/home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:586656)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async d.ensureWatchersReady (/home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/out/client/extension.js:2:543067)] {
errno: -2,
code: 'ENOENT',
syscall: 'scandir',
path: '/home/limstash/AMIC/.pixi/envs'
}
2024-08-13 17:07:27.643 [error] Dir "/home/limstash/AMIC/.pixi/envs" is not watchable (directory does not exist)
2024-08-13 17:07:27.643 [info] Default formatter is set to null for workspace /home/limstash/AMIC
2024-08-13 17:07:27.651 [info] > conda info --json
2024-08-13 17:07:28.104 [info] > pyenv which python
2024-08-13 17:07:28.104 [info] cwd: .
2024-08-13 17:07:28.567 [info] Shell integration status changed, can confirm it's working.
2024-08-13 17:07:28.820 [info] > ~/.conda/envs/AMIC/bin/python -I ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/interpreterInfo.py
2024-08-13 17:07:28.882 [info] Python interpreter path: ~/.conda/envs/AMIC/bin/python
2024-08-13 17:07:28.894 [info] > conda info --json
2024-08-13 17:07:28.894 [info] shell: bash
2024-08-13 17:07:30.024 [info] > conda run -n AMIC --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/printEnvVariables.py
2024-08-13 17:07:30.024 [info] shell: bash
2024-08-13 17:07:30.025 [info] > conda run -n AMIC --no-capture-output python ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/get_output_via_markers.py ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/printEnvVariables.py
2024-08-13 17:07:30.025 [info] shell: bash
2024-08-13 17:07:30.227 [info] Starting Pylance language server.
2024-08-13 17:07:31.369 [info] > python ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/printEnvVariables.py
2024-08-13 17:07:31.369 [info] shell: bash
2024-08-13 17:07:31.437 [info] > python ~/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/printEnvVariables.py
2024-08-13 17:07:31.437 [info] shell: bash
2024-08-13 17:07:31.445 [info] Setting environment variable CONDA_ROOT in collection to /opt/anaconda3 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.445 [info] Setting environment variable CONDA_PREFIX in collection to /home/limstash/.conda/envs/AMIC {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.445 [info] Setting environment variable CONDA_PROMPT_MODIFIER in collection to (AMIC) {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.445 [info] Setting environment variable CONDA_SHLVL in collection to 2 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.445 [info] Setting environment variable CONDA_DEFAULT_ENV in collection to AMIC {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.446 [info] Prepending environment variable PATH in collection to /home/limstash/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/bin/remote-cli:/home/limstash/.conda/envs/AMIC/bin:/opt/anaconda3/condabin:/opt/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-12.2/bin: {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.446 [info] Setting environment variable CONDA_PREFIX_1 in collection to /opt/anaconda3 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.446 [info] Prepending environment variable PS1 in collection with (AMIC) {"applyAtShellIntegration":true,"applyAtProcessCreation":false}
2024-08-13 17:07:31.447 [info] Send text to terminal: python /home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/printEnvVariablesToFile.py /home/limstash/.vscode-server/extensions/ms-python.python-2024.12.2-linux-x64/python_files/deactivate/bash/envVars.txt
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_ROOT in collection to /opt/anaconda3 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_PREFIX in collection to /home/limstash/.conda/envs/AMIC {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_PROMPT_MODIFIER in collection to (AMIC) {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_SHLVL in collection to 2 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_DEFAULT_ENV in collection to AMIC {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Prepending environment variable PATH in collection to /home/limstash/.vscode-server/cli/servers/Stable-eaa41d57266683296de7d118f574d0c2652e1fc4/server/bin/remote-cli:/home/limstash/.conda/envs/AMIC/bin:/opt/anaconda3/condabin:/opt/anaconda3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-12.2/bin: {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Setting environment variable CONDA_PREFIX_1 in collection to /opt/anaconda3 {"applyAtShellIntegration":true,"applyAtProcessCreation":true}
2024-08-13 17:07:31.484 [info] Prepending environment variable PS1 in collection with (AMIC) {"applyAtShellIntegration":true,"applyAtProcessCreation":false} I can also confirm that this is a regression introduced in v2024.0.1...2024.2.0. |
More specifically, it works with Python This seems to be related to commit bae7d40. |
Hi @anthonykim1, it looks like PR #23942 has been merged. But in the latest pre-release |
I see @limstash Are you able to repro the same problem if you uninstall Python extension and try out different things in VS Code? For example, try launching different language file in your remote connection and see if that also terminates your extension host. |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
Type: Bug
My remote host is in an LXC container, and after installing the Python extension, it prompts "Remote extension host terminated unexpectedly 3 times within the last 5 minutes".
Extension version: 2024.12.1
VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z)
OS version: Windows_NT x64 10.0.22635
Modes:
Remote OS version: Linux x64 5.14.0-410.el9.x86_64
Output: Python
Output: Remote - SSH
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: