Code review comment for lp:~marcustomlinson/unity-scopes-api/scope_process_lifetime

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

> So, I tried to run this against the tests in lp:unity-scopes-shell (because
> yey for no end-to-end registry tests in -api), and it was behaving strangely -
> running make test sometimes finished in 1.0seconds, other times in 1.8
> seconds, and sometimes after 30seconds.
>
> Possibly (just) a cleanup issue as when looking at the processes when the test
> was taking 30seconds to finish, the scope process was a zombie after about a
> second of running the tests.

Ok so firstly, the 1 to 2 second delay I think is a scoperunner issue. Sometimes a scoperunner, after being "kill" signalled, hangs around like a zombie. I send a kill signal and wait (currently for 1s) for the process to die. If it doesn't die within that period, I print the following message, and move on (there is little more I can do at this point):

"Scope: "x" is taking longer than expected to terminate (This process is likely to close upon termination of the parent application)."

I think the 30s shutdown (which I believe is actually just a deadlock timing out in your test), is due to the death observer thread missing the quit() request in the RegistryObject destructor. I'm busy fixing that in process-cpp now.

« Back to merge proposal