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 733582 - rhythmbox crashes with SIGSEGV in tracker_evt_update_orphan_item_cb
rhythmbox crashes with SIGSEGV in tracker_evt_update_orphan_item_cb
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
0.2.x
Other Linux
: Normal major
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-07-22 22:04 UTC by gnome.vrb
Modified: 2015-08-25 16:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tracker: Keep references to GrlTrackerSources in global hash table (4.02 KB, patch)
2014-12-23 10:24 UTC, Philip Withnall
committed Details | Review

Description gnome.vrb 2014-07-22 22:04:18 UTC
[New LWP 3599]
[New LWP 3600]
[New LWP 3601]
[New LWP 3628]
[New LWP 3632]
[New LWP 3629]
[New LWP 3611]
[New LWP 3633]
[New LWP 3640]
[New LWP 3642]
[New LWP 3630]
[New LWP 3643]
[New LWP 3672]
[New LWP 3641]
[New LWP 3677]
[New LWP 3644]
[New LWP 3678]
[New LWP 3676]
[New LWP 3639]
[New LWP 3609]
[New LWP 3631]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./rhythmbox'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 1 (Thread 0x7fb65bfe5a40 (LWP 3599))

  • #0 tracker_evt_update_orphan_item_cb
    at grl-tracker-source-notif.c line 222
  • #1 g_simple_async_result_complete
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 763
  • #2 complete_in_idle_cb_for_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 831
  • #3 g_main_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3064
  • #4 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3663
  • #5 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3734
  • #6 g_main_context_iteration
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3795
  • #7 g_application_run
    at /tmp/buildd/glib2.0-2.40.0/./gio/gapplication.c line 2114
  • #8 rb_application_run
    at /home/sid/source/git/rhythmbox/shell/rb-application.c line 646
  • #9 main
    at /home/sid/source/git/rhythmbox/shell/main.c line 89

Comment 1 gnome.vrb 2014-07-22 22:07:12 UTC
(gdb) where
  • #0 tracker_evt_update_orphan_item_cb
    at grl-tracker-source-notif.c line 222

(gdb) info args
object = <optimized out>
result = <optimized out>
evt = 0x3d63c40

(gdb) p *evt
$10 = {
  inserted_items = 0x32ba300, 
  deleted_items = 0x24f7ea0, 
  updated_items = 0x3ec59e0, 
  orphan_items = 0x3ec5aa0, 
  new_sources = 0x0, 
  old_sources = 0x0, 
  cursor = 0x7fb578002960, 
  in_use = 0, 
  change_type = GRL_CONTENT_CHANGED
}

(gdb) info locals
__inst = 0x3b7a4f0
__t = 61415728
__r = <optimized out>
id = 102929
type = 0x7fb584007378 "http://www.w3.org/2000/01/rdf-schema#Resource,http://www.semanticdesktop.org/ontologies/2007/01/19/nie#DataObject,http://www.semanticdesktop.org/ontologies/2007/01/19/nie#InformationElement,http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#FileDataObject,http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#DataContainer,http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Folder"
datasource = 0x7fb584005e68 "urn:nepomuk:datasource:9291a450-1d49-11de-8c30-0800200c9a66"
source = 0x3b7a4f0
error = 0x0
__FUNCTION__ = "tracker_evt_update_orphan_item_cb"

(gdb) p *source
$11 = {
  parent = {
    parent = {
      g_type_instance = {
        g_class = 0xa00000000
      }, 
      ref_count = 2, 
      qdata = 0x3c
    }, 
    priv = 0x0, 
    _grl_reserved = {0x3b31f70, 0x3e131c0, 0x0, 0x0, 0x0, 0x0, 0x2be15d0, 0x0, 0x0, 0x0, 0x3acc750, 0x0, 0x3ff9800, 0x0, 0x2bb8610, 0x1}
  }, 
  priv = 0x3d3aa10
}

(gdb) p source->priv
$12 = (GrlTrackerSourcePriv *) 0x3d3aa10

(gdb) p *(source->priv)
$13 = {
  tracker_connection = 0x100000001, 
  operations = 0x39, 
  tracker_datasource = 0x3f05fc0 "\200\245\267\003", 
  notify_changes = 1471778448, 
  state = 32694, 
  notification_ref = 48
}
Comment 2 gnome.vrb 2014-07-22 22:12:18 UTC
I'm not sure of the exact steps to reproduce. Though, one instance was when a song was playing in rhythmbox and I was viewing content in the 'Context Pane' ( plugin ) for the playing song and I switched from the 'Albums' tab to the 'Lyrics' tab in the context pane, and rhythmbox crashed due to this error. ( The trace in the bug description was from this scenario )

