GNOME Bugzilla – Bug 770044
rhythmbox-3.3.1 grilo plugin crashes on reload
Last modified: 2016-08-26 13:11:36 UTC
1. Open rhythmbox plugins window. 2. Toggle Enable / Disable grilo plugin 3. Rhythmbox crashes.
Stack trace of crash: gdb) bt
+ Trace 236553
This doesn't look like it's grilo's fault.
Created attachment 334140 [details] [review] grilo: fix segfault due bad signal handler If restart the Grilo plugin, the signal handler for "source-added" and "source-removed" will remain alive causing a crash as the previous RBGriloPlugin does not exist anymore. Backtrace: #0 0x00007f0f9af231c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007f0f9af2464a in __GI_abort () at abort.c:89 #2 0x00007f0f9b7386a5 in g_assertion_message (domain=domain@entry=0x7f0f9b759fae "GLib", file=file@entry=0x7f0f9b75ec90 "/build/glib2.0-fJSoGg/glib2.0-2.48.1/./glib/ghash.c", line=line@entry=373, func=func@entry=0x7f0f9b75eed0 <__func__.10230> "g_hash_table_lookup_node", message=message@entry=0x3113c30 "assertion failed: (hash_table->ref_count > 0)") at ././glib/gtestutils.c:2429 #3 0x00007f0f9b73873a in g_assertion_message_expr (domain=domain@entry=0x7f0f9b759fae "GLib", file=file@entry=0x7f0f9b75ec90 "/build/glib2.0-fJSoGg/glib2.0-2.48.1/./glib/ghash.c", line=line@entry=373, func=func@entry=0x7f0f9b75eed0 <__func__.10230> "g_hash_table_lookup_node", expr=expr@entry=0x7f0f9b75ebd8 "hash_table->ref_count > 0") at ././glib/gtestutils.c:2452 #4 0x00007f0f9b701c4e in g_hash_table_lookup (hash_return=<synthetic pointer>, key=0x19ec730, hash_table=0x7f0f9ea9ca70) at ././glib/ghash.c:373 #5 0x00007f0f9b701c4e in g_hash_table_lookup (hash_table=0x7f0f9ea9ca70, key=key@entry=0x19ec730) at ././glib/ghash.c:1147 #6 0x00007f0f74024c93 in grilo_source_removed_cb (registry=<optimized out>, grilo_source=0x19ec730 [GrlBookmarksSource], plugin=0x277d370) at rb-grilo-plugin.c:161 Reported-by: vrishab <vrishab.in@gmail.com>
Created attachment 334143 [details] [review] -- v1->v2 * indentation: tabs! -- grilo: fix segfault due bad signal handler If restart the Grilo plugin, the signal handler for "source-added" and "source-removed" will remain alive causing a crash as the previous RBGriloPlugin does not exist anymore. Backtrace: #0 0x00007f0f9af231c8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007f0f9af2464a in __GI_abort () at abort.c:89 #2 0x00007f0f9b7386a5 in g_assertion_message (domain=domain@entry=0x7f0f9b759fae "GLib", file=file@entry=0x7f0f9b75ec90 "/build/glib2.0-fJSoGg/glib2.0-2.48.1/./glib/ghash.c", line=line@entry=373, func=func@entry=0x7f0f9b75eed0 <__func__.10230> "g_hash_table_lookup_node", message=message@entry=0x3113c30 "assertion failed: (hash_table->ref_count > 0)") at ././glib/gtestutils.c:2429 #3 0x00007f0f9b73873a in g_assertion_message_expr (domain=domain@entry=0x7f0f9b759fae "GLib", file=file@entry=0x7f0f9b75ec90 "/build/glib2.0-fJSoGg/glib2.0-2.48.1/./glib/ghash.c", line=line@entry=373, func=func@entry=0x7f0f9b75eed0 <__func__.10230> "g_hash_table_lookup_node", expr=expr@entry=0x7f0f9b75ebd8 "hash_table->ref_count > 0") at ././glib/gtestutils.c:2452 #4 0x00007f0f9b701c4e in g_hash_table_lookup (hash_return=<synthetic pointer>, key=0x19ec730, hash_table=0x7f0f9ea9ca70) at ././glib/ghash.c:373 #5 0x00007f0f9b701c4e in g_hash_table_lookup (hash_table=0x7f0f9ea9ca70, key=key@entry=0x19ec730) at ././glib/ghash.c:1147 #6 0x00007f0f74024c93 in grilo_source_removed_cb (registry=<optimized out>, grilo_source=0x19ec730 [GrlBookmarksSource], plugin=0x277d370) at rb-grilo-plugin.c:161 Reported-by: vrishab <vrishab.in@gmail.com>
This fixes the crash. Tested on git rhythmbox. Thanks !
Why resolved as fixed? The patch was not commited.
Review of attachment 334143 [details] [review]: > fix segfault due bad signal handler Fix crash due to lingering signal handler > If restart the Grilo plugin, the signal handler for "source-added" and > "source-removed" will remain alive causing a crash as the previous > RBGriloPlugin does not exist anymore. If the grilo rhythmbox plugin is deactivated and reactivated, the signal... ... as the previous RBGriloPlugin instance does not exist anymore. Looks good to me otherwise. Would be nice to know why the sources aren't reaped though.
(In reply to Bastien Nocera from comment #7) > Review of attachment 334143 [details] [review] [review]: > > > fix segfault due bad signal handler > > Fix crash due to lingering signal handler > > > If restart the Grilo plugin, the signal handler for "source-added" and > > "source-removed" will remain alive causing a crash as the previous > > RBGriloPlugin does not exist anymore. > > If the grilo rhythmbox plugin is deactivated and reactivated, the signal... > ... as the previous RBGriloPlugin instance does not exist anymore. > > Looks good to me otherwise. Thanks, fixed. > > Would be nice to know why the sources aren't reaped though. Hm, they are removed after plugin deactivation (here). File a new bug? I'll be pushing this one.
pushed as https://git.gnome.org/browse/rhythmbox/commit/?id=d0e28c07b16969e611243edec9a26e151dfcca2f
(In reply to Hussam Al-Tayeb from comment #6) > Why resolved as fixed? The patch was not commited. Sorry about that.