Closed cdeil closed 3 months ago
Please could you enable logging as follows:
Jupyter->Logging
trace
Jupyter
output panel.At first I got very confusing output and my Macbook became sluggish for 5-10 minutes, the MacOS Activity Monitor indicating two pixi processes running at 100% CPU and presumably tons of disk I/O since other apps got very slow and sluggish as well (e.g. the Terminal app) and I have many cores.
However then eventually actually it seems those pixi processes finished and it started to work.
Unfortunately I did not capture the original trace.
Here's the trace I get now with it working as expected I presume: https://gist.github.com/cdeil/37358a9898bd2c572e092a04e133e6b3
Are you able to reproduce the issue if following the step by step instructions in the issue description?
Thank you for the logs. Please can you
print("Hello World")
However then eventually actually it seems those pixi processes finished and it started to work. Unfortunately I did not capture the original trace.
Please can you try to capture this information. From what I can tell theres nothing special thats going on here in the Jupyter extension that would cause the CPU to spin 100%.
Visual Studio Code (1.91.0, undefined, desktop)
Jupyter Extension Version: 2024.6.0.
Python Extension Version: 2024.10.0.
Pylance Extension Version: 2024.7.1.
Platform: darwin (arm64).
Workspace folder ~/code/oss/panel, Home = /Users/cdeil
12:35:28.286 [info] Telemetry level is off
12:35:28.286 [info] Experiments are disabled, only manually opted experiments are active.
12:35:28.449 [debug] Start refreshing Kernel Picker (1720607728449)
12:35:28.463 [trace] Search for KernelSpecs in Interpreter /usr/bin/python3
12:35:28.464 [trace] Search for KernelSpecs in Interpreter /usr/local/bin/python3
12:35:28.464 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hpred-cem/bin/python
12:35:28.465 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/bin/python
12:35:28.465 [trace] Search for KernelSpecs in Interpreter /opt/homebrew/bin/python3
12:35:28.466 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hm-data-browser/bin/python
12:35:28.466 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hm-panel/bin/python
12:35:28.467 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hpred/bin/python
12:35:28.467 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hpred-data/bin/python
12:35:28.468 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/tpy/bin/python
12:35:28.468 [trace] Search for KernelSpecs in Interpreter /opt/homebrew/bin/python3.11
12:35:28.468 [trace] Search for KernelSpecs in Interpreter ~/anaconda3/envs/hpred2/bin/python
12:35:28.469 [trace] Search for KernelSpecs in Interpreter ~/code/oss/panel/.pixi/envs/default/bin/python
12:35:28.469 [debug] Get Custom Env Variables, Class name = Sm, completed in 20ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
12:35:28.470 [debug] Jupyter Paths /kernels:
12:35:28.470 [debug] Kernel Spec Root Paths, /usr/share/jupyter/kernels, /usr/local/share/jupyter/kernels, ~/Library/Jupyter/kernels
12:35:28.932 [trace] Hiding default KernelSpec ~/anaconda3/envs/hpred-cem/bin/python for interpreter ~/anaconda3/envs/hpred-cem/bin/python (KernelSpec file ~/anaconda3/envs/hpred-cem/share/jupyter/kernels/python3/kernel.json)
12:35:28.932 [trace] Hiding default KernelSpec ~/anaconda3/envs/hm-panel/bin/python for interpreter ~/anaconda3/envs/hm-panel/bin/python (KernelSpec file ~/anaconda3/envs/hm-panel/share/jupyter/kernels/python3/kernel.json)
12:35:28.933 [trace] Hiding default KernelSpec ~/anaconda3/envs/hm-data-browser/bin/python for interpreter ~/anaconda3/envs/hm-data-browser/bin/python (KernelSpec file ~/anaconda3/envs/hm-data-browser/share/jupyter/kernels/python3/kernel.json)
12:35:28.933 [trace] Hiding default KernelSpec ~/anaconda3/envs/hpred-data/bin/python for interpreter ~/anaconda3/envs/hpred-data/bin/python (KernelSpec file ~/anaconda3/envs/hpred-data/share/jupyter/kernels/python3/kernel.json)
12:35:28.933 [trace] Hiding default KernelSpec ~/anaconda3/bin/python for interpreter ~/anaconda3/bin/python (KernelSpec file ~/anaconda3/share/jupyter/kernels/python3/kernel.json)
12:35:28.934 [trace] Hiding default KernelSpec ~/code/oss/panel/.pixi/envs/default/bin/python for interpreter ~/code/oss/panel/.pixi/envs/default/bin/python (KernelSpec file ~/code/oss/panel/.pixi/envs/default/share/jupyter/kernels/python3/kernel.json)
12:35:28.934 [trace] Hiding default KernelSpec ~/anaconda3/envs/tpy/bin/python for interpreter ~/anaconda3/envs/tpy/bin/python (KernelSpec file ~/anaconda3/envs/tpy/share/jupyter/kernels/python3/kernel.json)
12:35:28.935 [trace] Hiding default KernelSpec ~/anaconda3/envs/hpred2/bin/python for interpreter ~/anaconda3/envs/hpred2/bin/python (KernelSpec file ~/anaconda3/envs/hpred2/share/jupyter/kernels/python3/kernel.json)
12:35:28.935 [trace] Hiding default KernelSpec ~/anaconda3/envs/hpred/bin/python for interpreter ~/anaconda3/envs/hpred/bin/python (KernelSpec file ~/anaconda3/envs/hpred/share/jupyter/kernels/python3/kernel.json)
12:35:28.935 [debug] End refreshing Kernel Picker (1720607728449)
12:35:29.285 [trace] Conda file is conda
12:35:49.108 [debug] No interpreter for Pylance for Notebook URI "~/code/oss/panel/examples/gallery/spam.ipynb"
12:35:49.110 [debug] KernelProvider switched kernel to id = .jvsc74a57bd0232b109ff96e0db15e3104533b320dafb62cb6da390edef5723e1e7326d57603./Users/~/code/oss/panel/.pixi/envs/default/python./Users/~/code/oss/panel/.pixi/envs/default/python.-m#ipykernel_launcher
12:35:49.110 [debug] start the kernel, options.disableUI=true for ~/code/oss/panel/examples/gallery/spam.ipynb
12:35:49.182 [trace] Registering commtarget jupyter.widget
12:35:49.183 [debug] Controller selection change completed
12:35:49.184 [info] Starting Kernel (Python Path: ~/code/oss/panel/.pixi/envs/default/bin/python, VirtualEnv, 3.12.4) for '~/code/oss/panel/examples/gallery/spam.ipynb' (disableUI=true)
12:35:49.185 [trace] Creating raw notebook for resource '~/code/oss/panel/examples/gallery/spam.ipynb'
12:35:49.186 [debug] Get Custom Env Variables, Class name = Sm, completed in 0ms, has a truthy return value, Arg 1: "~/code/oss/panel", Arg 2: "RunPythonCode"
12:35:49.198 [debug] Get Custom Env Variables, Class name = Sm, completed in 0ms, has a truthy return value, Arg 1: "~/code/oss/panel/examples/gallery/spam.ipynb", Arg 2: "RunPythonCode"
12:35:49.214 [debug] Launching kernel .jvsc74a57bd0232b109ff96e0db15e3104533b320dafb62cb6da390edef5723e1e7326d57603./Users/~/code/oss/panel/.pixi/envs/default/python./Users/~/code/oss/panel/.pixi/envs/default/python.-m#ipykernel_launcher for ~/code/oss/panel/examples/gallery/spam.ipynb in //Users/~/code/oss/panel/examples/gallery with ports 9001, 9000, 9004, 9002, 9003
12:35:50.365 [debug] Got env vars from Python Ext in 1179ms for ~/code/oss/panel/.pixi/envs/default/bin/python, with env var count 75.
12:35:50.365 [trace] Prepend PATH with python bin for ~/code/oss/panel/.pixi/envs/default/bin/python
12:35:50.366 [debug] Getting activated env variables, Class name = pd, completed in 1180ms, has a truthy return value, Arg 1: "~/code/oss/panel", Arg 2: "~/code/oss/panel/.pixi/envs/default/bin/python", Arg 3: undefined
12:35:50.368 [info] Process Execution: ~/code/oss/panel/.pixi/envs/default/bin/python -m pip list
12:35:50.368 [debug] Got env vars from Python Ext in 1170ms for ~/code/oss/panel/.pixi/envs/default/bin/python, with env var count 75.
12:35:50.368 [trace] Prepend PATH with python bin for ~/code/oss/panel/.pixi/envs/default/bin/python
12:35:50.369 [debug] Getting activated env variables, Class name = pd, completed in 1170ms, has a truthy return value, Arg 1: "~/code/oss/panel/examples/gallery/spam.ipynb", Arg 2: "~/code/oss/panel/.pixi/envs/default/bin/python", Arg 3: undefined
12:35:50.371 [info] Process Execution: ~/code/oss/panel/.pixi/envs/default/bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
12:35:50.372 [info] Process Execution: ~/code/oss/panel/.pixi/envs/default/bin/python -m ipykernel_launcher --f=/Users/~/Library/Jupyter/runtime/kernel-v2-47140WaK7i3iQc4Nx.json
> cwd: //Users/~/code/oss/panel/examples/gallery
12:35:50.372 [debug] Kernel process 47429.
12:35:51.171 [trace] ipykernel version & path 6.29.4, ~/code/oss/panel/.pixi/envs/default/lib/python3.12/site-packages/ipykernel/__init__.py for ~/code/oss/panel/.pixi/envs/default/bin/python
12:35:52.483 [debug] Kernel output 47429: To connect another client to this kernel, use:
--existing kernel-v2-47140WaK7i3iQc4Nx.json
12:35:52.660 [debug] Waiting for Raw Session to be ready in postStartRawSession
12:35:52.660 [debug] Waiting for Raw session to be ready, status: connected
12:35:52.660 [trace] Raw session connected
12:35:52.661 [debug] Waited for Raw session to be ready & got status: connected
12:35:52.661 [debug] Successfully waited for Raw Session to be ready in postStartRawSession
12:35:52.661 [debug] Kernel status is 'unknown' before requesting kernel info and after ready
12:35:52.661 [debug] Sending request for kernelInfo
12:35:52.921 [trace] Got response for requestKernelInfo
12:35:52.921 [debug] Successfully completed postStartRawSession after 1 attempt(s) in 260ms
12:35:52.922 [trace] Executing silently Code (idle) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys
12:35:52.927 [trace] Executing silently Code (completed) = import sys as _VSCODE_sys\nprint(_VSCODE_sys.executable); del _VSCODE_sys with 1 output(s)
12:35:52.927 [trace] Started running kernel initialization for ~/code/oss/panel/examples/gallery/spam.ipynb
12:35:52.928 [trace] Executing silently Code (idle) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy
12:35:52.931 [trace] Executing silently Code (completed) = try:\nimport ipywidgets as _VSCODE_ipywidgets\nprint("e976ee50-99ed-4aba-9b6b-9dcd5634d07d:IPy with 0 output(s)
12:35:52.931 [trace] Determined IPyWidgets Version as undefined
12:35:52.932 [trace] Executing silently Code (idle) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None):
12:35:52.938 [trace] Executing silently Code (completed) = def __VSCODE_inject_module():\ndef __VSCODE_call_function(function, callback, data=None): with 0 output(s)
12:35:52.939 [debug] Requesting Kernel info
12:35:52.939 [trace] Got Kernel info
12:35:52.939 [trace] End running kernel initialization, now waiting for idle
12:35:52.940 [trace] Waiting for idle on (kernel): 5a69d61f-0ee4-44aa-9884-59a47cbc851e -> idle
12:35:52.940 [trace] Finished waiting for idle on (kernel): 5a69d61f-0ee4-44aa-9884-59a47cbc851e -> idle
12:35:52.940 [trace] End running kernel initialization, session is idle
12:35:52.942 [trace] Registering Kernel Completion Provider from kernel default (Python 3.12.4) for language python
12:35:52.942 [trace] IPyWidgetScriptSource.initialize
12:35:52.943 [info] Kernel successfully started
12:35:52.943 [debug] getDataDirsImpl, Class name = Mr (started execution), Arg 1: "~/code/oss/panel/examples/gallery/spam.ipynb", Arg 2: "~/code/oss/panel/.pixi/envs/default/bin/python"
12:35:52.944 [debug] Get Custom Env Variables, Class name = Sm, completed in 0ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
12:35:52.944 [debug] Jupyter Paths :
12:35:52.945 [info] Process Execution: ~/code/oss/panel/.pixi/envs/default/bin/python /Users/~/.vscode/extensions/ms-toolsai.jupyter-2024.6.0-darwin-arm64/pythonFiles/printJupyterDataDir.py
12:35:52.964 [debug] getDataDirsImpl, Class name = Mr, completed in 21ms, has a truthy return value, Arg 1: "~/code/oss/panel/examples/gallery/spam.ipynb", Arg 2: "~/code/oss/panel/.pixi/envs/default/bin/python", Return Value: <Uri:/Users/~/Library/Jupyter>, <Uri:/Users/~/code/oss/panel/.pixi/envs/default/share/jupyter>, <Uri:/usr/local/share/jupyter>, <Uri:/usr/share/jupyter>
12:35:53.486 [debug] Jupyter completion time: 16
12:35:53.490 [debug] Execution of code ms-toolsai.jupyter-1 completed in 19ms
12:35:53.496 [trace] Inspecting code print("end=
12:35:53.522 [debug] Execution of code ms-toolsai.jupyter-2 completed in 26ms
12:35:53.525 [debug] Inspected code print("end= in 29ms
12:35:54.320 [trace] Inspecting code print("hasattr
12:35:54.331 [debug] Inspected code print("hasattr in 11ms
12:35:54.332 [debug] Execution of code ms-toolsai.jupyter-3 completed in 10ms
12:35:54.409 [trace] Inspecting code print("help
12:35:54.416 [debug] Inspected code print("help in 7ms
12:35:54.418 [debug] Execution of code ms-toolsai.jupyter-4 completed in 9ms
12:35:54.748 [trace] Inspecting code print("hvplot_explorer.ipynb
12:35:54.754 [debug] Inspected code print("hvplot_explorer.ipynb in 6ms
12:35:54.755 [debug] Execution of code ms-toolsai.jupyter-5 completed in 6ms
12:35:56.593 [debug] Handle Execution of Cells 0 for ~/code/oss/panel/examples/gallery/spam.ipynb
12:35:56.595 [trace] Cell Index:0 sent to kernel
12:35:56.598 [trace] Start cell 0 execution @ 1720607756598 (clear output)
12:35:56.600 [debug] Kernel acknowledged execution of cell 0 @ 1720607756598
12:35:56.602 [trace] Cell 0 completed in 0.004s (start: 1720607756598, end: 1720607756602)
12:35:56.603 [trace] Cell 0 executed successfully
12:35:56.609 [debug] Interpreter for Pylance for Notebook URI "~/code/oss/panel/examples/gallery/spam.ipynb" is ~/code/oss/panel/.pixi/envs/default/bin/python
12:35:56.807 [debug] Interpreter for Pylance for Notebook URI "~/code/oss/panel/examples/gallery/spam.ipynb" is ~/code/oss/panel/.pixi/envs/default/bin/python
Indeed I now cannot reproduce the issue.
Maybe you could try following the steps mentioned above?
Otherwise we could close, and if I see the issue again in the future I would then know how to trace and report it better.
Nope, cannot repro at my end, Closing for now, thanks
Type: Bug
This is follow-up to https://github.com/microsoft/vscode-python/pull/22968#issuecomment-2211966953 cc @baszalmstra and @maresb
Behaviour
Steps to reproduce:
Screenshot
Diagnostic data
Opening the process explorer shows that two
pixi shell-hook
are running for minutes at high CPU usage. I did not try to debug what they are doing, but something is wrong.Extension version: 2024.11.2024070502 VS Code version: Code 1.91.0 (Universal) (ea1445cc7016315d0f5728f8e8b12a45dc0a7286, 2024-07-01T18:54:18.541Z) OS version: Darwin arm64 23.5.0 Modes:
python.languageServer
setting: PylanceUser Settings
``` condaPath: ""
languageServer: "Pylance"
experiments
• enabled: false
```
Installed Extensions
|Extension Name|Extension Id|Version| |---|---|---| |.NET Install Tool|ms-dotnettools.vscode-dotnet-runtime|2.0.8| |ascii-unicode-escape|yaruson.ascii-unicode-escape|0.1.0| |Azure Account|ms-vscode.azure-account|0.12.0| |Azure App Service|ms-azuretools.vscode-azureappservice|0.25.2| |Azure Developer CLI|ms-azuretools.azure-dev|0.8.3| |Azure Resources|ms-azuretools.vscode-azureresourcegroups|0.9.1| |CodeLLDB|vadimcn.vscode-lldb|1.10.0| |Data Wrangler|ms-toolsai.datawrangler|1.4.1| |Django|batisteo.vscode-django|1.15.0| |Draw.io Integration|hediet.vscode-drawio|1.6.6| |Even Better TOML|tamasfe.even-better-toml|0.19.2| |Evidence|Evidence.evidence-vscode|1.5.1| |Excel Viewer|GrapeCity.gc-excelviewer|4.2.59| |Git Graph|mhutchie.git-graph|1.30.0| |GitHub Copilot|GitHub.copilot|1.211.0| |GitHub Copilot Chat|GitHub.copilot-chat|0.17.0| |JavaScript Debugger|ms-vscode.js-debug|1.91.0| |JavaScript Debugger Companion Extension|ms-vscode.js-debug-companion|1.1.2| |JSON Lines|Alpha4.jsonl|0.0.1| |Jupyter|ms-toolsai.jupyter|2024.6.0| |Jupyter Cell Tags|ms-toolsai.vscode-jupyter-cell-tags|0.1.9| |Jupyter Keymap|ms-toolsai.jupyter-keymap|1.1.2| |Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|1.0.18| |Jupyter Slide Show|ms-toolsai.vscode-jupyter-slideshow|0.1.6| |Live Server|ritwickdey.LiveServer|5.7.9| |Malloy|malloydata.malloy-vscode|0.2.1717689082| |Playwright Test for VSCode|ms-playwright.playwright|1.1.7| |Prettier - Code formatter|esbenp.prettier-vscode|10.4.0| |Pylance|ms-python.vscode-pylance|2024.6.1| |Python|ms-python.python|2024.11.2024070502| |Python Debugger|ms-python.debugpy|2024.6.0| |Quarto|quarto.quarto|1.113.0| |Rainbow CSV|mechatroner.rainbow-csv|3.12.0| |Ruff|charliermarsh.ruff|2024.30.0| |rust-analyzer|rust-lang.rust-analyzer|0.3.2020| |Shiny|Posit.shiny|1.0.0| |Svelte for VS Code|svelte.svelte-vscode|108.5.4| |Table Visualizer for JavaScript Profiles|ms-vscode.vscode-js-profile-table|1.0.9| |VS Code Speech|ms-vscode.vscode-speech|0.10.0|System Info
|Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 2400)| |GPU Status|2d_canvas: enabledcanvas_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
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|3, 4, 5| |Memory (System)|16.00GB (1.36GB free)| |Process Argv|| |Screen Reader|no| |VM|0%|