Re: NM dbus API bug ?



Hi again :)

I'm quite confused on using NetworkManager DBUS API on master branch.
1/ When getting the object with the path returned by
NetworkManager.GetDevices() method, NM crashes (path is of the
form: /org/freedesktop/NetworkManager/Devices/0)
2/ If I get the Device object with path
like /org/freedesktop/NetworkManager/Devices/eth0, I can get the object
but Introspectable interface gives me no interface at all on this
object. Strange...

It is WIP ? It is supposed to work right now ?
I can try to fix it, if someone gives me some hints :)

Regards,
Jean

Le mardi 04 octobre 2011 à 14:15 +0200, Jean Parpaillon a écrit :
> Hi all,
> I'm using NetworkManager from master branch.
> 
> Running the following python code crash NetworkManager:
> 
> ###
> import dbus
> import sys
> 
> NM_DBUS_SERVICE = "org.freedesktop.NetworkManager"
> NM_MANAGER_PATH = "/org/freedesktop/NetworkManager"
> NM_MANAGER_IFACE = "org.freedesktop.NetworkManager"
> NM_DEVICE_IFACE = "org.freedesktop.NetworkManager.Device"
> 
> bus = dbus.SystemBus()
> 
> manager_proxy = bus.get_object(NM_DBUS_SERVICE, NM_MANAGER_PATH)
> manager_iface = dbus.Interface(manager_proxy,
> dbus_interface=NM_MANAGER_IFACE)
> 
> for device_path in manager_iface.GetDevices():
>     print "Device: %s" % device_path
> 
>     device_proxy = bus.get_object(NM_DBUS_SERVICE, device_path)
> 
> ###
> 
> In a few words, it crashes when I try to get dbus proxy object with a
> path I get from GetDevices() method.
> The crashes produces the following backtrace:
> Oct  4 14:01:17 tiflis NetworkManager[26393]: <warn> caught signal 11.
> Generating backtrace...
> Oct  4 14:01:17 tiflis NetworkManager[26393]: ******************* START
> **********************************
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 0: /usr/sbin/NetworkManager (nm_logging_backtrace+0x3b) [0x45e3fb]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 1: /usr/sbin/NetworkManager (0x400000+0x4470c1) [0x4470c1]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7fbdf74d9000+0x7fbdf74e8020)
> [0x7fbdf74e8020]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 3: /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2 (0x7fbdf793a000
> +0x7fbdf79469b0) [0x7fbdf79469b0]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 4: /lib/libglib-2.0.so.0 (g_hash_table_foreach+0x43) [0x7fbdf6017bd3]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 5: /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2 (0x7fbdf793a000
> +0x7fbdf794808c) [0x7fbdf794808c]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 6: /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x7fbdf76f5000+0x7fbdf7713371)
> [0x7fbdf7713371]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 7: /lib/x86_64-linux-gnu/libdbus-1.so.3 (dbus_connection_dispatch+0x380)
> [0x7fbdf7705270]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 8: /usr/lib/x86_64-linux-gnu/libdbus-glib-1.so.2 (0x7fbdf793a000
> +0x7fbdf7945675) [0x7fbdf7945675]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 9: /lib/libglib-2.0.so.0 (g_main_context_dispatch+0x1f3)
> [0x7fbdf60284a3]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 10: /lib/libglib-2.0.so.0 (0x7fbdf5fe3000+0x7fbdf6028c80)
> [0x7fbdf6028c80]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 11: /lib/libglib-2.0.so.0 (g_main_loop_run+0x182) [0x7fbdf60292f2]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 12: /usr/sbin/NetworkManager (main+0x1155) [0x4220f5]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 13: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xfd)
> [0x7fbdf57f7ead]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: Frame
> 14: /usr/sbin/NetworkManager (0x400000+0x42224d) [0x42224d]
> Oct  4 14:01:17 tiflis NetworkManager[26393]: ******************* END
> **********************************
> 
> 
> Any clue ?
> 
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list



-- 
Jean Parpaillon
R&D Engineer
http://mandriva.com
+33 6 30 10 92 86
xmpp: jean parpaillon gmail com

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]