GNOME Bugzilla – Bug 670191
IndividualAggregator::is-quiescent is never set to TRUE
Last modified: 2012-03-08 00:20:30 UTC
Empathy now relies on the is-quiescent property to display a loading page while folks is loading contacts. But for some reason sometimes Folks never reach this state. Sending full logs to private as it contains all my contacts.
It would be useful to know exactly which PersonaStores are not reaching quiescence (because the IndividualAggregator only reaches quiescence once all its PersonaStores do). You can find this out by running Empathy under gdb, then interrupting it a few seconds after it displays the loading screen (i.e. once you think it _should've_ reached quiescence) and calling: print folks_debug_emit_print_status(folks_debug_dup()) in gdb. Can you then e-mail me/Travis the output from that please? (It would be quite nice if Empathy made it possible to view this data/call emit_print_status() from its debug window in future.)
*** Bug 670538 has been marked as a duplicate of this bug. ***
Philip: I am able to reproduce this bug...I just sent you and Travis an email containing the dump of that debug call output.
Here's the problem store (from EDS): PersonaStore (0xaaf020) Ref. count: 2 ID: <censored> Prepared?: yes Is primary store?: no Always writeable properties: gender,local-ids,postal-addresses,avatar,urls,structured-name,phone-numbers,nickname,im-addresses,is-favourite,birthday,email-addresses,roles,notes,web-service-addresses,full-name,groups Quiescent?: no Trust level: full Persona count: 0 It's the only store which hasn't reached quiescence, and it looks like that's because EDS hasn't returned an initial query of contacts from the address book. Cosimo, which version of folks was this with? I made some changes to EdsfPersonaStore on 2012-01-09 which might have fixed this (d4aeea66f0719dc7a77a43372a940735cdfff4f2 and friends). They're included in 0.6.7 but not 0.6.6. Thanks for the debug info!
I have 0.6.7, fwiw. Will do the gdb magic.
Relevant parts from my gdb thing: 5 PersonaStores: PersonaStore (0x84f5a00) Ref. count: 2 ID: flickr Prepared?: yes Is primary store?: no Always writeable properties: Quiescent?: yes Trust level: partial Persona count: 0 PersonaStore (0x84f5898) Ref. count: 2 ID: smugmug Prepared?: no Is primary store?: no Always writeable properties: Quiescent?: no Trust level: partial Persona count: 0 PersonaStore (0x84f5988) Ref. count: 2 ID: facebook Prepared?: yes Is primary store?: no Always writeable properties: Quiescent?: yes Trust level: partial Persona count: 0 PersonaStore (0x84f5910) Ref. count: 2 ID: plurk Prepared?: no Is primary store?: no Always writeable properties: Quiescent?: no Trust level: partial Persona count: 0 PersonaStore (0x84f5820) Ref. count: 2 ID: twitter Prepared?: yes Is primary store?: no Always writeable properties: Quiescent?: yes Trust level: partial Persona count: 0 If I remove the libsocialweb backend, things work again.
Created attachment 208954 [details] [review] core: Force IndividualAggregator quiescence after a 5s timeout This patch fixes the symptoms (IndividualAggregator never reaches quiescence), but not the cause of the problem (buggy EDS and libsocialweb PersonaStores). I think it's a good safety measure to add, though. I've spotted a few problems in the libsocialweb backend which I'll take a look at later today. Hopefully that'll fix Vincent's problems. Cosimo, could you answer my question from comment #4 please? Which version of folks did you experience this with? Is it still reproducible with 0.6.7? Thanks.
Created attachment 208964 [details] [review] libsocialweb: Tidy up Swf.PersonaStore.prepare() to return asynchronously This tidies up the prepare() method of Swf.PersonaStore to: • only asynchronously return once it's actually done; • throw errors properly; and • signal the removal of the PersonaStore on an error. This works for me, but I couldn't reproduce the original libsocialweb problems from comment #6. Vincent, would you be able to try this patch out?
Patches are both available in this branch: https://www.gitorious.org/folks/folks/commits/670191-quiescence
(In reply to comment #7) > Cosimo, could you answer my question from comment #4 please? Which version of > folks did you experience this with? Is it still reproducible with 0.6.7? > Thanks. Hey, sorry for the delay. I wasn't using 0.6.7. I now upgraded to a newer libfolks and the bug seems to be gone for me.
(In reply to comment #10) > (In reply to comment #7) > > > Cosimo, could you answer my question from comment #4 please? Which version of > > folks did you experience this with? Is it still reproducible with 0.6.7? > > Thanks. > > Hey, sorry for the delay. I wasn't using 0.6.7. I now upgraded to a newer > libfolks and the bug seems to be gone for me. Great, thanks. Looks like it's just libsocialweb that's the problem now.
(In reply to comment #8) > Created an attachment (id=208964) [details] [review] > libsocialweb: Tidy up Swf.PersonaStore.prepare() to return asynchronously > > This tidies up the prepare() method of Swf.PersonaStore to: > • only asynchronously return once it's actually done; > • throw errors properly; and > • signal the removal of the PersonaStore on an error. > > This works for me, but I couldn't reproduce the original libsocialweb problems > from comment #6. Vincent, would you be able to try this patch out? The patch fixes the issue for me.
(In reply to comment #9) > Patches are both available in this branch: > https://www.gitorious.org/folks/folks/commits/670191-quiescence This branch fixes the problem for me as well (I just reproduced it with master). Would be good to be merged/released ASAP as this bug makes Empathy unusable.
Comment on attachment 208954 [details] [review] core: Force IndividualAggregator quiescence after a 5s timeout Committed, thanks for testing. commit 699d009e2673bc9d078b43cdd20e5224f868bebd Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sun Mar 4 20:24:49 2012 +0000 libsocialweb: Tidy up Swf.PersonaStore.prepare() to return asynchronously Previously, the prepare() method would return synchronously, firing off some asynchronous methods in libsocialweb, which would later return in callbacks and (theoretically) cause the persona store to reach quiescence. This behaviour was not playing nicely with the expected asynchronous behaviour of prepare(), and wasn't handling errors properly — on an error, the code would cancel preparation, but not throw an error or remove the persona store. The code now throws errors and removes the persona store if preparation fails, which should hopefully help some of the not-reaching-quiescence issues we’ve been seeing. Helps: https://bugzilla.gnome.org/show_bug.cgi?id=670191 backends/libsocialweb/lib/swf-persona-store.vala | 241 +++++++++++++++------- 1 files changed, 165 insertions(+), 76 deletions(-) commit b7bda06afca7ad5222e26e7ef6f9765162d38093 Author: Philip Withnall <philip@tecnocode.co.uk> Date: Sun Mar 4 14:29:27 2012 +0000 core: Force IndividualAggregator quiescence after a 5s timeout This prevents clients being (too) adversely affected (e.g. not being able to do anything) by buggy Backends and PersonaStores which never reach quiescence. Note that this patches the symptoms, not the cause of the problem. Good as a safety net, though. Helps: https://bugzilla.gnome.org/show_bug.cgi?id=670191 NEWS | 1 + folks/individual-aggregator.vala | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 0 deletions(-)