goblint / GobPie

Goblint IDE integration via MagpieBridge
MIT License
7 stars 4 forks source link

Orphaned java processes #10

Open sim642 opened 2 years ago

sim642 commented 2 years ago

I have closed all VS Code processes and somehow the java processes from GobPie still keep running: image

I'm not sure if this is an issue in GobPie specifically (not allowing itself to be terminated for some reason) or in Magpie more generally.

FeldrinH commented 1 year ago

Could not reproduce on WSL by opening, running analyses and closing. Either this has been accidentally fixed or there is some particular step or environment-specific detail required to achieve this.

sim642 commented 1 year ago

This is still happening to me on the latest version from @FeldrinH's fork at least: image These java processes are not children of any VS Code process, but orphaned and thus direct children of the system init process.

Somehow it's even worse now because the java processes (not their Goblint children!) are running at 100% CPU.

EDIT: Here's the thread dump of one such process: gobpie-orphan-cpu.txt. "adb-server-worker" #54 there seems to have accumulated a lot of CPU time, so that's the new thing that might be causing the CPU usage, but the java process staying alive is probably not caused by that.

sim642 commented 1 year ago

One thing that seems to cause such processes is doing "Developer: Reload Window" in VS Code. Maybe it's not handling well the closure of some LSP socket on the VS Code side.

The reason I keep having to reload window is that modifying and saving files for whatever reason stops working for me: no new analysis is ever started.

FeldrinH commented 1 year ago

There seem to be three different problems here:

FeldrinH commented 1 year ago

Small update:

The 100% CPU issue should be fixed on https://github.com/FeldrinH/GobPie/tree/abstract-debugging and should not occur at all on GobPie versions without abstract debugging.

As for orphaned processes, I tried to reload the window and I noticed that old GobPie processes do stay open. I don't know why that is. However, when I close VSCode all GobPie processes are closed with it, so I still can't reproduce the issue itself.

Analysis-on-save breaking I cannot reproduce at all. @sim642 it would probably be a good idea to open a new issue for this, if you can reproduce it consistently on the latest version.

FeldrinH commented 1 year ago

Another update:

The analysis-on-save issue turned out to be that GobPie simply does not trigger an analysis when saving .h or .i files.

This should be fixed once https://github.com/goblint/GobPie/pull/58 is merged.