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 642883 - Crashes in sqlite
Crashes in sqlite
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
0.10.x
Other Linux
: Normal normal
: ---
Assigned To: tracker-general
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2011-02-21 15:50 UTC by Lionel Landwerlin
Modified: 2011-04-08 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-sparql crash in sqlite (4.78 KB, application/octet-stream)
2011-02-21 22:31 UTC, Lionel Landwerlin
Details

Description Lionel Landwerlin 2011-02-21 15:50:47 UTC
I'm currently developing a Grilo plugin for Tracker. Grilo being a framework to access multimedia content over various sources, I'm using Tracker to search content over various indexed sources (USB keys, local drive, UPnP servers, etc...).

More recently, I added notification support to take into account the newly indexed files. That work is hosted here :

http://git.gnome.org/browse/grilo-plugins/log/?h=tracker-notification

And started to experience strange crashes with backtraces deep inside sqlite code like the one attached. I first though to a memory corruption within my code. But valgrind didn't show anything. And that was definitely confirmed by the fact that when launching my application with the dbus backend, I don't experience crash anymore.

Also, as pointed out by Aleksander, compiling Sqlite with -DSQLITE_OMIT_LOOKASIDE=1 prevent crashes.

So basicly a good way to reproduce is :
   - compile grilo and grilo-plugins (from tracker-notification branch, with --enable-tracker) packages
   - launch grilo-test-ui tool (from grilo package).
   - launch tracker-control -k -r && tracker-control -s

To reproduce the bug you need to have a sufficiently big enough amount of files to be indexed, to ensure enough allocations will be made in Sqlite. Running the grilo-test-ui under Valgrind seems to slow down the application enough to not experience the crashes anymore.
Comment 1 Lionel Landwerlin 2011-02-21 22:31:30 UTC
Created attachment 181533 [details]
libtracker-sparql crash in sqlite
Comment 2 Jürg Billeter 2011-04-08 10:54:07 UTC
commit 0453551b30309a3d9ab29e1993dada3720feb43c
Author: Jürg Billeter <j@bitron.ch>
Date:   Fri Apr 8 11:51:19 2011 +0200

    libtracker-data: Protect tracker_db_cursor_get_* with mutex
    
    This is necessary for parallel queries with direct access.
    
    Fixes GB#642883.
    Fixes NB#244556.