Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugging-in second monitor crashes the running mate-display-properties process #121

Closed
nachanon opened this issue Oct 8, 2014 · 7 comments

Comments

@nachanon
Copy link

nachanon commented Oct 8, 2014

I have some trouble with mate-display-properties regarding multi-monitor configuration.
When I plugged in the second display first, then run mate-display-properties to configure it,
it will work fine.

But if I run mate-display-properties first, then plug in the second display,
mate-display-properties will crash (Segmentation Fault).

To reproduce:

  • Run mate-display-properties from a terminal
  • Plug in the second monitor
  • mate-display-properties will terminate with "Segmentation Fault" message on the terminal

MATE: MATE 1.8.1 (from Debian backports repository)
System: Debian GNU/Linux 7.0 "Wheezy" i386
Display Adapter: Intel i915 (xorg-video-intel driver)
Machine: Samsung NP370R4V-S01TH Laptop

Note: In my case, the second monitor is a projector (connected via VGA cable).
But I think that normal monitor (VGA/DVI) or TV (HDMI) will do too.

@stefano-k
Copy link
Collaborator

Are you able to get a backtrace with gdb?

@nachanon
Copy link
Author

nachanon commented Oct 8, 2014

Yes, and it's best to do immediately after the desktop started after boot. Subsequent run will give little-to-none backtrace information; maybe stack were corrupted in those case.
But all attempt will have one entry that involve address 0x00000000 (most time is exact 0x00000000, sometimes give or take few bytes).

$ gdb mate-display-properties
GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/mate-display-properties...Reading symbols from /usr/lib/debug/.build-id/72/49f5c2bf6cc4ed29e25bfc3057bdbc64229791.debug...done.
done.
(gdb) run
Starting program: /usr/bin/mate-display-properties 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[New Thread 0xb6951b70 (LWP 3114)]
[New Thread 0xb5fffb70 (LWP 3115)]

Program received signal SIGSEGV, Segmentation fault.
0x00000004 in ?? ()
(gdb) backtrace
#0  0x00000004 in ?? ()
#1  0xb773fd49 in gdk_event_apply_filters (filters=<optimized out>, event=0x807d510, xevent=0xbffff100)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:356
#2  gdk_event_translate (display=display@entry=0x807b0b0, event=event@entry=0x807d510, xevent=xevent@entry=0xbffff100, return_exposes=return_exposes@entry=0)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:1033
#3  0xb7741a1b in _gdk_events_queue (display=display@entry=0x807b0b0) at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:2310
#4  0xb7741abd in gdk_event_dispatch (source=0x80821f8, callback=0, user_data=0x0)
    at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gdk/x11/gdkevents-x11.c:2371
#5  0xb71d46d3 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#6  0xb71d4a70 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb71d4ecb in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb7859e08 in IA__gtk_dialog_run (dialog=0x8092030) at /build/buildd-gtk+2.0_2.24.10-2-i386-Tg7Q_2/gtk+2.0-2.24.10/gtk/gtkdialog.c:1094
#9  0x0804d912 in run_application (app=<optimized out>) at xrandr-capplet.c:2526
#10 main (argc=1, argv=0xbffff434) at xrandr-capplet.c:2573
(gdb) generate-core-dump
Undefined command: "generate-core-dump".  Try "help".
(gdb) generate-core-file
Saved corefile core.3111
(gdb) quit
A debugging session is active.

    Inferior 1 [process 3111] will be killed.

Quit anyway? (y or n) y
$

