Enerccio / ewlc

Wayland compositor library - extended
MIT License
20 stars 3 forks source link

GTK3 (gnome-terminal) crashing #42

Open WLCIssuesBot opened 7 years ago

WLCIssuesBot commented 7 years ago

Issue by Manouchehri Monday Nov 16, 2015 at 01:34 GMT Originally opened as https://github.com/Cloudef/wlc/issues/85


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

WLCIssuesBot commented 7 years ago

Comment by Cloudef Monday Nov 16, 2015 at 09:16 GMT


Do you have wlc output as well? Most likely the terminal crashes due to unimplemented wayland protocol features in wlc.

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Monday Nov 16, 2015 at 12:38 GMT


Not yet, wasn't sure how to get it. Does it output messages in stdout or do I have set a flag first?

WLCIssuesBot commented 7 years ago

Comment by SirCmpwn Monday Nov 16, 2015 at 12:39 GMT


See the FAQ for how to get a log.

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Monday Nov 16, 2015 at 14:19 GMT


@SirCmpwn That's only for sway and not wlc, no?

WLCIssuesBot commented 7 years ago

Comment by SirCmpwn Monday Nov 16, 2015 at 14:20 GMT


Nah, sway will pull in the wlc logs for you, too.

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Monday Nov 16, 2015 at 14:35 GMT


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.

WLCIssuesBot commented 7 years ago

Comment by Cloudef Monday Nov 16, 2015 at 15:31 GMT


The log looks quite ok, this may be very likely bug in gnome-terminal. Is this reproducable in weston?

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 03:37 GMT


Before everything, do you know if you have libgconf-2.so.4 in your system? Have you tried reproducing the bug in Xorg?

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 03:43 GMT


@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?

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 03:43 GMT


Do you have the file and/or function where it crashes?

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 03:45 GMT


@Kinokoio It's listed in the first post, or click here.

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 03:48 GMT


@Kinokoio Re: libgconf-2.so.4, GConf is not used in GTK3 (or GNOME).

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 03:50 GMT


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

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 03:58 GMT


@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.

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 04:05 GMT


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 "\""

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 04:06 GMT


The program does exit with 1 though, so won't the stack be empty?

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 04:09 GMT


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.

WLCIssuesBot commented 7 years ago

Comment by Kinokoio Tuesday Nov 17, 2015 at 04:11 GMT


2015-11-16-220850_1920x1080_scrot

WLCIssuesBot commented 7 years ago

Comment by Manouchehri Tuesday Nov 17, 2015 at 04:13 GMT


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.

WLCIssuesBot commented 7 years ago

Comment by Cloudef Tuesday Nov 17, 2015 at 08:27 GMT


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.

WLCIssuesBot commented 7 years ago

Comment by nicman23 Wednesday Apr 06, 2016 at 09:12 GMT


is there an update to this? copying/ pasting is quite unreliable.