After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 782385 - X session crashes when undocking or switching off an external monitor
X session crashes when undocking or switching off an external monitor
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: X11
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-05-09 13:50 UTC by Debarshi Ray
Modified: 2018-05-02 18:28 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Debarshi Ray 2017-05-09 13:50:52 UTC
I have an Intel Sandybridge based ThinkPad x220 running Fedora 25 that's docked with an external rotated monitor. Undocking the laptop causes gnome-shell on Xorg to crash. I am also unable to switch off the external monitor from Settings -> Display. The screen flickers and either the external monitor continues to remain enabled, or it also crashes the session.

All the backtraces seem to indicate an X error.


[rishi@kolache ~]$ uname -a
Linux kolache 4.10.10-200.fc25.x86_64 #1 SMP Thu Apr 13 01:11:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[rishi@kolache ~]$ rpm -q mutter gnome-shell xorg-x11-server-Xorg
mutter-3.22.4-1.fc25.x86_64
gnome-shell-3.22.3-1.fc25.x86_64
xorg-x11-server-Xorg-1.19.3-1.fc25.x86_64
[rishi@kolache ~]$


Thread 1 (Thread 0x7f9f29012f80 (LWP 2036))

  • #0 _g_log_abort
    at gmessages.c line 509
  • #1 g_log_writer_default
    at gmessages.c line 2462
  • #2 g_log_structured_array
    at gmessages.c line 1792
  • #3 g_log_structured
    at gmessages.c line 1619
  • #4 _gdk_x11_display_error_event
  • #5 gdk_x_error
  • #6 _XError
    at XlibInt.c line 1434
  • #7 handle_error
    at xcb_io.c line 199
  • #8 handle_response
    at xcb_io.c line 311
  • #9 _XReply
    at xcb_io.c line 621
  • #10 XIGetClientPointer
    at XGetCPtr.c line 59
  • #11 gdk_x11_display_get_default_seat
  • #12 get_pointer_position_gdk
    at backends/meta-cursor-tracker.c line 375
  • #13 meta_cursor_tracker_get_pointer
    at backends/meta-cursor-tracker.c line 420
  • #14 shell_global_get_pointer
    at shell-global.c line 1448
  • #15 shell_global_sync_pointer
    at shell-global.c line 1468
  • #16 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #17 ffi_call
    at ../src/x86/ffi64.c line 525
  • #18 gjs_invoke_c_function(JSContext*, Function*, JSObject*, unsigned int, jsval*, jsval*, GArgument*)
    at gi/function.cpp line 999
  • #19 function_call(JSContext*, unsigned int, jsval*)
    at gi/function.cpp line 1323
  • #20 js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)
    at /usr/src/debug/mozjs-24.2.0/js/src/jscntxtinlines.h line 321
  • #21 js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 474
  • #22 Interpret(JSContext*, js::RunState&)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 2298
  • #23 js::RunScript(JSContext*, js::RunState&)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 438
  • #24 js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 500
  • #25 js::CallOrConstructBoundFunction(JSContext*, unsigned int, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/jsfun.cpp line 1212
  • #26 js::CallJSNative(JSContext*, int (*)(JSContext*, unsigned int, JS::Value*), JS::CallArgs const&)
    at /usr/src/debug/mozjs-24.2.0/js/src/jscntxtinlines.h line 321
  • #27 js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 481
  • #28 js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value*, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/vm/Interpreter.cpp line 531
  • #29 JS_CallFunctionValue(JSContext*, JSObject*, JS::Value, unsigned int, JS::Value*, JS::Value*)
    at /usr/src/debug/mozjs-24.2.0/js/src/jsapi.cpp line 5639
  • #30 gjs_call_function_value(JSContext*, JSObject*, jsval, unsigned int, jsval*, jsval*)
    at gjs/jsapi-util.cpp line 724
  • #31 gjs_closure_invoke(GClosure*, int, jsval*, jsval*)
    at gi/closure.cpp line 277
  • #32 closure_marshal(GClosure*, GValue*, guint, GValue const*, gpointer, gpointer)
    at gi/value.cpp line 287
  • #36 <emit signal ??? on instance 0x55de4edf10f0 [MetaStage]>
    at gsignal.c line 3447
  • #37 clutter_actor_event
    at clutter-actor.c line 13910
  • #38 _clutter_actor_handle_event
    at clutter-actor.c line 20574
  • #39 emit_event_chain
    at clutter-main.c line 1995
  • #40 emit_pointer_event
    at clutter-main.c line 2018
  • #41 _clutter_process_event_details
    at clutter-main.c line 2193
  • #42 _clutter_process_event
    at clutter-main.c line 2548
  • #43 _clutter_stage_process_queued_events
    at clutter-stage.c line 1026
  • #44 master_clock_process_events
    at clutter-master-clock-default.c line 364
  • #45 clutter_clock_dispatch
    at clutter-master-clock-default.c line 561
  • #46 g_main_dispatch
    at gmain.c line 3203
  • #47 g_main_context_dispatch
    at gmain.c line 3856
  • #48 g_main_context_iterate
    at gmain.c line 3929
  • #49 g_main_loop_run
    at gmain.c line 4125
  • #50 meta_run
    at core/main.c line 572
  • #51 main
    at main.c line 471

