Comment 4 for bug 1972664

Revision history for this message
Trent Lloyd (lathiat) wrote :

I see this alot when OpenStack starts a virtual machine, probably because tap devices are created and discovered.

I suspect but have not yet proven precisely that this creates a lot of netlink traffic that other processes seem to also receive, and in the case of libvirt, sometimes it throws this error, it's always correlated directly with these networkd-dispatcher rescan errors:
libvirtd[8647]: nl_recv returned with error: No buffer space available

Have also less commonly seen the same from livepatch, again directly correlated with these:
canonical-livepatch.canonical-livepatchd[678488]: Error receiving netlink message: no buffer space available.

I need to research the correlation with the netlink buffer errors a bit more to be sure about it. But this error seems to always be thrown anytime an interface is created and should probably be fixed anyway. It seems this is fixed upstream here:

https://gitlab.com/craftyguy/networkd-dispatcher/-/commit/8d09e931abdb3660a514ad9d96d572f135dec1a4

commit 8d09e931abdb3660a514ad9d96d572f135dec1a4
Author: Wenxin Wang <email address hidden>
Date: Mon Jun 6 15:18:08 2022 +0800

    _interface_scan: fix wrong index into iface map

    This typo in the code made networkd-dispatcher always update
    ALL interfaces's state when any new interface is found.

diff --git a/networkd-dispatcher b/networkd-dispatcher
index 0a20361..2df852b 100755
--- a/networkd-dispatcher
+++ b/networkd-dispatcher
@@ -273,7 +273,7 @@ class Dispatcher():
         # Append new interfaces, keeping old ones around to avoid hotplug race
         # condition (issue #20)
         for i in iface_list:
- if i not in self.iface_names_by_idx:
+ if i.idx not in self.iface_names_by_idx:
                 self.iface_names_by_idx[i.idx] = i.name
                 self.ifaces_by_name[i.name] = i
         logger.debug('Performed interface scan; state: %r', self)