[systemd-devel] assert() when restarting systemd-networkd

Tom Gundersen teg at jklm.no
Thu Oct 23 10:53:14 PDT 2014


On Tue, Aug 12, 2014 at 11:19 AM, Michael Olbrich
<m.olbrich at pengutronix.de> wrote:
> On Wed, Jul 30, 2014 at 06:09:44PM +0200, Tom Gundersen wrote:
>> On Sun, Jul 20, 2014 at 3:12 PM, Michael Olbrich
>> <m.olbrich at pengutronix.de> wrote:
>> > with the current git master (v215-293-g4e6029435111) restarting
>> > systemd-networkd triggers an assert() here:
>> >
>> > In netdev_join_handler():
>> >         assert(IN_SET(link->state, LINK_STATE_ENSLAVING, LINK_STATE_FAILED,
>> >                       LINK_STATE_LINGER));
>> >
>> > gdb tells me that link->state is LINK_STATE_SETTING_ADDRESSES here.
>> >
>> > It doesn't happen all the time, but when it happens, then the assert()
>> > tiggers until the start limit kicks in.
>>
>> I reworked this stuff a bit. Can you reproduce with current git?
>
> I've tested git commit bf1594f54ea4b49eee95a16796ec11c55314b2a4.
>
> Now eth0 is not configured at all:
> $ ip l
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
>     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
>     link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
> 3: vlan0 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default
>     link/ether 5e:69:2b:9a:93:07 brd ff:ff:ff:ff:ff:ff
>
> So I can't test the original issue. That only occurs if eth0 gets an
> address from the dhcp server.
>
> The log looks like this:
>
> Aug 01 00:00:00 BaseKit systemd[1]: Starting Network Service...
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: timestamp of '/lib/systemd/network' changed
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : loaded macvlan
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: sd-rtnl: discarding 20 bytes of incoming message
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : link 2 added
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : udev initialized link
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : saved original MTU: 1500
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : flags change: +MULTICAST +BROADCAST
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : link 1 added
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : udev initialized link
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : saved original MTU: 0
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : flags change: +LOOPBACK +UP +LOWER_UP +RUNNING
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : gained carrier
> Aug 01 00:00:00 BaseKit systemd[1]: Started Network Service.
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : link state is up-to-date
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : found matching network '/lib/systemd/network/eth0.network'
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: eth0            : enslaving by 'vlan0'
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : creating
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 error=n/a
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.1 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : getting address failed: Device or resource busy
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: Got message type=signal sender=org.freedesktop.DBus destination=:1.1 object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=NameAcquired cookie=2 reply_cookie=0 error=n/a
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : link state is up-to-date
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : unmanaged
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: sd-rtnl: discarding 20 bytes of incoming message
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : added address: ::1/128
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: lo              : added address: 127.0.0.1/8
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : link 3 added
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : udev initialized link
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : netdev has index 3
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : netdev ready
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : saved original MTU: 1500
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : flags change: +MULTICAST +BROADCAST
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : created
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : link state is up-to-date
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : found matching network '/lib/systemd/network/vlan0.network'
> Aug 01 00:00:00 BaseKit systemd-networkd[355]: vlan0           : bringing link up
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : setting addresses
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: sd-rtnl: discarding 20 bytes of incoming message
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: lo              : updated address: ::1/128
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: lo              : updated address: 127.0.0.1/8
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : flags change: +UP +LOWER_UP +RUNNING
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : gained carrier
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : added address: 10.1.42.4/24
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : addresses set
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : setting routes
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : routes set
> Aug 01 00:00:01 BaseKit systemd-networkd[355]: vlan0           : link configured
> Aug 01 00:00:02 BaseKit systemd-networkd[355]: vlan0           : added address: fe80::5c69:2bff:fe9a:9307/64
>
> Michael


Hi Michael,

Can you still reproduce this with current git? I tried to reproduce it
here, but I'm not able to.

Cheers,

Tom


More information about the systemd-devel mailing list