GNOME Bugzilla – Bug 728546
crash in extractor on dbus timeout warning
Last modified: 2014-04-22 10:18:43 UTC
Created attachment 274724 [details] [review] Prevent segfault While running the extractor, I will receive the following warning printed to the console: (lt-tracker-extract:19772): Tracker-WARNING **: There was an error pushing metadata: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) When this occurs, tracker-extract crashes at decorator_commit_cb(). decorator_commit_cb() is expecting tracker_sparql_connection_update_array_finish() to return a list of errors, but this does not appear to be the case. The attached patch corrects the crash, though it's a naïve approach and may be the wrong one.
(In reply to comment #0) > Created an attachment (id=274724) [details] [review] > Prevent segfault > > While running the extractor, I will receive the following warning printed to > the console: > > (lt-tracker-extract:19772): Tracker-WARNING **: There was an error pushing > metadata: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not > receive a reply (timeout by message bus) > > When this occurs, tracker-extract crashes at decorator_commit_cb(). > decorator_commit_cb() is expecting > tracker_sparql_connection_update_array_finish() to return a list of errors, but > this does not appear to be the case. The attached patch corrects the crash, > though it's a naïve approach and may be the wrong one. Hello Seán, thanks for pointing out this crasher. It's clear where it happens, but your patch isn't quite right. I've committed a variation of the patch that still iterates the errors. It looks to me like the crash comes from the errors->len use in the for() loop in cases where we fail in the tracker_sparql_connection_update_array_finish() call and an error is returned. In this case, its expected that the "errors" variable is NULL and dereferencing it will cause the crash. I've tested it here, it seems to work well. Let me know if you have any problems after this commit. This should be released in 1.0.1. Thank you for your work! :)