vscode-ansible
vscode-ansible copied to clipboard
Fork bomb getting `ansible-lint --version`
Type: Bug
I have an ansible playbook repo. With this extension installed, when loading an ansible file in that repo, I get a fork bomb of ansible-lint --version commands. It can get to the point of consuming 100% of my CPU and RAM.
Extension version: 2.0.58 VS Code version: Code 1.77.3 (704ed70d4fd1c6bd6342c436f1ede30d1cff4710, 2023-04-12T09:16:52.732Z) OS version: Linux x64 6.2.13-300.fc38.x86_64 Modes: Sandboxed: No
System Info
| Item | Value |
|---|---|
| CPUs | AMD Ryzen 7 5700U with Radeon Graphics (16 x 2491) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off 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_renderer: enabled_on video_decode: disabled_software video_encode: disabled_software vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
| Load (avg) | 2, 9, 7 |
| Memory (System) | 14.99GB (10.59GB free) |
| Process Argv | --unity-launch --crash-reporter-id e128b671-8216-478b-b40b-73378743f4d6 |
| Screen Reader | no |
| VM | 0% |
| DESKTOP_SESSION | gnome |
| XDG_CURRENT_DESKTOP | GNOME |
| XDG_SESSION_DESKTOP | gnome |
| XDG_SESSION_TYPE | wayland |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1cf:30587006
3biah626:30602489
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30730054
vsccsb:30705552
azdwalk:30721579
pythonms35:30701012
pythonfmttextcf:30716743
pythonclientmv:30725892
fixshowwlkth:30730052
hidesbindicator:30730055
See it live:
https://user-images.githubusercontent.com/973709/235916997-7cf39d60-1e17-4234-b5aa-ec65f1aaf09f.mp4
Can also confirm this is happening to me now. Nothing on my system has changed (minus updating vscode and extensions)
Noticed the same when doing a search and replace over a couple of hundred files in VSC. Without the plugin, everything works fine, but having this one activated ansible-lint also seems to scan every file VSC takes on action in the background.
- Are you experimenting this with a single folder/workspace open in vscode or multiple?
- Is the number or processes started equal to the number of open tabs or modified files in case of search/replace action?
- Try to reproduce the bug with like 3 tabs, and see if you get 3 processes.
If we have confirmation on this, we might be able to chain the operations and avoid running them in parallel.
Question 1 is quite important because for multi-workspace case, we might not be able to do that as different instances of the language server will be running.
- Are you experimenting this with a single folder/workspace open in vscode or multiple?
Single.
- Is the number or processes started equal to the number of open tabs or modified files in case of search/replace action?
- Try to reproduce the bug with like 3 tabs, and see if you get 3 processes.
More or less I can see now one process per tab, which is different to the fork bomb I was seeing before.
However now I see one process consuming 100% CPU for a very long time:
/usr/share/code/code /var/home/yajo/.vscode/extensions/redhat.ansible-2.13.148/out/server/src/server.js --node-ipc --clientProcessId=40820
Notice that ansible-lint usually lints the whole directory at once. At least, when used with pre-commit, it should not run per file, but per workdir.
Possibly related https://github.com/ansible/vscode-ansible/issues/1152