GNOME Bugzilla – Bug 779538
SIGSEGV in __GI___pthread_mutex_lock() with mutter 3.23.91
Last modified: 2017-05-25 09:23:22 UTC
Created attachment 347132 [details] apport dependencies budgie-wm is (my understanding) basically a plugin for mutter. It works just fine for v2.23.90 of mutter but for v2.23.91 the window-manager crashes on opening most applications. Linked launchpad report: StacktraceTop: __GI___pthread_mutex_lock (mutex=0x6c75646f6d5f6b74) at ../nptl/pthread_mutex_lock.c:67 XrmQGetResource (db=0x5608f21aff90, names=names@entry=0x7ffccb88ba40, classes=classes@entry=0x7ffccb88ba50, pType=pType@entry=0x7ffccb88ba2c, pValue=pValue@entry=0x7ffccb88ba30) at ../../src/Xrm.c:2549 XGetDefault (dpy=dpy@entry=0x5608f20df9a0, prog=prog@entry=0x7fcb9a93e081 "Xft", name=name@entry=0x7fcb9a93f854 "antialias") at ../../src/GetDflt.c:231 get_boolean_default (value=<synthetic pointer>, option=0x7fcb9a93f854 "antialias", dpy=0x5608f20df9a0) at ../../../../src/cairo-xlib-screen.c:98 _cairo_xlib_init_screen_font_options (info=0x5608f24e99b0, dpy=0x5608f20df9a0) at ../../../../src/cairo-xlib-screen.c:146 I have traced the issue to this commit: - https://github.com/GNOME/mutter/commit/383ba566bd7c2a76d0856015a66e47caedef06b6 Reverting this commit fixes the crash - however obviously there associated bug-report for that commit needs to be considered. As an aside the last comment in that thread indicates there is potentially still a NVIDIA issue to resolve. For completeness I have attached each of the attachments contained on the launchpad bug-report
Created attachment 347133 [details] apport disassembly
Created attachment 347134 [details] apport journal errors
Created attachment 347136 [details] apport procenviron
Created attachment 347137 [details] apport procmaps
Created attachment 347138 [details] apport procstatus
Created attachment 347139 [details] apport registers
Created attachment 347140 [details] apport segvanalysis
Created attachment 347141 [details] apport stacktrace
Created attachment 347142 [details] apport threadstacktrace
This is Ubuntu Budgie 17.04 with budgie-desktop, GTK+3.22.7 and mutter 2.23.91
stet - mutter 3.23.91 sorry
(In reply to foss.freedom from comment #0) > I have traced the issue to this commit: > https://github.com/GNOME/mutter/commit/ > 383ba566bd7c2a76d0856015a66e47caedef06b6 > > Reverting this commit fixes the crash Thanks for the investigation! That was a fix for 779039 hence CC'ing Owen.
had a quick conversation on IRC with jbicha. Was asked whether the XInitThreads() was at fault or the cogl_xlib_renderer_set_threaded_swap_wait_enabled (cogl_renderer, TRUE); part. from my testing - and I think confirmed by the stacktrace, it is something called within cogl_xlib_renderer_set_threaded_swap_wait_enabled (cogl_renderer, TRUE) that is causing this. Just to reiterate - the majority of applications crash the whole gnome-session (budgie-wm), but not all. For example, terminix works fine but opening chromium crashes the desktop.
In addition, on Gnome-Shell with nvidia driver, running glxgears makes Gnome-shell stuck at 20% CPU on a corei5 which raises CPU temperature by 5 degrees. Reverting that patch brings CPU usage back down to 3% even if I have a opengl game and glxgears running.
I asked Nvidia developer. He said "XInitThreads() enables locking calls in Xlib that affect every call into the library. If the app makes a lot of Xlib calls, that can add up to significant overhead." In our case, the app is Mutter. I hope this is revised since the commit message https://git.gnome.org/browse/mutter/commit/?id=383ba566bd7c2a76d0856015a66e47caedef06b6 says the second part requires the first one (the first part XInitThreads() and the second being the cogl_xlib_renderer_set_threaded_swap_wait_enabled() call).
Hi. This should be seen as Budgie specific issue and not upstream to Mutter itself. Budgie has been using GTK+ code in the Mutter process space which resulted in the segfault (sync issues between gtk + mutter) This is now removed from Budgie: https://github.com/budgie-desktop/budgie-desktop/commit/0e8e93799b65e04ebd5fecfedacbd194edd838d7
Or rather, throwing the X11 syncs. Either way, downstream bug now resolved, as GTK+ has been not recommended within Mutter for quite some time.
Closing, as per comment 17. The high CPU usage mentioned in comment 14 is tracked in bug 781835.