Skip to content

Fix concurrency issues with hashtable ownership

Carlos Garnacho requested to merge wip/carlosg/hashtable-ownership into master

Some fixes for the internal TrackerDataManager graphs hashtable to be usable from all threads. From the main commit:

libtracker-data: Initialize graphs hashtable early with data manager

We are lazily creating this hashtable, however this looks like a bad idea
since this API may be accessed from multiple threads. Ensure it's first
initialized during TrackerDataManager initialization, and ensure to return
a reference to the hashtable so the caller can operate on it without fear
of it being freed underneath.

Hopefully, this fixes some strange crashes spotted in Fedora Retrace
service, since the hashtable might be changed from other threads while
another one is iterating across it. E.g.:
https://retrace.fedoraproject.org/faf/problems/bthash/?bth=f695d55500ad18a095fbd42dbb92bace62f684fa

Merge request reports