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 756869 - tracker-miner-fs: Don't abort in tracker_file_notifier_init due to tracker_sparql_connection_get failure
tracker-miner-fs: Don't abort in tracker_file_notifier_init due to tracker_sp...
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
1.6.x
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-10-20 14:23 UTC by Debarshi Ray
Modified: 2015-10-21 14:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-miner: Handle failure to get a TrackerSparqlConnection (2.39 KB, patch)
2015-10-20 14:37 UTC, Debarshi Ray
none Details | Review
libtracker-miner: Handle failure to get a TrackerSparqlConnection (2.76 KB, patch)
2015-10-20 15:20 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2015-10-20 14:23:30 UTC
I am seeing a couple of downstream reports where the code hits the assertion in tracker_file_notifier_init and aborts with:
'Tracker-CRITICAL **: Could not get SPARQL connection: The connection is closed'

I am beginning to think that we should try to handle this failure because the circumstances look similar to those in bug 755805 That bug was primarily triggered by the QA guys starting gdm, doing some screen recording, and then shutting it down again. When the gdm session was shut down, the DBus daemon was lost and creating a GDBusProxy for gvfs' remote volume monitors failed with:
'The connection is closed (g-io-error-quark, 18)'

Interestingly, the gvfs bug led to tracker-extract crashes in the 99% of cases, even though I did see a libreoffice and mate-panel crash too. I guess, screen shooting the gdm session tickled tracker's miners.

Anyway, my point is that it is not unreasonable to expect tracker to be robust against such situations.
Comment 1 Debarshi Ray 2015-10-20 14:37:31 UTC
Created attachment 313753 [details] [review]
libtracker-miner: Handle failure to get a TrackerSparqlConnection
Comment 2 Debarshi Ray 2015-10-20 14:43:41 UTC
I don't know how to test this. I tried removing the executable bit from the tracker-store binary, killing all the tracker process and then doing 'tracker daemon -s', but that didn't hit this code path.
Comment 3 Debarshi Ray 2015-10-20 15:19:24 UTC
From #tracker on GIMPNet:
14:50 <garnacho_> rishi: just missing another check on                          
      sparql_contents_query_start() for paranoia IMO :)
Comment 4 Debarshi Ray 2015-10-20 15:20:08 UTC
Created attachment 313758 [details] [review]
libtracker-miner: Handle failure to get a TrackerSparqlConnection
Comment 5 Carlos Garnacho 2015-10-21 10:18:54 UTC
Comment on attachment 313758 [details] [review]
libtracker-miner: Handle failure to get a TrackerSparqlConnection

Looks good, thanks :)
Comment 6 Debarshi Ray 2015-10-21 14:47:35 UTC
Pushed all the way down to tracker-1.2.