Comment 1 Florian Müllner 2017-05-09 17:25:28 UTC
The trace points to gdk_display_get_default_seat() not catching an X error - according to Carlos, this isn't supposed to happen, so moving to GDK.
Comment 2 Marco Trevisan (Treviño) 2017-10-13 06:36:43 UTC
We get a similar trace in ubuntu, but it's quite weird though, since 

As per fix on Bug 766233 the error is already trapped in GTK:
  https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkdisplay-x11.c#L3056

  • #0 _g_log_abort
    at ../../../../glib/gmessages.c line 549
  • #1 g_log_writer_default
    at ../../../../glib/gmessages.c line 2613
  • #2 g_log_structured_array
    at ../../../../glib/gmessages.c line 1933
  • #3 g_log_structured
    at ../../../../glib/gmessages.c line 1760
  • #4 _gdk_x11_display_error_event
    at ././gdk/x11/gdkdisplay-x11.c line 2579
  • #5 gdk_x_error
    at ././gdk/x11/gdkmain-x11.c line 307
  • #6 _XError
    at ../../src/XlibInt.c line 1434
  • #7 handle_error
    at ../../src/xcb_io.c line 199
  • #8 handle_response
    at ../../src/xcb_io.c line 311
  • #9 _XReply
    at ../../src/xcb_io.c line 621
  • #10 XIGetClientPointer
    at ../../src/XGetCPtr.c line 59
  • #11 gdk_x11_display_get_default_seat
    at ././gdk/x11/gdkdisplay-x11.c line 2889
  • #12 get_pointer_position_gdk
    at backends/meta-cursor-tracker.c line 374
  • #13 meta_cursor_tracker_get_pointer
    at backends/meta-cursor-tracker.c line 419
  • #14 shell_global_get_pointer
    at shell-global.c line 1430
  • #15 shell_global_sync_pointer
    at shell-global.c line 1450
  • #16 ffi_call_unix64
    at ../src/x86/unix64.S line 76
  • #17 ffi_call
    at ../src/x86/ffi64.c line 525
  • #18 gjs_invoke_c_function
    at gi/function.cpp line 1021
  • #19 function_call
    at gi/function.cpp line 1341
  • #20 ??
  • #21 ??
  • #22 ??
  • #23 ??
  • #24 ??
  • #25 ??
  • #26 ??
  • #27 ??
  • #28 ??

Comment 3 Daniel Boles 2017-10-16 11:58:44 UTC
IIRC, there have been several changes to the plumbing recently, regarding un/plugging external screens.

Do you know if this issue still occurs if Mutter, GNOME Shell, and so on are at their latest versions?
Comment 4 Carlos Garnacho 2017-10-16 14:35:02 UTC
(In reply to Marco Trevisan (Treviño) from comment #2)
> We get a similar trace in ubuntu, but it's quite weird though, since 
> 
> As per fix on Bug 766233 the error is already trapped in GTK:
>   https://github.com/GNOME/gtk/blob/master/gdk/x11/gdkdisplay-x11.c#L3056

The backtrace is probably bogus unless you're running gnome-shell with GDK_SYNCHRONIZE=1. A hint that this is the case is that BadValue is received, whereas XIGetClientPointer can't return that value, neither as per documentation nor X server code in git.

What's probably happening here is that we are getting the error for an async call that we happened to issue before the XIGetClientPointer call, and get it here because this request is synchronous, thus the display is flushed.
Comment 5 GNOME Infrastructure Team 2018-05-02 18:28:21 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/817.