GNOME Bugzilla – Bug 766392
SEGV in grilo-plugins from rhythmbox 3.3.1 under wayland
Last modified: 2018-05-24 18:52:13 UTC
Created attachment 327816 [details] segfault in g_type_check_instance_is_fundamentally_a Rhythmbox in Debian unstable under wayland crashes either a few moments after its loaded and a song is play if grilo-plugins are enabled, or immediately upon enabling grilo if it was disabled on startup and a song is currently playing. I captured a few coredumps in a different part of grilo-tracker from grilo-plugins-0.3.0, but after updating to grilo-plugins-0.3.1 I still had a SEGV, but the backtrace seemed to be in a different place. (And coredumpctl is being mysterious about when it decides to log a coredump) Interestingly I got a couple of different gdb backtraces. Here's the system info from Debian report bug, I filed a bug at Debian's bts at http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=824210 -- System Information: Debian Release: stretch/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.5.0-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages grilo-plugins-0.3 depends on: ii libarchive13 3.1.2-11+b1 ii libavahi-client3 0.6.32~rc+dfsg-1 ii libavahi-common3 0.6.32~rc+dfsg-1 ii libavahi-glib1 0.6.32~rc+dfsg-1 ii libavahi-gobject0 0.6.32~rc+dfsg-1 ii libc6 2.22-7 ii libdmapsharing-3.0-2 2.9.34-1 ii libgdata22 0.17.4-1 ii libglib2.0-0 2.48.1-1 ii libgmime-2.6-0 2.6.20-1+b1 ii libgoa-1.0-0b 3.20.1-1 ii libgom-1.0-0 0.3.2-1 ii libgrilo-0.3-0 0.3.0-1.1 ii libgstreamer1.0-0 1.8.1-1 ii libjson-glib-1.0-0 1.2.0-1 ii liblua5.3-0 5.3.1-1 ii libmediaart-2.0-0 1.9.0-2 ii liboauth0 1.0.1-1 ii libsoup2.4-1 2.54.1-1 ii libsqlite3-0 3.12.2-1 ii libtotem-plparser18 3.10.6-4 ii libtracker-sparql-1.0-0 1.8.0-2+b1 ii libxml2 2.9.3+dfsg1-1 Versions of packages grilo-plugins-0.3 recommends: ii dleyna-server 0.4.0-1 grilo-plugins-0.3 suggests no packages.
Created attachment 327817 [details] segv in g_hash_table_lookup_node
Could you install the debug info for your grilo packages? Would also be helpful if you can run rhythmbox from command line with grilo debug like: GRL_DEBUG=*:* rhythmbox
Created attachment 327822 [details] crash in g_type_check_instance_is_fundamentally_a pid 19143 Gdb log with more symbol tables. pid included to help match grilo.log files
Created attachment 327823 [details] GRL_DEBUG=0:0 log for pid 19143 GRL_DEBUG log pid included to match with a stacktrace.
(In reply to Diane Trout from comment #4) > Created attachment 327823 [details] > GRL_DEBUG=0:0 log for pid 19143 > > GRL_DEBUG log pid included to match with a stacktrace. Is this the full log? it seems only part of it.
+ Trace 236243
Looks like a bug on rhythmbox. https://git.gnome.org/browse/rhythmbox/tree/plugins/grilo/rb-grilo-source.c#n412 I'm building rhythmbox here to see if I can trigger it. Many thanks for the bug report!
Created attachment 327825 [details] thread apply all bt full backtrace I forgot to lookup how to get backtraces for all the threads. So hopefully this backtrace is more complete. Unless it was the GRL_DEBUG log you thought was missing something. For that I had done GRL_DEBUG=*:* rhythmbox 2>&1 > grilo.log Though now that I look at the console there's also some other errors. (These are the messages that didn't go to the log file) (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-bookmarks' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-raitv' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-optical-media' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-appletrailers-lua' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-video-title-parsing' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-musicbrainz-coverart' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-guardianvideos-lua' not found (rhythmbox:20379): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-euronews-lua' not found sys:1: Warning: invalid unclassed pointer in cast to 'GObject' sys:1: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed (rhythmbox:20379): dconf-WARNING **: failed to commit changes to dconf: Timeout was reached Segmentation fault (core dumped)
Created attachment 327830 [details] [review] grilo: port to 0.3 Current grilo version is 0.3.1. There were a few API breaks from 0.2.x to 0.3.0 which this patch addresses.
Created attachment 327831 [details] [review] grilo: fix crash due NULL url from GrlMedia #0 g_str_hash (v=0x0) at ghash.c:1876 #1 in g_hash_table_lookup_node (hash_return=<synthetic pointer>, key=0x0, hash_table=0x604640) at ghash.c:375 #2 g_hash_table_lookup (hash_table=0x604640, key=key@entry=0x0) at ghash.c:1147 #3 in rb_refstring_find (init=0x0) at rb-refstring.c:122 #4 in rhythmdb_entry_lookup_by_location (db=0x76a490, uri=<optimized out>) at rhythmdb.c:4036 #5 in create_entry_for_media (container=0x0, data=0xcb5360, entry_type=<optimized out>, db=0x76a490) at rb-grilo-source.c:553
*** Bug 763679 has been marked as a duplicate of this bug. ***
Debian had their own port to grilo 0.3 patch. http://sources.debian.net/src/rhythmbox/3.3.1-1/debian/patches/grilo-0.3.patch/ which is a bit shorter than the one provided above by Victor Toso. I tried rebuilding rhythmbox with the the Debian grilo 0.3 patch + Victor's grilo: fix crash due NULL url from GrlMedia but that didn't seem to be enough to fix the grilo problem. I also tried replacing the debian grilo-0.3.patch with the one above, but that failed because Debian only has grilo 0.3.0 available. I'm not sure if it'd be better to reduce the PKG_CONFIG check to 0.3.0 from Victors patch or try upgrading to grilo 0.3.1? There's also some other crash that happens after rhythmbox has been running for a while, even with grilo turned off... I'm not sure what triggers it. I'm trying to leave rhythmbox running under gdb to see if I can catch a stack trace. Diane
Hi Diane, thanks for testing the patches. > I tried rebuilding rhythmbox with the the Debian grilo 0.3 patch + Victor's > grilo: fix crash due NULL url from GrlMedia but that didn't seem to be > enough to fix the grilo problem. You are correct. After building and testing on my side, this was the crash I was able to reproduce and fix which was also the crash on Bug 763679. You can see in the backtrace that you have attached (or the smaller version on Comment #5) that your crash happens elsewhere. > > I also tried replacing the debian grilo-0.3.patch with the one above, but > that failed because Debian only has grilo 0.3.0 available. I'm not sure if > it'd be better to reduce the PKG_CONFIG check to 0.3.0 from Victors patch or > try upgrading to grilo 0.3.1? 0.3.0 should be enough to check due the API break from 0.2.x. I recommend to use 0.3.1 due bug fixes. > > There's also some other crash that happens after rhythmbox has been running > for a while, even with grilo turned off... I'm not sure what triggers it. > I'm trying to leave rhythmbox running under gdb to see if I can catch a > stack trace. > > Diane If you are able to get the backtrace, feel free to open a new bug with it.
Created attachment 327874 [details] [review] grilo: port to 0.3 Current grilo version is 0.3.1. There were a few API breaks from 0.2.x to 0.3.0 which this patch addresses. v1->v2 use grilo 0.3.0 as base, not 0.3.1
Created attachment 327875 [details] [review] grilo: fix crash due NULL url from GrlMedia
+ Trace 236246
Created attachment 327876 [details] [review] grilo: try to avoid crash due bogus pointer Backtrace in the bug.
Diane, Let me know if the last patch helps.
Created attachment 327915 [details] SIGSEGV, Segmentation fault in g_type_check_instance_is_fundamentally_a The good news is the g_hash_table_lookup_node crash seems to be fixed. I used your 3 patches 327874 327875 and 327876. However the g_type_check_instance_is_fundamentally_a crash is still happening. A better log attached. Here's some of the console debugging messages not captured by gdb logging sys:1: Warning: g_hash_table_lookup: assertion 'hash_table != NULL' failed (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-bookmarks' not found [Thread 0x7fffc7fff700 (LWP 6690) exited] (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-raitv' not found (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-optical-media' not found [New Thread 0x7fffb4def700 (LWP 6691)] (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-appletrailers-lua' not found (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-video-title-parsing' not found (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-musicbrainz-coverart' not found (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-guardianvideos-lua' not found (rhythmbox:6672): Grilo-WARNING **: [registry] grl-registry.c:979: source 'grl-euronews-lua' not found sys:1: Warning: invalid unclassed pointer in cast to 'GObject' sys:1: Warning: g_object_get: assertion 'G_IS_OBJECT (object)' failed
Review of attachment 327874 [details] [review]: ok
Review of attachment 327875 [details] [review]: ok
Attachment 327874 [details] pushed as c5febca - grilo: port to 0.3 Attachment 327875 [details] pushed as 3e986dd - grilo: fix crash due NULL url from GrlMedia
-- 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/rhythmbox/issues/1455.