libsecret caching of GDBusProxy is incompatible with sync GMainContexts
@gcampagna
Submitted by Giovanni Campagna Assigned to libsecret maintainer(s)
Link to original bug (#765406)
Description
All GDBus events are always delivered on the thread-default main context where a watch or proxy is created.
Unfortunately this breaks for sync invocation, because they push a temporary main context, iterate it for a bit, and never iterate it again.
In particular, this causes libsecret to fail to realize when gnome-keyring-daemon goes down for whatever reason (including a temporary g-k-d being replaced by the real g-k-d after login), because the NameOwnerChanged signal is never delivered.
One simple solution is to stop caching GDBusProxies altogether. This might add some overhead though. Another more complex solution is a long-running worker thread that runs a dedicated loop.