diff -Nru libxmlb-0.1.15/debian/changelog libxmlb-0.1.15/debian/changelog --- libxmlb-0.1.15/debian/changelog 2020-04-02 17:39:22.000000000 +0000 +++ libxmlb-0.1.15/debian/changelog 2021-01-25 16:01:47.000000000 +0000 @@ -1,3 +1,11 @@ +libxmlb (0.1.15-2ubuntu1) hirsute; urgency=medium + + * d/p/xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch: + Cherry-pick upstream patch to fix a deadlock. Forwarded to Debian at + https://salsa.debian.org/efi-team/libxmlb/-/merge_requests (LP: #1890313) + + -- Iain Lane Mon, 25 Jan 2021 16:01:47 +0000 + libxmlb (0.1.15-2) unstable; urgency=medium * Team upload. diff -Nru libxmlb-0.1.15/debian/patches/series libxmlb-0.1.15/debian/patches/series --- libxmlb-0.1.15/debian/patches/series 2020-04-02 17:39:22.000000000 +0000 +++ libxmlb-0.1.15/debian/patches/series 2021-01-25 16:01:47.000000000 +0000 @@ -1 +1,2 @@ tests-Make-the-build-reproducible.patch +xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch diff -Nru libxmlb-0.1.15/debian/patches/xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch libxmlb-0.1.15/debian/patches/xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch --- libxmlb-0.1.15/debian/patches/xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch 1970-01-01 00:00:00.000000000 +0000 +++ libxmlb-0.1.15/debian/patches/xb-silo-Cancel-the-GFileMonitor-before-unreffing-it.patch 2021-01-25 16:01:47.000000000 +0000 @@ -0,0 +1,31 @@ +From: Iain Lane +Date: Mon, 25 Jan 2021 12:58:30 +0000 +Subject: xb-silo: Cancel the GFileMonitor before unreffing it + +GFileMonitors currently need to be explicitly cancelled when they are +unreffed, otherwise they can deadlock due to the GLib-internal worker +thread also holding a strong reference to the monitor. + +For full details, see: https://gitlab.gnome.org/GNOME/glib/-/issues/1941 + +Closes #59 + +Origin: upstream, commit:a137f1a84f6e50e19a70cfa9247b29725f22432a +Applied-Upstream: 0.2.2 +Bug-Upstream: https://github.com/hughsie/libxmlb/issues/59 +--- + src/xb-silo.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/xb-silo.c b/src/xb-silo.c +index e967f35..fa8a72e 100644 +--- a/src/xb-silo.c ++++ b/src/xb-silo.c +@@ -1347,6 +1347,7 @@ xb_silo_machine_fixup_attr_text_cb (XbMachine *self, + static void + xb_silo_file_monitor_item_free (XbSiloFileMonitorItem *item) + { ++ g_file_monitor_cancel (item->file_monitor); + g_signal_handler_disconnect (item->file_monitor, item->file_monitor_id); + g_object_unref (item->file_monitor); + g_slice_free (XbSiloFileMonitorItem, item);