I can post the core file too (~15 MB bzip2'd), if anyone is interested.

The second display is a Philips 107S66/05 CRT monitor, connected via VGA cable.

xrandr --verbose result before plugging in the second display:
https://gist.github.com/nachanon/55f1a9cee91bfab84b23

xrandr --verbose result after plugging in the second display:
(gathered after mate-display-properties' crash)
https://gist.github.com/nachanon/18a8c0a15bbb4cb4d07d

@nachanon
Copy link
Author

I've re-attempted to get a full backtrace, including local variables (using backtrace full command of gdb) and the missing glib debug symbols:
https://gist.github.com/nachanon/bab2e0d965ae50b505d7

The second display is still the same Philips 107S66/05 CRT monitor, connected via VGA cable.

@nachanon
Copy link
Author

I think this is not really specific to attaching second monitor, since other change in XRandR status seems to crash mate-display-properties in a similar manner.

For example, if I ran mate-display-properties, then use a command line xrandr -s 1024x768 to change screen resolution from 1366x768 to 1024x768; mate-display-properties will also crash with a very similar backtrace. No second monitor was involved.
(Backtrace: https://gist.github.com/nachanon/aa57030d4648503b897f)

So, I think this might share the same root cause as bug #106 (changing screen resolution crashes mate-display-properties).

The only difference here is, in that bug report, mate-display-properties itself is the one that trigger XRandR status change (and got backfired).

Backtrace in second monitor case, command line xrandr case and bug #106 case, all have this function call chain:
0. (Unknown)

  1. gdk_event_apply_filters (gdkevents-x11.c)
  2. gdk_event_translate (gdkevents-x11.c)
  3. _gdk_events_queue (gdkevents-x11.c)
  4. gdk_event_dispatch (gdkevents-x11.c)
  5. g_main_dispatch (gmain.c)
  6. g_main_context_dispatch (gmain.c)
  7. g_main_context_iterate (gmain.c)
  8. g_main_loop_run (gmain.c)
  9. IA__gtk_dialog_run (gtkdialog.c)
  10. run_application (xrandr-capplet.c)
  11. main (xrandr-capplet.c)

@tamer-hassan
Copy link

I can reproduce the issue.
dmesg shows:
[28222.286157] traps: mate-display-pr[4899] general protection ip:7ffdee026b31 sp:7fff0c4ea260 error:0 in libgdk-x11-2.0.so.0.2400.23[7ffdedfcf000+ad000]
[28486.891176] traps: mate-display-pr[4923] general protection ip:7fcdb18c2b31 sp:7ffffe139fe0 error:0 in libgdk-x11-2.0.so.0.2400.23[7fcdb186b000+ad000]
[28702.260469] mate-display-pr[4996]: segfault at 7fcf00000008 ip 00007fcf00000008 sp 00007fff34662bb8 error 15 in icon-theme.cache[7fcefedf9000+5207000]

Also, extend mode (the default when monitor is plugged in) is broken.

$ dpkg -l mate* | grep ^ii | awk '{print $2 $3}'
mate-applets1.8.0-0+qiana
mate-applets-common1.8.0-0+qiana
mate-calc1.8.0-0+qiana
mate-calc-common1.8.0-0+qiana
mate-common1.8.0-0+qiana
mate-control-center1.8.1-0
mate-control-center-dbg1.8.1-0
mate-desktop1.8.1-0
mate-desktop-common1.8.1-0
mate-dialogs1.8.0-0+qiana
mate-dialogs-common1.8.0-0+qiana
mate-icon-theme1.8.0-0+qiana
mate-indicator-applet1.8.0-0+qiana
mate-media1.8.0-0+qiana
mate-media-common1.8.0-0+qiana
mate-media-pulse1.8.0-0+qiana
mate-menus1.8.0-0+qiana
mate-netspeed1.8.0-0+qiana
mate-notification-daemon1.8.0-0+qiana
mate-panel1.8.0-0+qiana
mate-panel-common1.8.0-0+qiana
mate-polkit:amd641.8.0-0+qiana
mate-polkit-common1.8.0-0+qiana
mate-power-manager1.8.0-0+qiana
mate-power-manager-common1.8.0-0+qiana
mate-screensaver1.8.0-0+qiana
mate-screensaver-common1.8.0-0+qiana
mate-sensors-applet1.8.0-0+qiana
mate-sensors-applet-ati1.8.0-0+qiana
mate-session-manager1.8.1-0
mate-settings-daemon1.8.1-0+qiana
mate-settings-daemon-common1.8.1-0+qiana
mate-settings-daemon-pulse1.8.1-0+qiana
mate-system-monitor1.8.0-1+qiana
mate-system-monitor-common1.8.0-1+qiana
mate-system-tools1.8.0-1+qiana
mate-system-tools-common1.8.0-1+qiana
mate-terminal1.8.0-0+qiana
mate-terminal-common1.8.0-0+qiana
mate-user-guide1.8.1-0
mate-utils1.8.0-1+qiana
mate-utils-common1.8.0-1+qiana

$ inxi -Gx
Graphics: Card-1: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0
Card-2: Advanced Micro Devices [AMD/ATI] Thames [Radeon HD 7500M/7600M Series] bus-ID: 01:00.0
X.Org: 1.15.1 drivers: fglrx,intel Resolution: 1440x900@59.9hz
GLX Renderer: AMD Radeon HD 7600M Series GLX Version: 4.3.12798 - CPC 13.35.1005 Direct Rendering: Yes

@tamer-hassan
Copy link

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff70f0b31 in gdk_event_apply_filters (filters=, event=0x7fffe00031d0, xevent=0x7fffffffdc50)
at /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c:356
356 /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c: No such file or directory.

(gdb) backtrace
#0  0x00007ffff70f0b31 in gdk_event_apply_filters (filters=<optimized out>, event=0x7fffe00031d0, xevent=0x7fffffffdc50)
    at /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c:356
#1  gdk_event_translate (display=display@entry=0x645020, event=event@entry=0x7fffe00031d0, xevent=xevent@entry=0x7fffffffdc50, 
    return_exposes=return_exposes@entry=0) at /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c:1052
#2  0x00007ffff70f2116 in _gdk_events_queue (display=display@entry=0x645020) at /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c:2336
#3  0x00007ffff70f21be in gdk_event_dispatch (source=<optimized out>, callback=<optimized out>, user_data=<optimized out>)
    at /build/buildd/gtk+2.0-2.24.23/gdk/x11/gdkevents-x11.c:2397
#4  0x00007ffff60b0e04 in g_main_dispatch (context=0x650110) at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3064
#5  g_main_context_dispatch (context=context@entry=0x650110) at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3663
#6  0x00007ffff60b1048 in g_main_context_iterate (context=0x650110, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3734
#7  0x00007ffff60b130a in g_main_loop_run (loop=0x904d30) at /build/buildd/glib2.0-2.40.0/./glib/gmain.c:3928
#8  0x00007ffff7402ea2 in IA__gtk_dialog_run (dialog=0x66a050) at /build/buildd/gtk+2.0-2.24.23/gtk/gtkdialog.c:1094
#9  0x0000000000406763 in run_application (app=0x61afa0) at xrandr-capplet.c:2526
#10 main (argc=1, argv=0x7fffffffe048) at xrandr-capplet.c:2573

@leigh123linux
Copy link

Duplicate of

#48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants