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 738522 - libtracker-data: Guard against failure to create a FTS update statement
libtracker-data: Guard against failure to create a FTS update statement
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Store
0.16.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
Depends on:
Blocks:
 
 
Reported: 2014-10-14 12:12 UTC by Debarshi Ray
Modified: 2014-10-14 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-data: Guard against failure to create a FTS update statement (1.25 KB, patch)
2014-10-14 12:14 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2014-10-14 12:12:50 UTC
See this Fedora bug:
https://bugzilla.redhat.com/show_bug.cgi?id=1022221

The crash itself is addressed by this commit:

commit b2997aa91496c1b9ec2c226ee6f26d5b198040a1
Author: Debarshi Ray <debarshir@gnome.org>
Date:   Mon Oct 13 14:27:07 2014 +0200

    libtracker-data: Guard against invalid statements in public API
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738450

The question is, why would this statement return a NULL stmt in tracker_db_interface_sqlite_fts_update_text:
                stmt = tracker_db_interface_create_statement (db_interface,
                                                              TRACKER_DB_STATEMENT_CACHE_TYPE_UPDATE,
                                                              &error,
                                                              "DELETE FROM fts WHERE docid=?");

Unless there is an error from sqlite.

The attached session log is very dirty and shows tracker-store constantly crashing. So it is hard to guess. The only meaningful entry there is:
    Tracker-CRITICAL **: D-Bus service name:'org.freedesktop.Tracker1' is already taken, perhaps the daemon is already running?

I think we should atleast handle the error from tracker_db_interface_create_statement and warn about it as we are doing elsewhere.
Comment 1 Debarshi Ray 2014-10-14 12:14:01 UTC
Created attachment 288506 [details] [review]
libtracker-data: Guard against failure to create a FTS update statement
Comment 2 Debarshi Ray 2014-10-14 12:17:59 UTC
This applies to master, 1.2.x, 1.0.x and 0.16.x.
Comment 3 Martyn Russell 2014-10-14 13:46:08 UTC
Comment on attachment 288506 [details] [review]
libtracker-data: Guard against failure to create a FTS update statement

Looks right to me, thanks!
Comment 4 Debarshi Ray 2014-10-14 14:26:15 UTC
Thanks for the review, Martyn!