Description
Describe the bug
Closing and relaunching VS Code or executing the Reload Window command creates a new fsautocomplete
process but does not kill existing ones. Over time, many processes are created and consume lots of memory.
Steps to reproduce
Just close and reopen VS Code a few times or use the Reload Window command. Observe the instances of fsautocomplete
in a process viewer.
Expected behavior
All processes spawned by the extension close with it. Only one instance of fsautocomplete
is present at a time.
Machine info
- Operating system: Linux
- Arch: x64
- VSCode: 1.66.2
- UI Kind: Desktop
- Ionide: 6.0.2
- Runtime: netcore
- Dotnet version: 6.0.102
Additional context
I captured logs of the active fsautocomplete
processes using a small shell script, watch-ionide
. Observing the changes in PIDs from several runs, I noticed that when restarting VS Code completely has a tendency to eventually stabilize to a fixed number of running processes while reloading will keep increasing the number of processes without bound.
#!/bin/bash
oldOutput=""
while true; do
output="$(pgrep -af ionide | grep -v watch-ionide)"
if [[ "$output" != "$oldOutput" ]]; then
echo "$output"
echo '-------'
oldOutput="$output"
fi
sleep 0.1
done
Here are the logs from the extension window for the same two trials.
extension-reload.log
extension-restart.log
Not sure if it matters, but I'll mention that I launch VS code with --extensions-dir="$XDG_DATA_HOME/vscode/extensions"
.
Activity