[tracker/sam/tracker-3.0-functional-tests] libtracker-direct: Ensure all queries are finished before closing



commit 826fbc696ca7b447956f20e1f7bb5eb65dce7814
Author: Sam Thursfield <sam afuera me uk>
Date:   Tue Feb 11 00:17:14 2020 +0100

    libtracker-direct: Ensure all queries are finished before closing
    
    This fixes an intermittent crash in the 'notifier' functional-test.
    
    In some cases, the TrackerNotifier's 'extra info' query would execute
    during the tracker_sparql_connection_close() method. The
    db-manager::update-interface signal closure would temporarily hold a
    reference on the db-manager object, and when this was released the
    tracker_db_manager_finalize() method would run. Since the 'interfaces'
    GAsyncQueue was locked at this point, we would see an assertion error
    about trying to clear a locked g_mutex.

 src/libtracker-direct/tracker-direct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libtracker-direct/tracker-direct.c b/src/libtracker-direct/tracker-direct.c
index 68cb435f9..8946aeea9 100644
--- a/src/libtracker-direct/tracker-direct.c
+++ b/src/libtracker-direct/tracker-direct.c
@@ -919,7 +919,7 @@ tracker_direct_connection_close (TrackerSparqlConnection *self)
        }
 
        if (priv->select_pool) {
-               g_thread_pool_free (priv->select_pool, TRUE, FALSE);
+               g_thread_pool_free (priv->select_pool, TRUE, TRUE);
                priv->select_pool = NULL;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]