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 739237 - Ownership reference not added in tracker-file-notifier.c
Ownership reference not added in tracker-file-notifier.c
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
unspecified
Other Windows
: Normal normal
: ---
Assigned To: tracker-general
: 731512 738091 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-10-27 12:34 UTC by Philip Van Hoof
Modified: 2014-11-05 12:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this issue (1.16 KB, patch)
2014-10-27 12:38 UTC, Philip Van Hoof
none Details | Review

Description Philip Van Hoof 2014-10-27 12:34:06 UTC
Saw this one, that means the gfile is unreferenced when it got accessed. Looking at the code the GPtrArray isn't taking ownership. Will attach a patch that makes it take ownership.

Thread 1 (LWP 1064)

  • #0 g_file_get_uri
    at gfile.c line 558
  • #1 sparql_files_compose_query
    at tracker-file-notifier.c line 740
  • #2 sparql_files_query_start
    at tracker-file-notifier.c line 759
  • #3 crawler_finished_cb
    at tracker-file-notifier.c line 843
  • #4 g_cclosure_marshal_VOID__BOOLEANv
    at gmarshal.c line 188
  • #5 _g_closure_invoke_va
    at gclosure.c line 840
  • #6 g_signal_emit_valist
    at gsignal.c line 3238
  • #7 g_signal_emit
    at gsignal.c line 3386
  • #8 process_func
    at tracker-crawler.c line 539
  • #9 g_idle_dispatch
    at gmain.c line 5251
  • #10 g_main_dispatch
    at gmain.c line 3066
  • #11 g_main_context_dispatch
    at gmain.c line 3642
  • #12 g_main_context_iterate
    at gmain.c line 3713
  • #13 g_main_context_iterate
    at gmain.c line 3680
  • #14 g_main_loop_run
    at gmain.c line 3907
  • #15 main
    at tracker-main.c line 971

    --- cut here ---
Comment 1 Philip Van Hoof 2014-10-27 12:38:07 UTC
Created attachment 289407 [details] [review]
Patch for this issue

Lets the GPtrArray take ownership of the object reference. The with_free_func will unref the ownership when the ownership by the ptrarray is released.
Comment 2 Philip Van Hoof 2014-10-27 16:10:51 UTC
committed
Comment 3 Martyn Russell 2014-11-05 09:53:11 UTC
Hi Philip, I ran into this crash on starting my desktop this morning, do you know if it actually fixes the problem? The patch looks sane to me of course, but if it does fix the problem, I would like to release a new version of Tracker 1.0.x with it in.

Thanks.
Comment 4 Martyn Russell 2014-11-05 09:54:46 UTC
*** Bug 731512 has been marked as a duplicate of this bug. ***
Comment 5 Martyn Russell 2014-11-05 09:55:33 UTC
*** Bug 738091 has been marked as a duplicate of this bug. ***
Comment 6 Philip Van Hoof 2014-11-05 12:37:34 UTC
The customer for whom I did this patch didn't retest yet. The issue was a race condition so it's not easy to test and/or reproduce. I think it's safe to do a patch release with this commit and resolve this bug as fixed. We can reopen it if we see it occurring again. That's just my opinion though. I would indeed also have preferred the bug to be reproducable and the fix tested against a reproducable situation.