gnome-terminal crashed with signal 5 in _XError() when Mutter is restarted

Bug #633303 reported by James Tatum
260
This bug affects 74 people
Affects Status Importance Assigned to Milestone
GNOME Terminal
Fix Released
Medium
gnome-terminal (Ubuntu)
Fix Released
High
Chris Coulson
Maverick
Fix Released
High
Chris Coulson

Bug Description

Binary package hint: gnome-terminal

$ kill <pid for mutter>

terminal crashes. Wow, that's a new one on me :)

ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: gnome-terminal 2.31.91-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-20.29-generic 2.6.35.4
Uname: Linux 2.6.35-20-generic i686
Architecture: i386
Date: Wed Sep 8 08:40:40 2010
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/gnome-terminal
ProcCmdline: gnome-terminal
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
Signal: 5
SourcePackage: gnome-terminal
StacktraceTop:
 ?? () from /usr/lib/libgdk-x11-2.0.so.0
 _XError () from /usr/lib/libX11.so.6
 ?? () from /usr/lib/libX11.so.6
 _XReply () from /usr/lib/libX11.so.6
 XGetWindowProperty () from /usr/lib/libX11.so.6
Title: gnome-terminal crashed with signal 5 in _XError()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
James Tatum (jtatum) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 gdk_x_error (display=0x85f25f8, error=0xbff562bc)
 _XError (dpy=0x85f25f8, rep=0x8820868)
 process_responses (dpy=0x85f25f8,
 _XReply (dpy=0x85f25f8, rep=0xbff56450, extra=0, discard=0)
 XGetWindowProperty (dpy=0x85f25f8, w=170, property=364,

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gnome-terminal (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Revision history for this message
Pedro Villavicencio (pedro) wrote : Re: gnome-terminal crashed with signal 5 in _XError()

Thanks for the report, could you try to get a backtrace? please do the following in gdb:

gdb gnome-terminal
(gdb) break gdk_x_error
(gdb) run --sync
reproduce the crash and:
(gdb) thread apply all bt

Then please attach that resulting output to the report, thanks in advance.

visibility: private → public
Changed in gnome-terminal (Ubuntu):
status: New → Incomplete
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :
Download full text (3.7 KiB)

Here's a trace with --sync, up-to-date Maverick as of today.

The crash occurs when window manager changes (or restarts), which triggers terminal_window_composited_changed_cb() and terminal_util_x11_set_net_wm_desktop().

Breakpoint 1, gdk_x_error (display=0x9cd5d90, error=0xbff3a2ac) at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkmain-x11.c:439
439 /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkmain-x11.c: Aucun fichier ou dossier de ce type.
 in /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkmain-x11.c
(gdb) ba
#0 gdk_x_error (display=0x9cd5d90, error=0xbff3a2ac) at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkmain-x11.c:439
#1 0x0043c2c9 in _XError (dpy=0x9cd5d90, rep=0x9d34cf0) at ../../src/XlibInt.c:3103
#2 0x0044299f in process_responses (dpy=0x9cd5d90, wait_for_first_event=<value optimized out>, current_error=0xbff3a3dc,
    current_request=4434) at ../../src/xcb_io.c:214
#3 0x00443036 in _XReply (dpy=0x9cd5d90, rep=0xbff3a410, extra=0, discard=1) at ../../src/xcb_io.c:464
#4 0x00436867 in XSync (dpy=0x9cd5d90, discard=0) at ../../src/Sync.c:46
#5 0x004369f5 in _XSyncFunction (dpy=0x9cd5d90) at ../../src/Synchro.c:35
#6 0x00415abc in XChangeProperty (dpy=0x9cd5d90, w=48234501, property=349, type=6, format=32, mode=0, data=0xbff3a508 "",
    nelements=1) at ../../src/ChProp.c:92
#7 0x0806f349 in terminal_util_x11_set_net_wm_desktop (window=0x9ce8218, desktop=0) at terminal-util.c:1115
#8 0x08071632 in terminal_window_composited_changed_cb (screen=0x9ce40d8, window=0x9d49088) at terminal-window.c:1689
#9 0x00312a1c in g_cclosure_marshal_VOID__VOID (closure=0x9e1b578, return_value=0x0, n_param_values=1,
    param_values=0x9ea9a08, invocation_hint=0xbff3a700, marshal_data=0x8071490)
    at /build/buildd/glib2.0-2.25.15/gobject/gmarshal.c:79
#10 0x003034b2 in g_closure_invoke (closure=0x9e1b578, return_value=0x0, n_param_values=1, param_values=0x9ea9a08,
    invocation_hint=0xbff3a700) at /build/buildd/glib2.0-2.25.15/gobject/gclosure.c:766
#11 0x0031c0e5 in signal_emit_unlocked_R (node=<value optimized out>, detail=<value optimized out>, instance=0x9ce40d8,
    emission_return=0x0, instance_and_params=0x9ea9a08) at /build/buildd/glib2.0-2.25.15/gobject/gsignal.c:3252
#12 0x0031d75c in g_signal_emit_valist (instance=0x9ce40d8, signal_id=5, detail=0, var_args=0xbff3a958 "")
    at /build/buildd/glib2.0-2.25.15/gobject/gsignal.c:2983
