Segfault on shutdown due to thread building meta data cache still running
Symptoms: phosh test case the involves building the meta data cache segfaults sporadically when built with clang.
Details: https://gitlab.gnome.org/World/Phosh/phosh/-/issues/1240
Backtrace: https://gitlab.gnome.org/-/project/16747/uploads/bcccb0e53f4315a7b0027b7e1adf1130/backtrace-all-threads-2.txt
As far as I can tell we're cancelling correctly but it seems as_pool_update_desktop_entries_table is not being terminated. I think
as_pool_load_thread needs to call g_task_set_return_on_cancel`. @ximion if that makes sense I could look at a fix.
Hmm... It does make some sense, however, I wonder if this isn't actually the bug fixed in https://github.com/ximion/appstream/commit/d4fbd569cb3f659a67ce85c6df159d8fbdce2821 instead. Which version of AppStream are you using? Anything >= 1.0.4 should have this fixed.
No idea which version but from what @CyberTailor usually reports I'd assume pretty recent.
I've asked the reporter in the corresponding phosh issue to follow up here.
That makes sense, thank you! :-)
I have not been able to reproduce this, but given that it's intermittent, that may not mean much (I also have only tried with the most recent version of AppStream).