wlc
wlc copied to clipboard
GTK3 (gnome-terminal) crashing
I've also posted a ticket with sway as I'm not sure of the source. I'm not that experienced in software debugging, so I apologize if there's information missing.
Getting random crashes with gnome-terminal (GTK3) when I left/right click a lot and move between windows (haven't narrowed down the exact cause). It's difficult to trigger, but does happen frequency enough to be an issue.
~ > gdb --args /usr/lib/gnome-terminal/gnome-terminal-server --app-id my.foo
GNU gdb (GDB) 7.10
Copyright (C) 2015 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 "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/lib/gnome-terminal/gnome-terminal-server...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/lib/gnome-terminal/gnome-terminal-server --app-id my.foo
[New LWP 12011]
[New LWP 12012]
[New LWP 12013]
/usr/lib/gnome-terminal/gnome-terminal-migration: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
Profile migrator exited with status 127
(gnome-terminal-server:12007): Gdk-WARNING **: Error 22 (Invalid argument) dispatching to Wayland display.
[LWP 12012 exited]
[LWP 12011 exited]
[LWP 12007 exited]
[Inferior 1 (process 12007) exited with code 01]
(gdb) q
Source of error message (if it's any help): https://github.com/GNOME/gtk/blob/5ea692df23cf6caed7624554be46b8f39fe008ce/gdk/wayland/gdkeventsource.c#L167 @sce https://github.com/SirCmpwn/sway/issues/229#issuecomment-156751190
Do you have wlc output as well? Most likely the terminal crashes due to unimplemented wayland protocol features in wlc.
Not yet, wasn't sure how to get it. Does it output messages in stdout or do I have set a flag first?
See the FAQ for how to get a log.
@SirCmpwn That's only for sway and not wlc, no?
Nah, sway will pull in the wlc logs for you, too.
https://gist.github.com/Manouchehri/cb23ad1ba27ac550cffc
I think it starts at line 2400 or 2180. I don't see any obvious error messages though except for [wlc] libinput bug: Unable to find topmost touch.
The log looks quite ok, this may be very likely bug in gnome-terminal. Is this reproducable in weston?
Before everything, do you know if you have libgconf-2.so.4 in your system? Have you tried reproducing the bug in Xorg?
@Kinokoio The GDK error explicitly says it's an error in Wayland, so I'm pretty sure I won't be able to reproduce it in Xorg.
@Cloudef My guess GTK is trying to use something that's not implemented and/or encountering a non-fatal error, but then quitting anyways. It's being triggered by wl_display_dispatch (display_wayland->wl_display) < 0, any idea what might cause that?
Do you have the file and/or function where it crashes?
@Kinokoio It's listed in the first post, or click here.
@Kinokoio Re: libgconf-2.so.4, GConf is not used in GTK3 (or GNOME).
Indeed, it is good info but, you don't have the complete backtrace. You get it using the command bt in gdb. Still, what trills me is the following error:
usr/lib/gnome-terminal/gnome-terminal-migration: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
@Kinokoio I don't use gdb too often, what exactly do I need to do to get the stack at the moment it crashes? I usually just debug line-by-line for my own asm programs, but that's not gonna work with a huge application.
gnome-terminal-migration is expected to fail, it happens during the application's startup and doesn't do anything harmful (from what I can tell). The package should probably be built with --disable-migration, but I'm not the maintainer so it's not my call.
When the program crashes, it takes you to the gdb command prompt. There, you can use "bt" to get the current backtrace. Unfortunately, you don't have debugging symbols, so you would get only hex addresses.
You can use the command "x" combined with a form of representation (use the help command for more) like "x/10i" "address", which will get you the next 10 asm instruction starting from that address.
Edit: Changed "<" to """
The program does exit with 1 though, so won't the stack be empty?
Sorry, I forgot about that. Place a break at the exit instruction or the gwarning macro.
Also, just installed gnome-terminal on ArchLinux and tested it both in orbment and Xorg with gconf installed. It works perfectly.

Ah, thanks. I'll give that a shot this week.
It runs quite well for me too, it's a rather difficult bug to trigger reliably. You have to start copy-pasting, left/right clicking and move between windows rapidly for several minutes.
wl_display_dispatch (display_wayland->wl_display) < 0, any idea what might cause that?
Usually if wl_display_dispatch fails, it means connection to the compositor is broken.
is there an update to this? copying/ pasting is quite unreliable.