Re: [Tracker] strange bugs and test script
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Samuel Cormier-Iijima <sciyoshi gmail com>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] strange bugs and test script
- Date: Fri, 15 Sep 2006 20:26:53 +0100
Samuel Cormier-Iijima wrote:
can you also try running it a couple of times, maybe in quick
succession? on my (slower) laptop, the client will freeze quite often
while getting File.Name for the files...
yes I can replicate that :)
Im about to go out but I think I have it:
in tracker-utils.c
tracker_notify_request_data_available (void)
{
/* if thread is asleep then we just need to wake it up! */
if (g_mutex_trylock (tracker->request_signal_mutex)) {
g_cond_signal (tracker->request_thread_signal);
g_mutex_unlock (tracker->request_signal_mutex);
return;
}
/* if busy - check if async queue has new stuff as we do not need to
notify then */
if (g_async_queue_length (tracker->user_request_queue) > 0) {
return;
}
the g_async_queue_length (tracker->user_request_queue) > 0 will always
be true because we call notify after pushing the data on to the queue so
the race condition will be there.
The solution should be to either remove that if block or test for > 1 so
the rest of the function can execute and prevent the race.
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]