Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd 246 looses IPv6 address in a flappy way #16719

Closed
norg opened this issue Aug 13, 2020 · 28 comments · Fixed by #16725
Closed

systemd 246 looses IPv6 address in a flappy way #16719

norg opened this issue Aug 13, 2020 · 28 comments · Fixed by #16725
Labels
network regression ⚠️ A bug in something that used to work correctly and broke through some recent commit

Comments

@norg
Copy link

norg commented Aug 13, 2020

systemd version the issue has been seen with

246

Used distribution

Archlinux

Expected behaviour you didn't see

stable IPv6 connection

Unexpected behaviour you saw

IPv6 address is lost from time to time for minutes, is back for some minutes and gone again and back and...

Steps to reproduce the problem

I did downgrade to 245 and the problem doesn't appear, when I upgrade to 246 the flappy IPv6 is back. My interface config is rather short:

 /etc/systemd/network/20-wired.network                              
[Match]               
Name=enp4s0

[Network]
DHCP=yes

And this is how it should look like and does with 245:

3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1b:21:22:46:10 brd ff:ff:ff:ff:ff:ff
    inet 10.23.0.150/24 brd 10.23.0.255 scope global dynamic enp4s0
       valid_lft 5390sec preferred_lft 5390sec
    inet6 fde8:1689:74ac::6b9/128 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fde8:1689:74ac:0:21b:21ff:fe22:4610/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 2003:a:XXXX:XXXX:21b:21ff:fe22:4610/64 scope global dynamic mngtmpaddr noprefixroute 
       valid_lft 86309sec preferred_lft 14309sec
    inet6 fe80::21b:21ff:fe22:4610/64 scope link 
       valid_lft forever preferred_lft forever

With 246 in the faulty state:

3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:1b:21:22:46:10 brd ff:ff:ff:ff:ff:ff
    inet 10.23.0.150/24 brd 10.23.0.255 scope global dynamic enp4s0
       valid_lft 5390sec preferred_lft 3490sec
    inet6 fde8:1689:74ac::6b9/128 scope global noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fde8:1689:74ac:0:21b:21ff:fe22:4610/64 scope global mngtmpaddr noprefixroute 
       valid_lft forever preferred_lft forever
    inet6 fe80::21b:21ff:fe22:4610/64 scope link 
       valid_lft forever preferred_lft forever

In the flappy case only the IPv4 and the link local v6 addresses are available.

I tried to see anything in the logs via journalctl or dmesg but nothing to see there at those timeslots where flapping starts.

Since it's narrowed down to the diff between systemd 245 and 246 I guess a change is the root cause for that behavior.

@yuwata yuwata added network needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Aug 13, 2020
@yuwata
Copy link
Member

yuwata commented Aug 13, 2020

Please provide debugging logs of networkd. You can generate debugging logs by creating the following drop-in config:

# /etc/systemd/system/systemd-networkd.service.d/override.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

@norg
Copy link
Author

norg commented Aug 13, 2020