#13 0x0031da45 in g_signal_emit_by_name (instance=0x9ce40d8, detailed_signal=0x83b99d "composited-changed")
    at /build/buildd/glib2.0-2.25.15/gobject/gsignal.c:3077
#14 0x0080e54d in _gdk_x11_screen_process_owner_change (screen=0x9ce40d8, event=0xbff3abdc)
    at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkscreen-x11.c:1228
#15 0x008016f9 in gdk_event_translate (display=<value optimized out>, event=<value optimized out>, xevent=0xbff3abdc,
    return_exposes=0) at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkevents-x11.c:2105
#16 0x00801e91 in _gdk_events_queue (display=0x9ce10c0) at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkevents-x11.c:2310
#17 0x0080240f in gdk_event_dispatch (source=0x9cea330, callback=0, user_data=0x0)
    at /build/buildd/gtk+2.0-2.21.7/gdk/x11/gdkevents-x11.c:2371
#18 0x00ae0015 in g_main_dispatch (conte...

Read more...

Changed in gnome-terminal (Ubuntu):
status: Incomplete → Triaged
tags: added: iso-testing
Revision history for this message
Milan Bouchet-Valat (nalimilan) wrote :

Seems also to occur very often when Unity crashes, obviously for the same reason (mutter dies).

Changed in gnome-terminal (Ubuntu):
importance: Medium → High
summary: - gnome-terminal crashed with signal 5 in _XError()
+ gnome-terminal crashes when Mutter is restarted
summary: - gnome-terminal crashes when Mutter is restarted
+ gnome-terminal crashed with signal 5 in _XError() when Mutter is
+ restarted
Revision history for this message
Salih EMIN (salih-emin) wrote :

I confirm that this also to occur very often in up-to-date Unity. Also it seems that Mutter restarts.

Changed in gnome-terminal (Ubuntu):
assignee: nobody → Canonical Desktop Team (canonical-desktop-team)
Changed in gnome-terminal (Ubuntu Maverick):
assignee: Canonical Desktop Team (canonical-desktop-team) → Chris Coulson (chrisccoulson)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

just a note, as told on IRC: it happens with gnome-shell and unity.

Revision history for this message
Chris Coulson (chrisccoulson) wrote :
Download full text (3.5 KiB)

This is where it fails:

000:<:1297: 28: Request(18): ChangeProperty mode=Replace(0x00) window=0x06400103 property=0x15c("_NET_WM_DESKTOP") type=0x6("CARDINAL") data=0x00000000;
000:<:1298: 4: Request(43): GetInputFocus
000:>:1297:Error 3=Window: major=18, minor=0, bad=104857859

...but, this window had been destroyed already:

000:<:1028: 8: Request(4): DestroyWindow window=0x06400103
000:<:1029: 4: Request(43): GetInputFocus
000:>:1029: Event DestroyNotify(17) event=0x06400103 window=0x06400103
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x19b(unrecognized atom) time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x1bd(unrecognized atom) time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x162("_NET_WM_STATE") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x17a("WM_STATE") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x159("_NET_FRAME_EXTENTS") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x15c("_NET_WM_DESKTOP") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x1a5(unrecognized atom) time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x23("WM_HINTS") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x1cb("XdndAware") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x1cd("_MOTIF_DRAG_RECEIVER_INFO") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x15d("_NET_WM_ICON") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x156("WM_WINDOW_ROLE") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x16d("_NET_WM_SYNC_REQUEST_COUNTER") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x16e("_NET_WM_WINDOW_TYPE") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x175("_NET_WM_USER_TIME_WINDOW") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x151("WM_CLIENT_LEADER") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x160("_NET_WM_PID") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x153("WM_LOCALE_NAME") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x24("WM_CLIENT_MACHINE") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x28("WM_NORMAL_HINTS") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x154("WM_PROTOCOLS") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(28) window=0x06400103 atom=0x43("WM_CLASS") time=0x00c10b3c state=Deleted(0x01)
000:>:1029: Event PropertyNotify(2...

Read more...

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, I think what is happening here is that from terminal_window_composited_changed_cb, it is passing an invalid GdkWindow to terminal_util_x11_set_net_wm_desktop. It seems to be passing the one that was just destroyed when unrealizing the TerminalWindow.

I will test a patch for this in a minute

Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Ok, I've uploaded a fix for this now

Changed in gnome-terminal (Ubuntu Maverick):
status: Triaged → Fix Committed
milestone: none → ubuntu-10.10
Revision history for this message
Chris Coulson (chrisccoulson) wrote :

Sent upstream now

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-terminal - 2.31.91-0ubuntu2

---------------
gnome-terminal (2.31.91-0ubuntu2) maverick; urgency=low

  * Fix LP: #633303 - gnome-terminal crashed with signal 5 in _XError()
    when Mutter is restarted. Make sure gnome-terminal sets _NET_WM_DESKTOP
    on the new X window, rather than the one that was destroyed previously
    - add debian/patches/21_dont_crash_on_composite_change.patch
    - update debian/patches/series
 -- Chris Coulson <email address hidden> Mon, 20 Sep 2010 14:53:22 +0100

Changed in gnome-terminal (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in gnome-terminal:
importance: Unknown → Medium
status: Unknown → New
Changed in gnome-terminal:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.