But, I've encountered this crash a dozen times in the past 1 week, and all this while doing different things in rhythmbox ( mostly in Jamendo tab )
Comment 3 gnome.vrb 2014-07-22 22:26:11 UTC
Crash 2:
-------



[New LWP 6129]
[New LWP 6137]
[New LWP 6194]
[New LWP 6130]
[New LWP 6142]
[New LWP 6199]
[New LWP 6131]
[New LWP 6151]
[New LWP 6202]
[New LWP 6136]
[New LWP 6191]
[New LWP 6196]
[New LWP 6214]
[New LWP 6192]
[New LWP 6193]
[New LWP 6215]
[New LWP 6216]
[New LWP 6201]
[New LWP 6195]
[New LWP 6217]
[New LWP 6200]
[New LWP 6218]
[New LWP 6144]
[New LWP 6219]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./rhythmbox'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 24 (Thread 0x7ffc11a07700 (LWP 6219))

  • #0 g_hash_table_foreach
    at /tmp/buildd/glib2.0-2.40.0/./glib/ghash.c line 1553
  • #1 g_hash_table_foreach
    at /tmp/buildd/glib2.0-2.40.0/./glib/ghash.c line 1550
  • #2 g_hash_table_foreach
    at /tmp/buildd/glib2.0-2.40.0/./glib/ghash.c line 1550
  • #3 g_hash_table_foreach
    at /tmp/buildd/glib2.0-2.40.0/./glib/ghash.c line 1550
  • #4 conjunctive_query
    at /home/sid/source/git/rhythmbox/rhythmdb/rhythmdb-tree.c line 2256
  • #5 do_query_recurse
    at /home/sid/source/git/rhythmbox/rhythmdb/rhythmdb-tree.c line 2344
  • #6 rhythmdb_tree_do_full_query
    at /home/sid/source/git/rhythmbox/rhythmdb/rhythmdb-tree.c line 2383
  • #7 rhythmdb_query_internal
    at /home/sid/source/git/rhythmbox/rhythmdb/rhythmdb.c line 4039
  • #8 query_thread_main
    at /home/sid/source/git/rhythmbox/rhythmdb/rhythmdb.c line 4062
  • #9 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307
  • #10 g_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthread.c line 764
  • #11 start_thread
    at pthread_create.c line 309
  • #12 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 1 (Thread 0x7ffcd5fc9a40 (LWP 6129))

  • #0 tracker_evt_update_orphan_item_cb
    at grl-tracker-source-notif.c line 222
  • #1 g_simple_async_result_complete
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 763
  • #2 complete_in_idle_cb_for_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 831
  • #3 g_main_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3064
  • #4 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3663
  • #5 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3734
  • #6 g_main_context_iteration
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3795
  • #7 g_application_run
    at /tmp/buildd/glib2.0-2.40.0/./gio/gapplication.c line 2114
  • #8 rb_application_run
    at /home/sid/source/git/rhythmbox/shell/rb-application.c line 646
  • #9 main
    at /home/sid/source/git/rhythmbox/shell/main.c line 89

Comment 4 gnome.vrb 2014-07-22 22:26:40 UTC
Crash 3:
--------


