** Description changed:

  Currently running Kubuntu 18.10, Dell XPS 13 9350
  
  Since updating from Kubuntu 18.04 to 18.10, the avahi-daemon has been
  consistently hampering network performance and using CPU for long
  periods of time.
  
  When booting machine from off state, avahi-daemon uses an entire CPU at
  max load for approx 10 minutes. During this time, internet connectivity
  via wifi is essentially unusable. The wifi connection is good, but it
  seems that http transactions are cutoff mid-way so no webpage is able to
  load.
  
  When waking from sleep, the avahi-daemon causes similar symptoms, but
  with less than 1 full cpu usage, and with somewhat less degraded network
  performance, but still quite unusable.
  
  I have never had issues with avahi prior to the 18.10 upgrade, so I am
  fairly confident the issue is rooted in that change.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.10
  Package: avahi-daemon 0.7-4ubuntu2
  ProcVersionSignature: Ubuntu 4.18.0-10.11-generic 4.18.12
  Uname: Linux 4.18.0-10-generic x86_64
  ApportVersion: 2.20.10-0ubuntu13
  Architecture: amd64
  CurrentDesktop: KDE
  Date: Mon Oct 22 10:00:34 2018
  InstallationDate: Installed on 2017-07-24 (455 days ago)
  InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
  ProcEnviron:
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   LD_PRELOAD=<set>
   SHELL=/bin/bash
  SourcePackage: avahi
  UpgradeStatus: Upgraded to cosmic on 2018-10-20 (2 days ago)
  
  [ Impact ]
  
   * avahi-daemon consumes a large amount of CPU over time, particularly
  on laptop/desktop use cases. Many reports of it burning 100% CPU.
  
   * This also leads to increased multicast traffic which has been
  observed to cause high packet loss on WiFi networks at very large events
  with many Ubuntu laptops on the same network.
  
   * This issue was fixed long ago fixed upstream, in Debian and in
  Kinetic+ but not previously backported to Jammy.
  
  [ Test Plan ]
  
-  * It is not easy to reproduce the issue on demand, it tends to happen
- at random, only on busy networks possibly after many days or more of
- uptime. I don't currently have a way to easily reproduce the issue for
- SRU verification.
+ The problem with this bug is that when a watch is cleaned up, it stops
+ timeouts being cleaned up. The list of timeouts then grows and when
+ iterated causes high CPU usage.
  
-  * Upstream bug/diagnosis: https://bugs-devel.debian.org/cgi-
- bin/bugreport.cgi?bug=993051
+ Watches are created when nss-mdns connects via the simple socket, so we
+ can trigger this with an DNS lookup for a .local host: getent hosts
+ avahitest1.local
  
-  * TODO: Add basic manual functional test plan
+ Timeouts are created when a DBus client disconnects, so we can trigger
+ this by calling avahi-browse -a -t which will print out all services and
+ then terminate the client.
+ 
+ 1. Launch two test VMs, avahitest1 and avahitest2. Install avahi-utils,
+ avahi-daemon, libnss-mdns and sysstat. Upgrade to the fix on one of them
+ only.
+ 
+ 2. Launch mpstat 15 on both hosts
+ 
+ 3. Launch many parallel avahi-browse on both: yes | xargs -n1 -I{} -P20
+ avahi-browse -a -t
+ 
+ 4. Launch many DNS lookups on both:
+    while true; do getent hosts avahitest2.local; sleep 0.1; done
+ 
+ 5. Observe over time the CPU usage of one VM slowly grows, while the
+ other does not.
  
  [ Where problems could occur ]
  
   * This patch is a single line change for a missing cleanup, that has
  shipped in Kinetic+ for several years
  
   * The version shipping in those releases is substantially similar to
  the current release (no new upstream release)
  
-  * However: avahi-daemon is a default installed package on Desktops, so
- there is a high potential impact
+  * However: avahi-daemon is a default package on Desktops, so there is a
+ high potential impact
  
  [ Other Info ]
  
-  * Upstream commit: https://github.com/avahi/avahi/pull/366
-  * Originally diagnosed/resolved in the Debian bug: 
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1799265
-  * This patch ships in later versions (even the current version), however I 
renamed the patch to prefix the LP bug number per the preferences, and added 
DEP3 headers.
+  * Originally diagnosed/resolved in the Debian bug: 
+  https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=993051
+ 
+  * Upstream PR: https://github.com/avahi/avahi/pull/366
+ 
+  * This patch ships in later versions (even the current version),
+ however I renamed the patch to prefix the LP bug number per the
+ preferences, and added DEP3 headers.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1799265

Title:
  avahi-daemon high cpu, unusable networking

To manage notifications about this bug go to:
https://bugs.launchpad.net/avahi/+bug/1799265/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to