After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766392 - SEGV in grilo-plugins from rhythmbox 3.3.1 under wayland
SEGV in grilo-plugins from rhythmbox 3.3.1 under wayland
Status: RESOLVED OBSOLETE
Product: rhythmbox
Classification: Other
Component: Plugins (other)
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 763679 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-05-13 18:50 UTC by Diane Trout
Modified: 2018-05-24 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
segfault in g_type_check_instance_is_fundamentally_a (30.61 KB, text/plain)
2016-05-13 18:50 UTC, Diane Trout
  Details
segv in g_hash_table_lookup_node (32.94 KB, text/plain)
2016-05-13 18:51 UTC, Diane Trout
  Details
crash in g_type_check_instance_is_fundamentally_a pid 19143 (39.49 KB, text/plain)
2016-05-13 19:24 UTC, Diane Trout
  Details
GRL_DEBUG=0:0 log for pid 19143 (44.00 KB, text/x-log)
2016-05-13 19:25 UTC, Diane Trout
  Details
thread apply all bt full backtrace (99.14 KB, text/plain)
2016-05-13 19:58 UTC, Diane Trout
  Details
grilo: port to 0.3 (3.89 KB, patch)
2016-05-13 21:20 UTC, Victor Toso
none Details | Review
grilo: fix crash due NULL url from GrlMedia (1.50 KB, patch)
2016-05-13 21:20 UTC, Victor Toso
none Details | Review
grilo: port to 0.3 (3.89 KB, patch)
2016-05-14 11:53 UTC, Victor Toso
committed Details | Review
grilo: fix crash due NULL url from GrlMedia (1.50 KB, patch)
2016-05-14 11:54 UTC, Victor Toso
committed Details | Review
grilo: try to avoid crash due bogus pointer (1.97 KB, patch)
2016-05-14 11:54 UTC, Victor Toso
none Details | Review
SIGSEGV, Segmentation fault in g_type_check_instance_is_fundamentally_a (56.73 KB, text/plain)
2016-05-15 02:28 UTC, Diane Trout
  Details

Description Diane Trout 2016-05-13 18:50:17 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.
Comment 1 Diane Trout 2016-05-13 18:51:09 UTC
Created attachment 327817 [details]
segv in g_hash_table_lookup_node
Comment 2 Victor Toso 2016-05-13 18:59:49 UTC
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
Comment 3 Diane Trout 2016-05-13 19:24:07 UTC
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
Comment 4 Diane Trout 2016-05-13 19:25:25 UTC
Created attachment 327823 [details]
GRL_DEBUG=0:0 log for pid 19143

GRL_DEBUG log pid included to match with a stacktrace.
Comment 5 Victor Toso 2016-05-13 19:43:53 UTC
(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.

  • #0 g_type_check_instance_is_fundamentally_a
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./gobject/gtype.c line 4033
  • #1 g_object_get
    at /build/glib2.0-wnDt2X/glib2.0-2.48.1/./gobject/gobject.c line 2319
  • #2 rb_grilo_source_new
    at rb-grilo-source.c line 424

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!
Comment 6 Diane Trout 2016-05-13 19:58:11 UTC
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)
Comment 7 Victor Toso 2016-05-13 21:20:48 UTC
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.
Comment 8 Victor Toso 2016-05-13 21:20:54 UTC
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
Comment 9 Bastien Nocera 2016-05-13 21:23:34 UTC
*** Bug 763679 has been marked as a duplicate of this bug. ***
Comment 10 Diane Trout 2016-05-13 23:31:58 UTC
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
Comment 11 Victor Toso 2016-05-14 11:28:55 UTC
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.
Comment 12 Victor Toso 2016-05-14 11:53:58 UTC
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
Comment 13 Victor Toso 2016-05-14 11:54:11 UTC
Created attachment 327875 [details] [review]
grilo: fix crash due NULL url from GrlMedia

  • #0 g_str_hash
    at ghash.c line 1876

Comment 14 Victor Toso 2016-05-14 11:54:20 UTC
Created attachment 327876 [details] [review]
grilo: try to avoid crash due bogus pointer

Backtrace in the bug.
Comment 15 Victor Toso 2016-05-14 11:55:10 UTC
Diane, Let me know if the last patch helps.
Comment 16 Diane Trout 2016-05-15 02:28:20 UTC
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
Comment 17 Jonathan Matthew 2016-05-16 12:43:26 UTC
Review of attachment 327874 [details] [review]:

ok
Comment 18 Jonathan Matthew 2016-05-16 12:46:15 UTC
Review of attachment 327875 [details] [review]:

ok
Comment 19 Victor Toso 2016-05-17 06:26:21 UTC
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
Comment 20 GNOME Infrastructure Team 2018-05-24 18:52:13 UTC
-- 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.