[systemd-devel] [PATCH] Fix rare crash on networkd start-up

Richard Maw richard.maw at codethink.co.uk
Thu Mar 12 11:14:57 PDT 2015


I could reliably make networkd crash by starting it immediately after
using Open vSwitch to make a lot of links.

This would make most of my system fail to boot, because they were ordered
after network-online.target, and systemd-networkd-wait-online.service
is not restarted when systemd-networkd.service is.

Attempting to use strace or ltrace to debug the failure in networkd
caused it to stop happening.

It turns out that this is because there's still some notification messages
about the new links being broadcast on the netlink socket when networkd
is started.

This wouldn't normally be a problem, since sd-rtnl knows to only pay
attention to responses that have the same serial number as the request,
but sd-rtnl starts its serial numbers at 0, which is what the kernel
uses for its notification messages.

Richard Maw (1):
  networkd: Begin with serial number 1 for netlink requests

 src/libsystemd/sd-rtnl/sd-rtnl.c | 5 +++++
 1 file changed, 5 insertions(+)

-- 
1.9.1



More information about the systemd-devel mailing list