gnome-shell crash due to Xerror in gdk_x11_display_get_default_seat
Submitted by Hans de Goede
Link to original bug (#789093)
Description
I got the following gnome-shell
crash today, while sending an email in Thunderbird, in this case the "sending" status window showed only a very short time, which I believe triggered a BadWindow X11 error in gdk_x11_display_get_default_seat
as this function seems to try to access the currently focussed window or some such, and that disappeared underneath it.
The program 'gnome-shell' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
(Details: serial 676062 error_code 3 request_code 18 (core protocol) minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
Process 1926 (gnome-shell) of user 500 dumped core.
Stack trace of thread 1926:
#0 0x00007f0399e7e7b1 _g_log_abort (libglib-2.0.so.0)
#1 0x00007f0399e80de1 g_log_writer_default (libglib-2.0.so.0)
#2 0x00007f0399e7f34e g_log_structured_array (libglib-2.0.so.0)
#3 0x00007f0399e7f647 g_log_structured (libglib-2.0.so.0)
#4 0x00007f03975fbe71 _gdk_x11_display_error_event (libgdk-3.so.0)
#5 0x00007f0397609413 gdk_x_error (libgdk-3.so.0)
#6 0x00007f0396ab2e3a _XError (libX11.so.6)
#7 0x00007f0396aafd6b handle_error (libX11.so.6)
#8 0x00007f0396aafe15 handle_response (libX11.so.6)
#9 0x00007f0396ab0d70 _XReply (libX11.so.6)
#10 0x00007f03934e7f94 XIGetClientPointer (libXi.so.6)
#11 0x00007f03975fe06e gdk_x11_display_get_default_seat (libgdk-3.so.0)
#12 0x00007f03983513e9 meta_cursor_tracker_get_pointer (libmutter-1.so.0)
#13 0x00007f039a75240d shell_global_get_pointer (libgnome-shell.so)
#14 0x00007f039a7528fc shell_global_sync_pointer (libgnome-shell.so)
#15 0x00007f039483ad1e ffi_call_unix64 (libffi.so.6)
#16 0x00007f039483a68f ffi_call (libffi.so.6)
#17 0x00007f0398e3eed8 n/a (libgjs.so.0)
#18 0x00007f0398e407b4 n/a (libgjs.so.0)
#19 0x00007f0390758f9c _ZN2js23InternalCallOrConstructEP9JSContextRKN2JS8CallArgsENS_14MaybeConstructE (libmozjs-52.so.0)
#20 0x00007f03907590b9 _ZN2js4CallEP9JSContextN2JS6HandleINS2_5ValueEEES5_RKNS_13AnyInvokeArgsENS2_13MutableHandleIS4_EE (libmozjs-52.so.0)
#21 0x00007f039054720d _ZN2js3jit14InvokeFunctionEP9JSContextN2JS6HandleIP8JSObjectEEbjPNS3_5ValueENS3_13MutableHandleIS8_EE (libmozjs-52.so.0)
#22 0x000012ef46ba63c6 n/a (n/a)
I believe that the XIGetClientPointer(and possible other) calls inside dk_x11_display_get_default_seat need to have an Xerror handler installed to catch any BadWindow errors which may trigger.
Version: 3.22.x
Edited by Daniel Boles