systemd-resolved spams syslog whenever I'm disconnected

Bug #1698734 reported by Santiago Gala
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Dimitri John Ledkov
Artful
Fix Released
Undecided
Dimitri John Ledkov

Bug Description

Every time I suspend my laptop and resume in a situation where I don't have connectivity
I get big syslog spam from systemd-resolved. See for instance yesterday when I went out:

Jun 18 18:48:16 chiron systemd[1]: Starting Suspend...
Jun 18 18:48:16 chiron systemd-resolved[1868]: Switching to fallback DNS server 8.8.8.8.
Jun 18 18:48:16 chiron systemd-resolved[1868]: Switching to fallback DNS server 8.8.4.4.
Jun 18 18:48:16 chiron systemd-resolved[1868]: Switching to fallback DNS server 2001:4860:4860::8888.
Jun 18 18:48:16 chiron systemd-resolved[1868]: Switching to fallback DNS server 2001:4860:4860::8844.
...

And the last messages of the "episode":

Jun 18 20:13:28 chiron systemd-resolved[1868]: Switching to fallback DNS server 8.8.8.8.
Jun 18 20:13:28 chiron systemd-resolved[1868]: Switching to fallback DNS server 8.8.4.4.
Jun 18 20:13:28 chiron systemd-resolved[1868]: Switching to fallback DNS server 2001:4860:4860::8888.
Jun 18 20:13:28 chiron systemd-resolved[1868]: Switching to fallback DNS server 2001:4860:4860::8844.
Jun 18 20:13:28 chiron systemd-resolved[1868]: Switching to fallback DNS server 8.8.8.8.
Jun 18 20:13:28 chiron NetworkManager[30674]: <info> [1497809608.0889] device (wlp2s0): supplicant interface state: associ
ated -> 4-way handshake

So this correspond to roughly 85 minutes of disconnection, during which I got...

$ grep "fallback DNS" /var/log/syslog.1 | wc -l
444066

This correspond to 5224 messages/minute, 87 messages/second

I had a few other episodes in the last week, including a 4h train roundtrip:

$ zgrep "fallback DNS" /var/log/syslog* | wc -l
1964217

I noticed the bug during the trip, when the SSD activity was slowing my machine in a clearly noticeable way.

I'm running:

$ lsb_release -rd
Description: Ubuntu 17.04
Release: 17.04

$ apt-cache policy $(dpkg-query -S $(which systemd-resolve ) | awk '{print $1}')
systemd:
  Installed: 232-21ubuntu3
  Candidate: 232-21ubuntu3
  Version table:
 *** 232-21ubuntu3 500
        500 http://es.archive.ubuntu.com/ubuntu zesty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     232-21ubuntu2 500
        500 http://es.archive.ubuntu.com/ubuntu zesty/main amd64 Packages

Tags: zesty

CVE References

Changed in systemd (Ubuntu):
status: New → Confirmed
tags: added: zesty
Changed in systemd (Ubuntu Artful):
milestone: none → ubuntu-17.06
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in systemd (Ubuntu Artful):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 233-8ubuntu2

---------------
systemd (233-8ubuntu2) artful; urgency=medium

  * Disable fallback DNS servers.
    This causes resolved to call-home to google, attempt to access network when
    none is available, and spams logs. (LP: #1449001, #1698734)
  * SECURITY UPDATE: Out-of-bounds write in systemd-resolved.
    CVE-2017-9445 (LP: #1695546)

 -- Dimitri John Ledkov <email address hidden> Wed, 28 Jun 2017 13:27:28 +0100

Changed in systemd (Ubuntu Artful):
status: Fix Committed → Fix Released
Changed in systemd (Ubuntu Xenial):
milestone: none → ubuntu-16.04.3
Changed in systemd (Ubuntu Xenial):
milestone: ubuntu-16.04.3 → none
no longer affects: systemd (Ubuntu Yakkety)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Note disabling fallback DNS servers helps - https://bugs.launchpad.net/ubuntu/zesty/+source/systemd/+bug/1449001

Also upstream have downgraded this message to /silently/ switch between dns servers.

Disabling the fallback DNS servers will be cherrypick into zesty.

Revision history for this message
Santiago Gala (sgala) wrote :

Even if the log spamming disappears, I don't think switching DNS servers ~100 times per second will be a reasonable use of scarce battery power...

I mean, loosing connectivity is a common situation when a laptop is used while commuting, in a train, a bus, cafe or station, in which case the batteries are a scarce resource.

The least thing that could be expected about the underlying switching of servers is that there is some sort of exponential back-off, probably reset when routes to the servers change

no longer affects: systemd (Ubuntu Xenial)
no longer affects: systemd (Ubuntu Zesty)
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.