Aug 13 17:31:04 HOSTNAME systemd-networkd[475]: rtnl: received non-static neighbor, ignoring.
Aug 13 17:31:04 HOSTNAME systemd-networkd[475]: rtnl: received non-static neighbor, ignoring.
Aug 13 17:31:15 HOSTNAME systemd-networkd[475]: LLDP: Invoking callback for 'refreshed' event.
Aug 13 17:31:15 HOSTNAME systemd-networkd[475]: LLDP: Successfully processed LLDP datagram.
Aug 13 17:31:30 HOSTNAME systemd-networkd[475]: LLDP: Invoking callback for 'refreshed' event.
Aug 13 17:31:30 HOSTNAME systemd-networkd[475]: LLDP: Successfully processed LLDP datagram.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: NDISC: Received Router Advertisement: flags MANAGED preference medium lifetime 1800 sec
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: NDISC: Invoking callback for 'router' event.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Acquiring DHCPv6 lease on NDisc request
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Configuring route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Configuring route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Updating address: 2003:a:1416:XX:XX:21ff:fe22:4610
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Setting SLAAC addresses.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Setting NDisc routes.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: State changed: configured -> configuring
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=31 reply_cookie=0 sig>
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Received remembered route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Received remembered route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: NDisc routes set.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address 2003:a:1416:XX:XX:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: Remembering updated address: 2003:a:1416:XX:XX:21ff:fe22:4610/64 (valid for 1d)
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address 2003:a:1416:XX:XX:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: NDisc SLAAC addresses set.
Aug 13 17:31:41 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address 2003:a:1416:XX:XX:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Remembering updated address: 2003:a:1416:XX:XX:21ff:fe22:4610/64 (valid for 23h 59min 59s)
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): dhcp4:yes dhcp6_addresses:yes dhcp_routes:yes dhcp_pd_addresses:no dhcp_pd_routes:no ndisc_addresses:yes ndisc_routes:yes
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: State changed: configuring -> configured
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=32 reply_cookie=0 sig>
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Removing old NDisc addresses and routes.
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Removing address fde8:1689:74ac:0:21b:21ff:fe22:4610
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Removing route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Removing route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Remembering route: dst: 2003:a:1416:XX:XX:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting address: fde8:1689:74ac:0:21b:21ff:fe22:4610/64 (valid forever)
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: fde8:1689:74ac:0:21b:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:43 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:45 HOSTNAME systemd-networkd[475]: LLDP: Invoking callback for 'refreshed' event.
Aug 13 17:31:45 HOSTNAME systemd-networkd[475]: LLDP: Successfully processed LLDP datagram.
Aug 13 17:31:47 HOSTNAME systemd-networkd[475]: rtnl: received non-static neighbor, ignoring.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: NDISC: Received Router Advertisement: flags MANAGED preference medium lifetime 0 sec
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: NDISC: Invoking callback for 'router' event.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Acquiring DHCPv6 lease on NDisc request
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Configuring route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Updating address: fde8:1689:74ac:0:21b:21ff:fe22:4610
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Configuring route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Setting SLAAC addresses.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Setting NDisc routes.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: State changed: configured -> configuring
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=33 reply_cookie=0 sig>
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Received remembered route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Remembering updated address: fde8:1689:74ac:0:21b:21ff:fe22:4610/64 (valid forever)
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: NDisc SLAAC addresses set.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: Received remembered route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: NDisc routes set.
Aug 13 17:31:52 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Remembering updated address: fde8:1689:74ac:0:21b:21ff:fe22:4610/64 (valid forever)
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: link_check_ready(): dhcp4:yes dhcp6_addresses:yes dhcp_routes:yes dhcp_pd_addresses:no dhcp_pd_routes:no ndisc_addresses:yes ndisc_routes:yes
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: State changed: configuring -> configured
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=34 reply_cookie=0 sig>
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Removing old NDisc addresses and routes.
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Removing address 2003:a:1416:XX:XX:21ff:fe22:4610
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Removing route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Removing route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Remembering route: dst: fde8:1689:74ac:0:21b:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting address: 2003:a:1416:XX:XX:21ff:fe22:4610/64 (valid for 23h 59min 48s)
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: 2003:a:1416:XX:XX:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:31:54 HOSTNAME systemd-networkd[475]: enp4s0: Forgetting route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:32:00 HOSTNAME systemd-networkd[475]: LLDP: Invoking callback for 'refreshed' event.
Aug 13 17:32:00 HOSTNAME systemd-networkd[475]: LLDP: Successfully processed LLDP datagram.

This is from a case where the IPv6 was not available at first, shortly available and gone again.

I also followed the log while IPv6 was working (ping to a IPv6 target in the internet) and when the ping stopped working those are the lines in the log:

Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: NDISC: Received Router Advertisement: flags MANAGED preference medium lifetime 0 sec
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: NDISC: Invoking callback for 'router' event.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Acquiring DHCPv6 lease on NDisc request
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Configuring route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Updating address: fde8:1689:74ac:0:21b:21ff:fe22:4610
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Configuring route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Setting SLAAC addresses.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Setting NDisc routes.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: State changed: configured -> configuring
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=25 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Received remembered route: dst: fde8:1689:74ac::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Remembering updated address: fde8:1689:74ac:0:21b:21ff:fe22:4610/64 (valid forever)
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: NDisc SLAAC addresses set.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: Received remembered route: dst: fde8:1689:74ac::/48, src: n/a, gw: fe80::7ad2:94ff:fea2:7cc, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: NDisc routes set.
Aug 13 17:41:03 HOSTNAME systemd-networkd[1230]: enp4s0: link_check_ready(): an address fde8:1689:74ac:0:21b:21ff:fe22:4610/64 is not ready.
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Remembering updated address: fde8:1689:74ac:0:21b:21ff:fe22:4610/64 (valid forever)
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: link_check_ready(): dhcp4:yes dhcp6_addresses:yes dhcp_routes:yes dhcp_pd_addresses:no dhcp_pd_routes:no ndisc_addresses:yes ndisc_routes:yes
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: State changed: configuring -> configured
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_33 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=26 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Removing old NDisc addresses and routes.
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Removing address 2003:a:1416:XX:XX:21ff:fe22:4610
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Removing route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Removing route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Remembering route: dst: fde8:1689:74ac:0:21b:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Forgetting address: 2003:a:1416:XX:XX:21ff:fe22:4610/64 (valid for 23h 59min 10s)
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Forgetting route: dst: 2003:a:1416:XX:XX:21ff:fe22:4610/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: local, proto: kernel, type: local
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Forgetting route: dst: n/a, src: n/a, gw: fe80::f690:eaff:fe00:25ce, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast
Aug 13 17:41:05 HOSTNAME systemd-networkd[1230]: enp4s0: Forgetting route: dst: 2003:a:1416:de24::/64, src: n/a, gw: n/a, prefsrc: n/a, scope: global, table: main, proto: ra, type: unicast

Is that an issue that when the RA is received it breaks?

@yuwata yuwata added regression ⚠️ A bug in something that used to work correctly and broke through some recent commit and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Aug 13, 2020
yuwata added a commit to yuwata/systemd that referenced this issue Aug 14, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.
@yuwata
Copy link
Member

yuwata commented Aug 14, 2020

@norg Thanks. Fix is waiting in #16725. If possible, could you test the PR?

@norg
Copy link
Author

norg commented Aug 14, 2020

Thanks I will try a custom pkgbuild with that PR applied. Nice to see that it seem already to be addressed.

@tycho
Copy link
Contributor

tycho commented Aug 31, 2020

@yuwata I was running into this problem on multiple machines on my home network. I tested with your PR applied and all the machines are behaving well now. Thanks for your fast work -- hopefully it gets merged soon.

@norg
Copy link
Author

norg commented Aug 31, 2020

I can confirm that this fixes my issue as well

yuwata added a commit to yuwata/systemd that referenced this issue Sep 4, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.
@colmbuckley
Copy link

colmbuckley commented Sep 5, 2020

Hey folks -

I don't think this is a complete fix; as I still see strange issues with SLAAC, and packet loss. With the patches from this PR applied, I no longer get the extended periods without configured v6 addresses, however I do get short periods of connectivity drop (1-2 seconds long, about once per minute), which I did not get on systemd 245. The systemd-networkd debug logs still have what seems like unusual messages in them, indicating repeated attempts to reconfigure the interface. Looks like systemd-network also restarts from time to time.

Debug logs attached, with some minor redactions of v6 addresses.

This is the Debian backports source, patched with the four commits referenced above.

systemd-networkd.debug.log

(The address ending :63be is the primary SLAAC address for this system.)

@colmbuckley
Copy link

For comparison, systemd-networkd debug log for the version 245 on the same system, which does not experience any connectivity drops. (It still seems to reconfigure the interface unusually frequently; not sure if this is an artifact of my RA environment.)

systemd-networkd-245.debug.log

@colmbuckley
Copy link

Aside: I'm slightly puzzled by the description of the PR as being for "the case where multiple routers exist". I have only a single router in my network; it provides a fairly standard configuration of DHCPv4 for a /24 RFC1918 subnet, RA/SLAAC for a /64 v6 net, and DHCPv6 for dns-server and domain-search options only. (All of these provided by the common 'dnsmasq' service.)

I worry that this issue will be more widespread than is anticipated.

@yuwata
Copy link
Member

yuwata commented Sep 5, 2020

@colmbuckley From your systemd-networkd.debug.log,

int0: Forgetting address: 2a01:NNNN:NNNN:NNNN:a1af:XXXX:XXXX:9d0f/64 (valid for 59min 37s)
int0: Remembering foreign address: 2a01:NNNN:NNNN:NNNN:a1af:XXXX:XXXX:9d0f/64 (valid for 59min 59s)

Where the 9d0f/64 address comes from? It seems the address is not configured by networkd.

@colmbuckley
Copy link

I think the 9d0f address is an RFC4941 privacy address. int0.network on this system has IPv6PrivacyExtensions = yes

@colmbuckley
Copy link

@tycho @norg With the patch applied, do you see no packet loss at all? I still see a few seconds drop every minute or so - it's a lot better, but not a full fix.

@colmbuckley
Copy link

@yuwata I think the network drops I saw might be correlated with systemd-network restarts; note that the daemon exited/crashed and was restarted twice during that log capture. It's possible that there's a conflict between your patch and the Debian sources (although the patch applied cleanly) causing the daemon to crash; what do you think? Unfortunately I don't have any non-Debian systems available to test on.

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

note that the daemon exited/crashed and was restarted twice during that log capture.

@colmbuckley I see that networkd is restarted in your log. You mean that you did not restart networkd manually? Do you have any coredumps?

I think the 9d0f address is an RFC4941 privacy address. int0.network on this system has IPv6PrivacyExtensions = yes

What happens if you disable IPv6PrivacyExtensions=? Still the network is unstable? Or the unstability is caused only when the option is enabled?

@colmbuckley
Copy link

@colmbuckley I see that networkd is restarted in your log. You mean that you did not restart networkd manually? Do you have any coredumps?

I did not restart it manually. I shall run it again shortly and see if I can reproduce this.
Not sure where coredumps would go on this system. Will see what I can find.

I think the 9d0f address is an RFC4941 privacy address. int0.network on this system has IPv6PrivacyExtensions = yes

What happens if you disable IPv6PrivacyExtensions=? Still the network is unstable? Or the unstability is caused only when the option is enabled?

I will check now.

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

If networkd crashes, then I hope you can see something in journal. Or you can see the dumps by coredumpctl.

@colmbuckley
Copy link

colmbuckley commented Sep 7, 2020

Yes, I see regular crashes of systemd-networkd with a SIGSEGV. It seems to crash immediately after logging "NDISC: Invoking callback for 'router' event." (see attached logs). This happens even with IPv6PrivacyExtensions = no on this interface.

Don't want to upload a core file to a public forum; but happy to send it on privately to you.
systemd-networkd.debug.log

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

@colmbuckley Is the SIGSEGV is caused by the patch in #16725? What happens without the patch?

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

Ugh, I found a typo in the patch. Will update.

yuwata added a commit to yuwata/systemd that referenced this issue Sep 7, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.
@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

Updated. @colmbuckley Could you test the new patch? Thank you for your cooperation!

@colmbuckley
Copy link

... just realized that my systemd-networkd doesn't have debugging symbols, so the core will be limited in usefulness. I'll build another version with debugging in, but don't have a lot of time left today to work on this.

Yes, the SEGV only occurs with that patch. Without it, I get the original behavior of the route and address being periodically dropped and re-added, but systemd-networkd does not crash.

@colmbuckley
Copy link

Updated. @colmbuckley Could you test the new patch? Thank you for your cooperation!

Building now...

@colmbuckley
Copy link

With the new patch, systemd-networkd does not crash and the addresses look stable; I am not seeing any packet loss.

I do see the interface state changing frequently from "configured" to "configuring" and back (every time it gets a RA packet from the router, I think); is that expected? (see logs)

systemd-networkd.debug.log

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

With the new patch, systemd-networkd does not crash and the addresses look stable; I am not seeing any packet loss.

Great! Thank you for testing the patch!

I do see the interface state changing frequently from "configured" to "configuring" and back (every time it gets a RA packet from the router, I think); is that expected? (see logs)

It is expected. I do not see any reason to not set "configuring" state on receiving new packet. Or do you have any issue caused by such the state changes? Of course, we can reduce that if the new packet does not change anything. But let's do that in a later PR.

@colmbuckley
Copy link

That's fine by me, as long as any configuration which is unchanged by the new RA is maintained (rather than being dropped and then re-added). That seems to be the case from the logs, so hopefully we're good.

I'll follow up with the Debian folk to pull this change once it's integrated.

@yuwata
Copy link
Member

yuwata commented Sep 7, 2020

Yeah, the patch should be backported to v246-stable branch after it is merged to master branch.

@colmbuckley
Copy link

I do see the interface state changing frequently from "configured" to "configuring" and back (every time it gets a RA packet from the router, I think); is that expected? (see logs)

It is expected. I do not see any reason to not set "configuring" state on receiving new packet. Or do you have any issue caused by such the state changes? Of course, we can reduce that if the new packet does not change anything. But let's do that in a later PR.

I think my preference would be for the link to change to configuring only if the new RA was introducing a change; and for it to remain stable if the new configuration was identical to the old config. But this seems to be mostly a cosmetic issue, so I will leave it up to you to figure out whether to create a new PR for it.

@keszybz
Copy link
Member

keszybz commented Sep 7, 2020

Or do you have any issue caused by such the state changes? Of course, we can reduce that if the new packet does not change anything. But let's do that in a later PR.

I think that'd be nice to do.

peckato1 pushed a commit to peckato1/systemd that referenced this issue Oct 1, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.

(cherry picked from commit 5055072)
ssahani pushed a commit to ssahani/systemd that referenced this issue Oct 5, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.
ssahani pushed a commit to ssahani/systemd that referenced this issue Oct 5, 2020
69203fb does not consider the case that
multiple routers exist, and causes systemd#16719.

Fixes systemd#16719.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
network regression ⚠️ A bug in something that used to work correctly and broke through some recent commit
Development

Successfully merging a pull request may close this issue.

5 participants