systemd-networkd fails to renew DHCP v4 lease when renew attempt times out

Bug #2054977 reported by mark

This bug report will be marked for expiration in 9 days if no further activity occurs. (find out why)

12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Incomplete
Low
Unassigned

Bug Description

I'm seeing exactly what this gist describes:
https://gist.github.com/raggi/1f8d0b9f45c5b62e7131b03e6e2ffe68

Summary:
1. Configure a machine with a DHCPv4 lease on a network with a DHCPv4 server.
2. Place machine under unusual load sufficient to cause a timeout on netlink requests.
3. Observe the interface failing with the following logs:

systemd-networkd[139370]: eth0: Could not set DHCPv4 address: Connection timed out
systemd-networkd[139370]: eth0: Failed

The error seems to come from here: https://github.com/systemd/systemd/blob/v245.4/src/network/networkd-dhcp4.c#L781

Expected behavior
The DHCPv4 client should retry the lease refresh when the issue is a timeout, eventually succeeding in these scenarios.

Actual behavior
Permanent loss of connectivity on the affected interface.

Additional info:
$ lsb_release -rd
Description: Ubuntu 20.04.6 LTS
Release: 20.04

$ apt-cache policy systemd
systemd:
  Installed: 245.4-4ubuntu3.23
  Candidate: 245.4-4ubuntu3.23
  Version table:
 *** 245.4-4ubuntu3.23 500
        500 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 mirror+file:/etc/apt/source-mirrors.txt focal-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     245.4-4ubuntu3.20 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        500 mirror+file:/etc/apt/source-mirrors.txt focal-security/main amd64 Packages
     245.4-4ubuntu3 500
        500 http://ap-southeast-2.ec2.archive.ubuntu.com/ubuntu focal/main amd64 Packages
        500 mirror+file:/etc/apt/source-mirrors.txt focal/main amd64 Packages

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Nick Rosbrook (enr0n) wrote :

I think this would be better suited as an upstream issue, because AFAICT this case is still not handled in the latest version. If you do open an upstream bug (https://github.com/systemd/systemd/issues), they will want to see this reproduced on at least systemd v254.

Please comment back here if you open a bug upstream.

Changed in systemd (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.