Draft: Make wet_process a real thing, fix all the leaks
[this MR is now significantly out of date; the subset of its last continuations are !941 (closed) and !951 (closed); it will not progress in its current form]
This series makes wet_process
(formerly known as weston_client_*
) be more of a real thing. Specifically, rather than just materialising a wl_client
and some behind-the-scenes objects which may or may not get cleaned up at some point, the Weston frontend now only forks clients through wet_process
. These are consistently monitored and destroyed.
Doing so was a yak shave in order to enable leak checking in the middle of the series; it's clean both in tests, and in 'clean' exits in desktop testing with Xwayland. By 'clean' exits, I mean that all clients have been closed and we are quiescent. If we close with clients active then we still leak, mostly because we try to defer client closes. #591 has some ideas on solving this, which are partly addressed by this series - both in making Xwayland shutdown more clean, and in adding a weston_compositor.shutting_down
bool which we can use to e.g. not try to do close animations.
Some of the tests have also been fixed to not leak on skips, and for ZUC to not fork for each subtest as this is punishingly slow with current ASan on AArch64 - on the order of 3.6sec per subtest, which pushes us well over our timeout.
There is one notable bit of pain though, which is that although it's clean on Fedora, in the versions of fontconfig we have in Debian (missing many upstream fixes for memory leaks), we do hit a couple of leaks in the Xwayland tests. For some reason - likely frame pointers - ASan can't see the symbols behind the leaks, so we have to disable its fast unwinder for the Xwayland test so it can see which reports to suppress. This is pretty horrible, but I can't see much any other way around it.