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
at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:4451
at /var/tmp/portage/dev-libs/glib-2.38.2-r1/work/glib-2.38.2/glib/gmain.c:3713
(gdb) p sa->sa_family
$38 = 65534
it goes to default case
(gdb) fr
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");
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!
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.
$ 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
and yes, i've reported libdnet to their bug system https://code.google.com/p/libdnet/issues/detail?id=31