[New LWP 6245]
[New LWP 6247]
[New LWP 6257]
[New LWP 6304]
[New LWP 6252]
[New LWP 6312]
[New LWP 6302]
[New LWP 6253]
[New LWP 6306]
[New LWP 6315]
[New LWP 6303]
[New LWP 6309]
[New LWP 6334]
[New LWP 6305]
[New LWP 6314]
[New LWP 6326]
[New LWP 6336]
[New LWP 6335]
[New LWP 6328]
[New LWP 6337]
[New LWP 6263]
[New LWP 6246]
[New LWP 6329]
[New LWP 6313]
[New LWP 6333]
[New LWP 6301]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `./rhythmbox'.
Program terminated with signal SIGSEGV, Segmentation fault.

Thread 18 (Thread 0x7f783bfff700 (LWP 6335))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_1081
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at ../nptl/pthread_mutex_lock.c line 134
  • #3 g_mutex_lock
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c line 209
  • #4 ??
    from /usr/lib/x86_64-linux-gnu/libtracker-sparql-1.0.so.0
  • #5 ??
    from /usr/lib/x86_64-linux-gnu/libtracker-sparql-1.0.so.0
  • #6 io_job_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gioscheduler.c line 85
  • #7 g_task_thread_pool_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gtask.c line 1213
  • #8 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307
  • #9 g_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthread.c line 764
  • #10 start_thread
    at pthread_create.c line 309
  • #11 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 17 (Thread 0x7f783b7fe700 (LWP 6336))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 135
  • #1 _L_lock_1081
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __GI___pthread_mutex_lock
    at ../nptl/pthread_mutex_lock.c line 134
  • #3 g_mutex_lock
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthread-posix.c line 209
  • #4 ??
    from /usr/lib/x86_64-linux-gnu/libtracker-sparql-1.0.so.0
  • #5 ??
    from /usr/lib/x86_64-linux-gnu/libtracker-sparql-1.0.so.0
  • #6 io_job_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gioscheduler.c line 85
  • #7 g_task_thread_pool_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gtask.c line 1213
  • #8 g_thread_pool_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthreadpool.c line 307
  • #9 g_thread_proxy
    at /tmp/buildd/glib2.0-2.40.0/./glib/gthread.c line 764
  • #10 start_thread
    at pthread_create.c line 309
  • #11 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 111

Thread 1 (Thread 0x7f79186e2a40 (LWP 6245))

  • #0 tracker_evt_update_orphan_item_cb
    at grl-tracker-source-notif.c line 222
  • #1 g_simple_async_result_complete
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 763
  • #2 complete_in_idle_cb_for_thread
    at /tmp/buildd/glib2.0-2.40.0/./gio/gsimpleasyncresult.c line 831
  • #3 g_main_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3064
  • #4 g_main_context_dispatch
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3663
  • #5 g_main_context_iterate
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3734
  • #6 g_main_context_iteration
    at /tmp/buildd/glib2.0-2.40.0/./glib/gmain.c line 3795
  • #7 g_application_run
    at /tmp/buildd/glib2.0-2.40.0/./gio/gapplication.c line 2114
  • #8 rb_application_run
    at /home/sid/source/git/rhythmbox/shell/rb-application.c line 646
  • #9 main
    at /home/sid/source/git/rhythmbox/shell/main.c line 89

Comment 5 gnome.vrb 2014-07-22 22:42:08 UTC
Steps to reproduce ( in rhythmbox ):

Start with clean podcast history.

1. Search for "BBC" in podcast search.
2. Double-click on an entry from the results ( I clicked on the second entry
with 301 episodes )
3. Window focus shifts to podcast view screen. Wait for a few seconds ( < 20 ),
when the view is populated with the listing.
4. Click on one of the episodes, and let the episode download and play.
5. Quicklt, press 'Add' now.

Keep repeating these steps. It should crash at any iteration. 

Note. For some reason, this is very pronounced in the latest rhythmbox git tree ( probably because the crash from https://bugzilla.gnome.org/show_bug.cgi?id=733499 was taking bait for this bug ), and with 733499 fixed, this issue shows up at large.

If you're planning to compile the latest rhythmbox from git consider adding option "--disable-uninstalled-build" to autogen.sh / configure script.
Comment 6 Juan A. Suarez Romero 2014-07-24 17:55:26 UTC
Which version are you using? From git master?
Comment 7 gnome.vrb 2014-07-24 19:13:05 UTC
I've had a crash from git master too. Same trace.
Comment 8 Philip Withnall 2014-12-23 10:24:21 UTC
Created attachment 293241 [details] [review]
tracker: Keep references to GrlTrackerSources in global hash table

Force the GrlTrackerSources in the grl_tracker_source_sources to stay
alive while they are in the hash table. Otherwise, due to the mismatch
between Tracker events and signalling changes to the hash table, we can
end up using finalised members from the hash table in (e.g.)
tracker_evt_update_orphan_item_cb() (I think).
Comment 9 Philip Withnall 2014-12-23 10:30:08 UTC
(In reply to comment #8)
> Created an attachment (id=293241) [details] [review]
> tracker: Keep references to GrlTrackerSources in global hash table
> 
> Force the GrlTrackerSources in the grl_tracker_source_sources to stay
> alive while they are in the hash table. Otherwise, due to the mismatch
> between Tracker events and signalling changes to the hash table, we can
> end up using finalised members from the hash table in (e.g.)
> tracker_evt_update_orphan_item_cb() (I think).

I didn't get a chance to try and reproduce the bug myself, but from code inspection, this patch might fix it.

vrishab, would you be able to apply it to git master and test?
Comment 10 Philip Withnall 2015-04-20 08:58:31 UTC
Any word from a grilo maintainer on this?
Comment 11 Bastien Nocera 2015-08-25 16:31:53 UTC
Attachment 293241 [details] pushed as 45e2abe - tracker: Keep references to GrlTrackerSources in global hash table