diff options
author | Mart Raudsepp <leio@gentoo.org> | 2020-05-17 14:27:49 +0300 |
---|---|---|
committer | Mart Raudsepp <leio@gentoo.org> | 2020-05-17 14:32:02 +0300 |
commit | a15c1b8c84bc04e2273c75d36db42b704ccdcbda (patch) | |
tree | 0894f25849e667c55cd9490536d406725f9966aa /x11-wm/mutter/files | |
parent | mail-filter/spamassassin: Move to EAPI=7 (diff) | |
download | gentoo-a15c1b8c84bc04e2273c75d36db42b704ccdcbda.tar.gz gentoo-a15c1b8c84bc04e2273c75d36db42b704ccdcbda.tar.bz2 gentoo-a15c1b8c84bc04e2273c75d36db42b704ccdcbda.zip |
x11-wm/mutter: add patch that may fix some potential X11 crashers
Package-Manager: Portage-2.3.84, Repoman-2.3.20
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Diffstat (limited to 'x11-wm/mutter/files')
-rw-r--r-- | x11-wm/mutter/files/3.34.6-XInitThreads.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/x11-wm/mutter/files/3.34.6-XInitThreads.patch b/x11-wm/mutter/files/3.34.6-XInitThreads.patch new file mode 100644 index 000000000000..f53f6ba93970 --- /dev/null +++ b/x11-wm/mutter/files/3.34.6-XInitThreads.patch @@ -0,0 +1,50 @@ +From 8b3f1117be1e90866747fa9c9e7ae1c5812ba918 Mon Sep 17 00:00:00 2001 +From: Daniel van Vugt <daniel.van.vugt@canonical.com> +Date: Thu, 14 May 2020 18:13:56 +0800 +Subject: [PATCH] backend-x11: Reintroduce XInitThreads + +It was removed in 3.34 as part of 6ed5d2e2. And we thought that was the +only thread that might exist and use X11. But the top gnome-shell crasher +in 3.36 seems to suggest otherwise. + +We don't know what or where the offending thread is, but since: + + 1. We used XInitThreads for years already prior to 3.34; and + + 2. Extensions or any change to mutter/gnome-shell could conceivably use + threads to make X calls, directly or indirectly, + +it's probably a good idea to reintroduce XInitThreads. The failing assertion +in libx11 is also accompanied by a strong hint: + +``` +fprintf(stderr, "[xcb] Most likely this is a multi-threaded client " \ + "and XInitThreads has not been called\n"); +``` + +https://bugs.launchpad.net/bugs/1877075 + +Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1252 + +https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1256 + +(cherry picked from commit 1d5f9b6917517d6e777a652cfa5e648794dc632a) +--- + src/backends/x11/meta-backend-x11.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c +index 225d14d33..539ca5348 100644 +--- a/src/backends/x11/meta-backend-x11.c ++++ b/src/backends/x11/meta-backend-x11.c +@@ -859,6 +859,7 @@ meta_backend_x11_class_init (MetaBackendX11Class *klass) + static void + meta_backend_x11_init (MetaBackendX11 *x11) + { ++ XInitThreads (); + } + + Display * +-- +2.20.1 + |