D-Bus assertion when a ZeitgeistMonitor is finalised before its ZeitgeistLog
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libzeitgeist |
New
|
Undecided
|
Unassigned |
Bug Description
See: https:/
Assume a ZeitgeistLog and ZeitgeistMonitor have been instantiated, and the ZeitgeistMonitor has been installed on the ZeitgeistLog. If the ZeitgeistMonitor is finalised, _zeitgeist_
Stacktrace:
(/home/
Detaching after fork from child process 3806.
Program received signal SIGTRAP, Trace/breakpoint trap.
g_logv (log_domain=
format=
974 g_private_set (&g_log_depth, GUINT_TO_POINTER (depth));
(gdb) bt
#0 g_logv (log_domain=
log_
args=
#1 0x00007ffff6c608a2 in g_log (
log_
log_
format=
at gmessages.c:1003
#2 0x00007ffff6c608c9 in g_return_
log_
pretty_
expression=
#3 0x00007ffff749d08a in g_dbus_
method_
flags=
cancellable
callback=
user_
#4 0x00007ffff749ea44 in g_dbus_proxy_call (proxy=<optimized out>,
method_
flags=
cancellable
user_
#5 0x00007ffff7b9e6cc in zeitgeist_
from /opt/gnome/
#6 0x00007ffff7b9e767 in _zeitgeist_
from /opt/gnome/
#7 0x00007ffff6f466f2 in weak_refs_notify (data=0x6bfea0) at gobject.c:2469
#8 0x00007ffff6f47684 in g_object_unref (_object=
at gobject.c:2986
#9 0x00007ffff7dcf7ae in tpf_persona_
at /home/treitter/
#10 0x00007ffff6f47718 in g_object_unref (_object=0x642150) at gobject.c:3023
#11 0x00007ffff7dc5ea2 in _tpf_persona_
_data=0x6e4000)
at /home/treitter/
#12 0x00007ffff743fd78 in clear_op_res (simple=0x6ce6c0)
at gsimpleasyncres
#13 g_simple_
at gsimpleasyncres
#14 0x00007ffff6f47718 in g_object_unref (_object=0x6ce6c0) at gobject.c:3023
#15 0x00007ffff7dca4f6 in _tpf_persona_
_data_
at /home/treitter/
#16 0x00007ffff7b9b0ae in dispatch_
from /opt/gnome/
---Type <return> to continue, or q <return> to quit---
#17 0x00007ffff7440ba7 in g_simple_
at gsimpleasyncres
#18 0x00007ffff749aa9a in reply_cb (connection=
res=<optimized out>, user_data=0x6ce5e0) at gdbusproxy.c:2632
#19 0x00007ffff7440ba7 in g_simple_
at gsimpleasyncres
#20 0x00007ffff7490efe in g_dbus_
result=
#21 0x00007ffff7440ba7 in g_simple_
at gsimpleasyncres
#22 0x00007ffff7440ca9 in complete_in_idle_cb (data=<optimized out>)
at gsimpleasyncres
#23 0x00007ffff6c59565 in g_main_dispatch (context=0x631ff0) at gmain.c:2715
#24 g_main_
#25 0x00007ffff6c59898 in g_main_
block=
at gmain.c:3290
#26 0x00007ffff6c59c92 in g_main_loop_run (loop=0x64b650) at gmain.c:3484
#27 0x0000000000413e02 in tp_tests_
proxy=0x638840) at util.c:113
#28 0x000000000040c2cb in tp_tests_
at backend.c:361
#29 0x00007ffff6c7ba41 in test_case_run (tc=0x62c030) at gtestutils.c:1689
#30 g_test_
path=<optimized out>, path@entry=
#31 0x00007ffff6c7bb66 in g_test_
suite=
path@
#32 0x00007ffff6c7becb in g_test_run_suite (suite=0x62a420)
at gtestutils.c:1788
#33 0x00007ffff6c7bf15 in g_test_run () at gtestutils.c:1308
#34 0x0000000000409c17 in _vala_main (args=0x7ffffff
at /home/treitter/
#35 0x00000036c7621735 in __libc_start_main (main=0x409550 <main>, argc=1,
ubp_
rtld_
#36 0x0000000000409599 in _start ()
This is still a fairly serious problem for libfolks, since it’s causing spurious failures in our test suite, and I can find no way to work around it.
On further digging, there’s a second (separate) problem which is triggered at the same time: the monitor isn’t removed from the ZeitgeistLog’s list of monitors until the async D-Bus call returns. Calls to zeitgeist_ log_remove_ monitor( ) are predicated on whether the monitor is present in the list of monitors. Therefore it’s possible for multiple D-Bus calls to be started before the first one returns.