eclipse-cdt-cloud / cdt-gdb-adapter

CDT GDB Debug Adapter
Eclipse Public License 2.0
28 stars 40 forks source link

Tests on Windows leaving behind orphaned processes #277

Open jonahgraham opened 1 year ago

jonahgraham commented 1 year ago

At the end of the GitHub actions run there are a handful of orphaned processes left when running on Windows, e.g from this run:

Cleaning up orphan processes
Terminate orphan process: pid (1176) (gdbserver)
Terminate orphan process: pid (4968) (empty)

The tests should be cleaning up better after themselves. I think the ones that are left behind are the tests that are checking error conditions, but it is pretty hard to tell just from the log which they are.

The title says "Windows", but my guess is that on Linux they simply aren't orphaned because when mocha exits it is fully terminating all child processes on Linux and not doing it on Windows. But ideally the test itself should cleanup after itself and not wait until the mocha exits.

jonahgraham commented 1 year ago

It may be the secondary effect of tests not cleaning up after themselves is that when a test actually fails that if the orphaned process is something like count (an infinite tight loop) the CPU usage on the test machine is left abnormally high, slowing down the whole test run.