You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The trace server is not stopped when running this extension with vscode/codium remote. I have noticed this behaviour in local install as well, but very rarely.
I did some investigation and with some logging (to file) I was able to confirm, that the deactivate() method of the vscode-trace-server is being called. However, the call to tree-kill(pid) has no effect. More investigation needed to fix stopping the trace server on exit.
I did some more digging to figure out what's going on. I think what's happening is that VsCode exits before the treeKill() command is executed. treeKill() spawns external processes to get all the children pids from the parent pid of the trace server launcher. It reads the stdout of the command ps -o pid --no-headers --ppid $ppid and then uses the collected list of pids to call process.kill on it. This is done in a callback, but the parent VsCode application already exited and the hence the no process is killed. I was able to make it work by adding some async/wait/timeout call to delay the execution.
Please note that this can also happen in the local case. I guess, that the shutdown of a local VsCode application takes longer than closing the remote processes.
The text was updated successfully, but these errors were encountered:
bhufmann
changed the title
> > > @williamsyang-work I noticed that when I close the remote vscode window, the server is not automatically stopped and keeps running afterwards. I had to go to a shell and kill the process. Do you see this behaviour as well?
Trace Server not stopped when deactivating extension during shutdown
Aug 15, 2023
The trace server is not stopped when running this extension with vscode/codium remote. I have noticed this behaviour in local install as well, but very rarely.
I did some investigation and with some logging (to file) I was able to confirm, that the
deactivate()
method of thevscode-trace-server
is being called. However, the call totree-kill(pid)
has no effect. More investigation needed to fix stopping the trace server on exit.I did some more digging to figure out what's going on. I think what's happening is that VsCode exits before the
treeKill()
command is executed.treeKill()
spawns external processes to get all the children pids from the parent pid of the trace server launcher. It reads the stdout of the commandps -o pid --no-headers --ppid $ppid
and then uses the collected list of pids to call process.kill on it. This is done in a callback, but the parent VsCode application already exited and the hence the no process is killed. I was able to make it work by adding some async/wait/timeout call to delay the execution.Please note that this can also happen in the local case. I guess, that the shutdown of a local VsCode application takes longer than closing the remote processes.
Originally posted by @bhufmann in eclipse-cdt-cloud/vscode-trace-extension#173 (comment)
The text was updated successfully, but these errors were encountered: