Repository navigation
pytest runner overrides --dist=worksteal #26051
Description
Type: Performance Issue
Behaviour
pytest runner in the left panel seems to do something like dist=load despite my settings.json, resulting in periodic bottlenecking on slow tests.
Steps to reproduce:
Running my large suite with uv run pytest tests -n auto --dist worksteal saturates CPU and gives long ..... lines undifferentiated by filenames. But execting the runner with settings.json
{
"python.testing.pytestArgs": [
"tests",
"-n", "auto",
"--dist", "worksteal"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true
}produces a long list of FILENAME ..... [PCT%] lines, and repeated bursts of full core saturation interspersed by long stretches of single-core usage in a single suite run.
Diagnostic data
Details
Excerpt from the TEST RESULTS panel:
Running pytest with args: ['-p', 'vscode_pytest', '-n', 'auto', '--dist', 'worksteal', '--rootdir=/home/tbertalan/lake/Projects/ModelCalibration-issue-118', (long list of specific path/file.py::class entries snipped here)
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/tbertalan/lake/Projects/ModelCalibration-issue-118
configfile: pyproject.toml
plugins: cov-7.1.0, xdist-3.8.0, typeguard-2.13.3, jaxtyping-0.3.11, anyio-4.13.0
collected 446 items
tests/test_anp_loader.py ........................................ [ 8%]
tests/test_anp_registry.py .............................. [ 15%]
tests/test_behavior.py ....... [ 17%]
vs a (non-vscode) terminal run
tbertalan@swiftie:~/lake/Projects/ModelCalibration-issue-118$ uv run pytest -n auto -p no:slow-first
Built modelcalibration @ file:///home/tbertalan/lake/Projects/ModelCalibration-issue-118
Uninstalled 1 package in 0.81ms
Installed 1 package in 3ms
============================================================================================== test session starts ==============================================================================================
platform linux -- Python 3.12.13, pytest-9.0.3, pluggy-1.6.0
rootdir: /home/tbertalan/lake/Projects/ModelCalibration-issue-118
configfile: pyproject.toml
testpaths: tests
plugins: cov-7.1.0, xdist-3.8.0, typeguard-2.13.3, jaxtyping-0.3.11, anyio-4.13.0
4 workers [446 items]
...............................................................................................................................................................x.xxx............................x........ [ 45%]
.................x..x.....................................................................Xss............................................................................................................ [ 90%]
............................................
Extension version: 2026.4.0
VS Code version: Code 1.129.1 (8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8, 2026-07-17T15:35:09Z)
OS version: Windows_NT x64 10.0.26200
Modes:
Remote OS version: Linux x64 6.14.0-37-generic
- Python version (& distribution if applicable, e.g. Anaconda): 3.13.3.final.0
- Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): System
- Value of the
python.languageServersetting: Default
User Settings
languageServer: "Pylance"
testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true
Installed Extensions
| Extension Name | Extension Id | Version |
|---|---|---|
| autopep8 | ms- | 2026.4.0 |
| claude-code | Ant | 2.1.215 |
| copilot-chat | Git | 0.57.0 |
| debugpy | ms- | 2026.6.0 |
| git-graph | mhu | 1.30.0 |
| git-worktrees | Git | 2.16.0 |
| js-debug | ms- | 1.117.0 |
| jsts-chat-features | Typ | 0.0.4 |
| jupyter | ms- | 2025.9.1 |
| jupyter-renderers | ms- | 1.3.0 |
| markdown-all-in-one | yzh | 3.6.3 |
| markdown-mermaid | bie | 1.32.1 |
| mypy-type-checker | ms- | 2026.6.0 |
| pth-viewer | pth | 0.0.12 |
| pylint | ms- | 2026.6.0 |
| python | ms- | 2026.4.0 |
| rainbow-csv | mec | 3.24.1 |
| vscode-js-profile-table | ms- | 1.0.10 |
| vscode-jupyter-cell-tags | ms- | 0.1.9 |
| vscode-jupyter-slideshow | ms- | 0.1.6 |
| vscode-markdownlint | Dav | 0.61.2 |
| vscode-pull-request-github | Git | 0.158.0 |
| vscode-pylance | ms- | 2026.2.1 |
| vscode-python-envs | ms- | 1.36.0 |
| webm-preview | gso | 0.1.2 |
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 5 7530U with Radeon Graphics (12 x 1996) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x1002, DEVICE=0x15e7 [AMD Radeon (TM) Graphics], DRIVER_VENDOR=AMD, DRIVER_VERSION=31.0.21923.13006 ACTIVE GPU1: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8875 Machine model name: Machine model version: 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 trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | undefined |
| Memory (System) | 14.83GB (0.10GB free) |
| Process Argv | --crash-reporter-id 3819bd9c-9640-441a-b637-f0405bc1724f |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | SSH: swiftie |
| OS | Linux x64 6.14.0-37-generic |
| CPUs | Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 x 4200) |
| Memory (System) | 30.28GB (18.76GB free) |
| VM | 0% |
Process Info
CPU % Mem MB PID Process
1 154 5568 code
1 599 4812 window [2] (settings.json - ModelCalibration-issue-118 [SSH: swiftie] - Visual Studio Code)
0 295 6100 window [1] (tasks.json - Journal - Visual Studio Code)
0 24 8216 crashpad-handler
0 42 17384 utility-network-service
0 476 18044 extension-host [2]
0 8 28028 C:\WINDOWS\system32\wsl.exe -d Ubuntu -e /bin/sh -c "cd '/mnt/c/Users/Tom Bertalan/AppData/Local/Programs/Microsoft VS Code' && /bin/sh"
0 13 10976 C:\WINDOWS\system32\wsl.exe -d Ubuntu -e /bin/sh -c "cd '/mnt/c/Users/Tom Bertalan/AppData/Local/Programs/Microsoft VS Code' && /bin/sh"
0 12 8400 --distro-id {0eceac0a-0de7-44db-ab7e-a953bbca12d9} --vm-id {97cfd741-f0f7-4580-b40a-526ebdaf3204} --handle 728 --event 752 --parent 756
0 10 27972 C:\WINDOWS\system32\conhost.exe 0x4
0 8 15480 C:\WINDOWS\system32\conhost.exe 0x4
0 102 23492 pty-host
0 87 2248 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
0 12 16552 "c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty\OpenConsole.exe" --headless --inheritcursor --width 80 --height 30 --signal 0x55c --server 0x54c
0 12 26416 "c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty\OpenConsole.exe" --headless --width 80 --height 30 --signal 0x738 --server 0x730
0 91 26528 C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\out\vs\workbench\contrib\terminal\common\scripts\shellIntegration.ps1\" } catch {}"
0 8 31012 C:\WINDOWS\System32\cmd.exe /c (type "C:\Users\TOMBER~1\AppData\Local\Temp\vscode-linux-multi-line-command-swiftie-908041203.sh" | "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 57373 swiftie sh) & exit /b 0
0 14 30288 "C:\WINDOWS\System32\OpenSSH\ssh.exe" -T -D 57373 swiftie sh
0 12 34920 "c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\node_modules.asar.unpacked\node-pty\build\Release\conpty\OpenConsole.exe" --headless --inheritcursor --width 131 --height 30 --signal 0x62c --server 0x624
1 138 24056 gpu-process
0 359 28444 extension-host [1]
0 66 10424 "C:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\Tom Bertalan\AppData\Local\Programs\Microsoft VS Code\8a7abeba6e\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=28444
0 388 24684 electron-nodejs (bundle.js)
0 60 30452 electron-nodejs (server.js)
0 66 34296 "C:\Users\Tom Bertalan\AppData\Roaming\uv\python\cpython-3.14.4-windows-x86_64-none\python.exe" "c:\Users\Tom Bertalan\.vscode\extensions\ms-python.pylint-2026.6.0\bundled\tool\lsp_server.py"
0 8 16588 C:\WINDOWS\system32\conhost.exe 0x4
0 12 35728 "c:\Users\Tom Bertalan\.vscode\extensions\ms-python.vscode-python-envs-1.36.0-win32-x64\python-env-tools\bin\pet.exe" server
0 7 30724 C:\WINDOWS\system32\conhost.exe 0x4
0 73 33612 file-watcher [2]
0 86 34496 file-watcher [1]
0 98 35620 shared-process
Remote: SSH: swiftie
CPU % Mem MB PID Process
2 217 1071813 remote-server
0 62 1071850 ptyHost
0 0 1071983 /bin/bash --init-file /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
0 0 1072407 /bin/bash --init-file /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/out/vs/workbench/contrib/terminal/common/scripts/shellIntegration-bash.sh
1 744 1071856 extension-host
0 62 1072004 /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/node /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/extensions/markdown-language-features/dist/serverWorkerMain --node-ipc --clientProcessId=1071856
0 155 1072022 /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/node /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=1071856
0 0 1072137 /home/tbertalan/.vscode-server/extensions/ms-python.vscode-python-envs-1.36.0-linux-x64/python-env-tools/bin/pet server
0 31 1072423 /home/tbertalan/lake/Projects/ModelCalibration-issue-118/.venv/bin/python /home/tbertalan/.vscode-server/extensions/ms-python.autopep8-2026.4.0/bundled/tool/lsp_server.py
0 527 1072802 /home/tbertalan/.vscode-server/cli/servers/Stable-8a7abeba6e03ea3af87bfbce9a1b7e48fed567b8/server/node /home/tbertalan/.vscode-server/extensions/ms-python.vscode-pylance-2026.2.1/dist/server.bundle.js --cancellationReceive=file:bbb338299e1c2b081336cb52f5953bc490540afe89 --node-ipc --clientProcessId=1071856
0 62 1071873 fileWatcher
0 0 1073210 /bin/sh -c /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
0 0 1073211 /usr/bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
Workspace Info
| Window (tasks.json - Journal - Visual Studio Code)
| Folder (Journal): 229 files
| File types: json(134) md(84) png(4) pdf(3) jpg(1) py(1) gitignore(1)
| TAG(1)
| Conf files: tasks.json(1)
| Remote: SSH: swiftie| Folder (ModelCalibration-issue-118): more than 20000 files| File types: py(7391) pyi(5593) json(3018) pyc(1420) dat(1084) so(159)
| txt(132) typed(61) md(46) pxd(46) other(1050)
| Conf files: dockerfile(1) devcontainer.json(1) github-actions(1)
| Launch Configs: debugpy(3);
A/B Experiments
vsliv368cf:30146710
pythonvspyt551:31249599
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
6abeh943:31336334
envsactivate1:31551504
gh487529:31544284
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
38bie571_auto:31478677
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
c9b86496:31447327
control_6dc23131:31551522
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
githubstableflight:31469463
ghj88844:31499326
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
db5d2638:31499441
jb_cp_cls_t_632:31543129
56dj4588:31512888
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
a1ije391_t:31540920
g4a0e106:31529594
8hfba999:31537718
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
nes-curr-leftover-1500:31538366
8hjh2968:31552050
h561g132:31533256
sessions_3:31532893
ihg5j128:31534457
f412h606:31551416
9gg7f176:31542112
allow-none:31552288
fd5dc207:31551400
nes-gb3-4k:31552341
Activity
mohityadav8 commentedon Jul 21, 2026
Eleanor Boyd (@eleanorjboyd) can i work on this
eleanorjboyd commentedon Sep 23, 2026
🤖 Thanks for the detailed report. The Test Results log shows that the extension is forwarding both
-n autoand--dist worksteal, but the two pasted runs are not directly comparable: the terminal transcript usesuv run, adds-p no:slow-first, omits--dist worksteal, and the reported interpreter versions differ. Could you reproduce with the same selected interpreter and environment in both places, run the exact argument list printed by Test Explorer from a terminal, and share both complete pytest headers plus the Python Testing output log and anyPYTEST_XDIST_AUTO_NUM_WORKERSvalue? This will show whether xdist is creating workers and whether the extension's auto-worker hook is reducing their count. Issues markedinfo-neededautomatically close after 30 days without a reply.