#181 bond0 cause [ warning] [guestinfo] Failed to get nic info.

v1.0 (example)
open
nobody
None
5
2015-01-23
2014-05-09
Xuefer
No

for every 30 secods, i get "[ warning] [guestinfo] Failed to get nic info" in logging

after some digging and i found that it's caused by bond0 device, libdnet failed to handle the bond device case

(gdb) p ifr
$35 = {ifr_ifrn = {ifrn_name = "bond0\000\000\000\020\000\000\000\000\000\000"}, ifr_ifru = {ifru_addr = {sa_family = 65534, sa_data = '\000' <repeats 13="" times="">},
ifru_dstaddr = {sa_family = 65534, sa_data = '\000' <repeats 13="" times="">}, ifru_broadaddr = {sa_family = 65534, sa_data = '\000' <repeats 13="" times="">}, ifru_netmask = {
sa_family = 65534, sa_data = '\000' <repeats 13="" times="">}, ifru_hwaddr = {sa_family = 65534, sa_data = '\000' <repeats 13="" times="">}, ifru_flags = -2, ifru_ivalue = 65534,
ifru_mtu = 65534, ifru_map = {mem_start = 65534, mem_end = 0, base_addr = 0, irq = 0 '\000', dma = 0 '\000', port = 0 '\000'},
ifru_slave = "\376\377", '\000' <repeats 13="" times="">, ifru_newname = "\376\377", '\000' <repeats 13="" times="">, ifru_data = 0xfffe <Address 0xfffe="" out="" of="" bounds="">}}

(gdb) p entry[0]
$37 = {intf_len = 8192, intf_name = "bond0\000\000\000\000\000\000\000\000\000\000", intf_type = 6, intf_flags = 49, intf_mtu = 1500, intf_addr = {addr_type = 2,
addr_bits = 15, addr_u = {eth = {data = "\300\250\b\001\000"}, ip = 17344704, ip6 = {data = "\300\250\b\001", '\000' <repeats 11="" times="">},
data8 = "\300\250\b\001", '\000' <repeats 11="" times="">, data16 = {43200, 264, 0, 0, 0, 0, 0, 0}, data32 = {17344704, 0, 0, 0}}}, intf_dst_addr = {addr_type = 0,
addr_bits = 0,
addr_u = {eth = {data = "\000\000\000\000\000"}, ip = 0, ip6 = {data = '\000' <repeats 15="" times="">}, data8 = '\000' <repeats 15="" times="">, data16 = {
0, 0, 0, 0, 0, 0, 0, 0},
data32 = {0, 0, 0, 0}}}, intf_link_addr = {addr_type = 0, addr_bits = 0, addr_u = {eth = {data = "\000\000\000\000\000"}, ip = 0,

ip6 = {data = '\000' <repeats 15="" times="">}, data8 = '\000' <repeats 15="" times="">, data16 = {0, 0, 0, 0, 0, 0, 0, 0}, __data32 = {0, 0, 0, 0}}}, intf_alias_num = 0,
intf_alias_addrs = 0x7ffffbd942ac}

(gdb) bt

0 addr_ston (sa=0x7ffffbd94200, a=0x7ffffbd94294) at addr.c:337

1 0x00007fc74edc0c03 in _intf_get_noalias (intf=0x641670, entry=0x7ffffbd94250) at intf.c:430

2 0x00007fc74edc15f5 in intf_loop (intf=0x641670, callback=0x7fc74f1f66bf <ReadInterfaceDetails>, arg=0x63ef30) at intf.c:709

3 0x00007fc74f1f65b7 in GuestInfoGetNicInfo (nicInfo=0x63ef30) at guestInfoPosix.c:180

4 0x00007fc74f1f5c84 in GuestInfo_GetNicInfo (nicInfo=0x7ffffbd98368) at guestInfo.c:107

5 0x00007fc74f1f31e2 in GuestInfoGather (data=0x60b560 <gState+96>, data@entry=<error reading="" variable:="" value="" has="" been="" optimized="" out="">) at guestInfoServer.c:305

6 0x00007fc7535c02ab in g_timeout_dispatch (source=source@entry=0x63c300, callback=<optimized out="">, user_data=<optimized out="">)

at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:4451

7 0x00007fc7535bf496 in g_main_dispatch (context=0x61c320) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3066

8 g_main_context_dispatch (context=context@entry=0x61c320) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3642

9 0x00007fc7535bf8a8 in g_main_context_iterate (context=0x61c320, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out="">)

at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3713

10 0x00007fc7535bfd99 in g_main_loop_run (loop=0x6169d0) at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3907

11 0x0000000000404caa in ToolsCoreRunLoop (state=0x60b500 <gState>) at mainLoop.c:238

12 0x000000000040516c in ToolsCore_Run (state=0x60b500 <gState>) at mainLoop.c:446

13 0x00000000004057ca in main (argc=1, argv=0x6169b0, envp=0x7ffffbd98778) at mainPosix.c:283

(gdb) p sa->sa_family
$38 = 65534
it goes to default case
(gdb) fr

0 addr_ston (sa=0x7ffffbd94200, a=0x7ffffbd94294) at addr.c:337

337 return (-1);
(gdb) l
332 a->addr_bits = IP_ADDR_BITS;
333 a->addr_ip = so->sin.sin_addr.s_addr;
334 break;
335 default:
336 errno = EINVAL;
337 return (-1); <- here
338 }
339 return (0);
340 }
341

returning all the way up to
304 / Get NIC information. /
305 if (!GuestInfo_GetNicInfo(&nicInfo)) {
306 g_warning("Failed to get nic info.\n");

Discussion

  • Ravindra Kumar

    Ravindra Kumar - 2014-05-09

    Thanks Xuefer for reporting this issue. I assume you are using the latest version of open-vm-tools, is that right? Could you please report the libdnet issue on libdnet mailing lists? Thanks!

     
  • Ravindra Kumar

    Ravindra Kumar - 2014-05-09

    I'm not able to match the line numbers in libdnet 1.11 and 1.12. Could you please share the version of libdnet as well from your system?

    BTW, given that "ifr" structure seems to be messed up. One could suspect SIOCGIFADDR IOCTL too as that is the IOCTL filling in "ifr" structure contents.

     
  • Xuefer

    Xuefer - 2014-05-15

    $ equery which libdnet
    /usr/portage/dev-libs/libdnet/libdnet-1.12.ebuild
    xuefer@dev ~
    $ equery which open-vm-tools
    /usr/portage/app-emulation/open-vm-tools/open-vm-tools-2013.09.16.1328054-r3.ebuild

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks