Beginner error on my part : there are debug logs in networkd, I didn't
even check them. As often, it turns out part of the answer lies in
there.

Here are the logs from 2.33:

autopkgtest systemd-networkd[942]: test_eth42: Gained IPv6LL
autopkgtest systemd-networkd[942]: test_eth42: link_check_ready(): DHCP4, DHCP6 
or IPv4LL is enabled but no dynamic address is assigned yet.
autopkgtest systemd-networkd[942]: test_eth42: Discovering IPv6 routers
autopkgtest systemd-networkd[942]: NDISC: Started IPv6 Router Solicitation 
client
autopkgtest systemd-networkd[942]: test_eth42: Remembering foreign route: dst: 
fe80::dcad:beff:feef:4711/128, src: n/a, gw: n/a, prefsrc: n/a, scope: global, 
table: local(255), proto: kernel, type: local, nexthop: 0
autopkgtest systemd-networkd[942]: NDISC: Sent Router Solicitation, next 
solicitation in 4s
autopkgtest systemd-networkd[942]: rtnl: received non-static neighbor, ignoring.
autopkgtest systemd-networkd[942]: NDISC: Received Router Advertisement: flags 
MANAGED preference medium lifetime 1800 sec
autopkgtest systemd-networkd[942]: NDISC: Invoking callback for 'router' event.
autopkgtest systemd-networkd[942]: DHCPv6 CLIENT: Started in Managed mode
autopkgtest systemd-networkd[942]: test_eth42: Acquiring DHCPv6 lease on NDisc 
request
autopkgtest systemd-networkd[942]: test_eth42: Configuring route: dst: n/a, 
src: n/a, gw: fe80::6051:85ff:fe70:4c03, prefsrc: n/a, scope: global, table: 
main(254), proto: ra, type: unicast, nexthop: 0

And the equivalent in 2.34:

Aug 27 14:28:27 autopkgtest systemd-networkd[939]: test_eth42: Gained IPv6LL
Aug 27 14:28:27 autopkgtest systemd-networkd[939]: test_eth42: 
link_check_ready(): DHCP4, DHCP6 or IPv4LL is enabled but no dynamic address is 
assigned yet.
Aug 27 14:28:27 autopkgtest systemd-networkd[939]: test_eth42: Discovering IPv6 
routers
Aug 27 14:28:27 autopkgtest systemd-networkd[939]: NDISC: Started IPv6 Router 
Solicitation client
Aug 27 14:28:27 autopkgtest systemd-networkd[939]: test_eth42: Remembering 
foreign route: dst: fe80::dcad:beff:feef:4711/128, src: n/a, gw: n/a, prefsrc: 
n/a, scope: global, table: local(255), proto: kernel, type: local, nexthop: 0
Aug 27 14:28:29 autopkgtest systemd-networkd[939]: NDISC: Sent Router 
Solicitation, next solicitation in 4s
Aug 27 14:28:29 autopkgtest systemd-networkd[939]: rtnl: received non-static 
neighbor, ignoring.
Aug 27 14:28:29 autopkgtest systemd-networkd[939]: NDISC: Unexpected error 
while reading from ICMPv6, ignoring: Exchange full

Looking through the code, one can trace the EXFULL error to this
function:

https://github.com/systemd/systemd/blob/main/src/basic/socket-
util.c#L1260

Which checks the msg flags and finds MSG_CTRUNC.
The thing is, the recvmsg in strace looks like this:

recvmsg(20, {msg_name={sa_family=AF_INET6, sin6_port=htons(0),
sin6_flowinfo=htonl(0), inet_pton(AF_INET6, "fe80::6051:85ff:fe70:4c03",
&sin6_addr), sin6_scope_id=if_nametoindex("test_eth42")},
msg_namelen=128->28,
msg_iov=[{iov_base="\206\0000\276@\300\7\10\0\0\0\0\0\0\0\0\3\4@\200\377\377\377\377\377\377\377\377\0\0\0\0"...,
iov_len=88}], msg_iovlen=1, msg_control=[{cmsg_len=20,
cmsg_level=SOL_SOCKET, cmsg_type=SO_TIMESTAMP_OLD,
cmsg_data={tv_sec=1630055833, tv_usec=877754}}, {cmsg_len=16,
cmsg_level=SOL_IPV6, cmsg_type=0x34}], msg_controllen=36, msg_flags=0},
MSG_DONTWAIT) = 88

You'll note the msg_flags=0 at the end.

So... What the hell?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1940635

Title:
  systemd-networkd failing to acquire a DHCP6 lease from dnsmasq on
  armhf

Status in glibc package in Ubuntu:
  New
Status in netplan.io package in Ubuntu:
  New
Status in systemd package in Ubuntu:
  New

Bug description:
  systemd-networkd is failing to acquire a DCHP6 lease from dnsmasq on
  armhf since glibc 2.34-0ubuntu1, failing systemd (tests-name=networkd-
  test.py) and netplan.io (test-name=ethernets) tests on armhf.

  Reproducer:
  * Setup an armhf container, e.g. via:
  autopkgtest systemd --test-name=networkd-test.py --shell -U 
--apt-pocket=proposed=src:systemd,src:glibc -s -- lxd 
autopkgtest/ubuntu/impish/armhf
  * It will fail and drop you into the shell
  * cd test/ && apt install python3-nose
  * nosetests3 -v -s -m "test_.*_dhcp_ip6" networkd-test.py

  
  This is unrelated to the recent dnsmasq changes (LP: #1894619), as that would 
fail on all architectures, not just armhf.

  It still passes inside an amd64 LXD container, so it is also not related to 
armhf being tested inside a container. But it shows the difference between 
armhf vs amd64 container, that on armhf we're missing the DHCPSOLICIT (and 
therefore DHCPREPLY) messages, as can be seen from the dnsmasq log:
  dnsmasq-dhcp[]: DHCPSOLICIT(router_eth42) 
00:02:00:00:ab:11:57:1e:20:2f:9e:56:5f:34 
  dnsmasq-dhcp[]: DHCPREPLY(router_eth42) 2600::1f 
00:02:00:00:ab:11:57:1e:20:2f:9e:56:5f:34 autopkgtest-lxd-rtypaf

  The issue is most probably the same that causes the currently failing
  netplan.io/ethernets autopkgtest on armhf, if tested against glibc
  2.34-0ubuntu1.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1940635/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to