GNOME Bugzilla – Bug 740923
Crash in tracker-store at tracker_fts_shutdown_db
Last modified: 2014-12-27 16:39:18 UTC
+ Trace 234380
Thread 1 (LWP 2028)
Thread 2 (LWP 2025)
Thread 4 (LWP 2027)
Thread 5 (LWP 2007)
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Created attachment 291831 [details] [review] Protect global variable against simul destruction
Comment on attachment 291831 [details] [review] Protect global variable against simul destruction Hi Philip, I thought we had a fix for this already somewhere... Anyway, I kind of knew about this bug but wasn't able to reproduce it very easily. This fix looks right to me, but I wonder if we shouldn't also protect the creation of the property_names too with the/a mutex? I am thinking of re-initialisation or race condition cases.
(In reply to comment #2) > (From update of attachment 291831 [details] [review]) > Hi Philip, I thought we had a fix for this already somewhere... > > Anyway, I kind of knew about this bug but wasn't able to reproduce it very > easily. > > This fix looks right to me, but I wonder if we shouldn't also protect the > creation of the property_names too with the/a mutex? I am thinking of > re-initialisation or race condition cases. To be completely correct we should protect each access to the variable, including read, create and destroy, with the same static mutex. Or we do a thread local copy of the table for each thread. That's also a possibility (which I think might even be better).
(In reply to comment #3) > To be completely correct we should protect each access to the variable, > including read, create and destroy, with the same static mutex. Indeed. > Or we do a thread local copy of the table for each thread. That's also a > possibility (which I think might even be better). I don't think a thread local copy is the right approach because then there could be discrepancies between the table information between threads. It's unlikely but ...
Comment on attachment 291831 [details] [review] Protect global variable against simul destruction This patch is no longer needed, Carlos applied a patch upstream using GPrivate APIs.
Carlos fixed this commit: commit a105aacd5531d0d5e7d2af7c12c156c3375135af Author: Carlos Garnacho <carlosg@gnome.org> Date: Sun Nov 30 12:34:31 2014 +0100 tracker-fts: Make the property list per-thread data This is global memory, and shared across threads, which doesn't play well when (un)initializing it, as multiple simultaneous accesses can occur.