[avahi] DBus issues

Stefan de Konink avahi at ml.kinkrsoftware.nl
Sun Aug 31 12:54:55 PDT 2008


Lennart Poettering schreef:
> On Sun, 31.08.08 21:05, Stefan de Konink (avahi at ml.kinkrsoftware.nl) wrote:
>
>> process 2582: process 2582: The last reference on a connection was
>> dropped without closing the connection. This is a bug in an application.
>> See dbus_connection_unref() documentation for details.
>> Most likely, the application was supposed to call
>> dbus_connection_close(), since this is a private connection.
>> The last reference on a connection was dropped without closing the
>> connection. This is a bug in an application. See dbus_connection_unref()
>> documentation for details.
>> Most likely, the application was supposed to call
>> dbus_connection_close(), since this is a private connection.
>>   D-Bus not built with -rdynamic so unable to print a backtrace
>>   D-Bus not built with -rdynamic so unable to print a backtrace
>>
>>
>> I really get this issues with avahi too many times while developing in
>> GDB. Is there a way to have a more robust avahi in this perspective?
>
> avahi-client properly closes the D-Bus connection before unrefing it,
> it should be as robust as a C program can be. (see avahi_client_free()
> in avahi-client/client.c:612)
>
> If you are encountering this problem it is most likely some kind of
> programming error elsewhere, maybe you call avahi_client_free() more
> than once on the same object?
>
> Valgrind might help you find this misuse.
>

(gdb) bt
#0  0x00002b527abd8f6f in _dbus_marshal_read_basic () from
/usr/lib/libdbus-1.so.3
#1  0x00002b527abc78dc in _dbus_header_get_field_basic () from
/usr/lib/libdbus-1.so.3
#2  0x00002b527abcbc77 in dbus_message_get_reply_serial () from
/usr/lib/libdbus-1.so.3
#3  0x00002b527abc5d25 in _dbus_connection_queue_received_message_link
() from /usr/lib/libdbus-1.so.3
#4  0x00002b527abd4f41 in _dbus_transport_queue_messages () from
/usr/lib/libdbus-1.so.3
#5  0x00002b527abd5ca5 in do_reading () from /usr/lib/libdbus-1.so.3
#6  0x00002b527abd623f in socket_handle_watch () from
/usr/lib/libdbus-1.so.3
#7  0x00002b527abd4a66 in _dbus_transport_handle_watch () from
/usr/lib/libdbus-1.so.3
#8  0x00002b527abc5ce1 in _dbus_connection_handle_watch () from
/usr/lib/libdbus-1.so.3
#9  0x00002b527abd68a2 in dbus_watch_handle () from /usr/lib/libdbus-1.so.3
#10 0x00002b527adf63cb in avahi_simple_poll_dispatch (s=0x67ac30) at
simple-watch.c:577
#11 0x00002b527adf692d in avahi_simple_poll_loop (s=0x67ac30) at
simple-watch.c:638
#12 0x00002b527adf72ce in thread (userdata=0x67abe0) at thread-watch.c:73
#13 0x00002b52784ce067 in start_thread () from /lib/libpthread.so.0
#14 0x00002b5278ceabdd in clone () from /lib/libc.so.6
#15 0x0000000000000000 in ?? ()


I am not able to reproduce it inside valgrind again, but the above trace
doesn't really show my code ;)


Stefan


More information about the avahi mailing list