avahi-daemon consumes 100% CPU time after a period of networked Desktop use

Bug #655835 reported by phitastic
114
This bug affects 24 people
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Ubuntu 10.10 Release candidate, after using the machine for some time, the avahi-daemon consistently jumps to 100% CPU usage. It is a networked machine but I haven't made any extensive tests whether this problem also occurs when offline.

avahi-daemon: 0.6.27-2ubuntu3

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: avahi-daemon 0.6.27-2ubuntu3
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic-pae 2.6.35.4
Uname: Linux 2.6.35-22-generic-pae i686
NonfreeKernelModules: nvidia
Architecture: i386
Date: Wed Oct 6 12:40:32 2010
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate i386 (20100928)
ProcEnviron:
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: avahi

Revision history for this message
phitastic (robbel) wrote :
Revision history for this message
Trevor MacPhail (trevor-tmacphail) wrote :

This started happening to me yesterday. The only thing I can think I changed on the system is that I installed the 'lvm2' and 'watershed' packages and started to setup drives with lvm.

Revision history for this message
Dominic Scheirlinck (dominics) wrote :

I'm also experiencing this problem, and it has just started recently. No LVM, watershed nor PAE kernel in my case. I'm using 2.6.35-22-generic, and avahi-daemon 0.6.27-2ubuntu3.

It seems to be the main avahi-daemon that gets stuck, not the chroot helper:

  avahi 17408 66.6 0.0 3148 1620 ? R 12:02 3:47 avahi-daemon: running [dominic-desktop.local]
  avahi 17409 0.0 0.0 3016 444 ? S 12:02 0:00 \_ avahi-daemon: chroot helper

The stuck daemon can't be terminated with SIGTERM - I've had to use SIGKILL.

From stracing the daemon, it seems to be polling the time of day very quickly:

ioctl(13, FIONREAD, [0]) = 0
gettimeofday({1289344983, 852429}, NULL) = 0
poll([{fd=6, events=POLLIN}, {fd=17, events=POLLIN}, {fd=16, events=POLLIN}, {fd=15, events=POLLIN}, {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, {fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 10, 258) = 3 ([{fd=13, revents=POLLIN}, {fd=11, revents=POLLIN}, {fd=8, revents=POLLIN}])
gettimeofday({1289344983, 852591}, NULL) = 0
ioctl(13, FIONREAD, [0]) = 0
gettimeofday({1289344983, 852729}, NULL) = 0
poll([{fd=6, events=POLLIN}, {fd=17, events=POLLIN}, {fd=16, events=POLLIN}, {fd=15, events=POLLIN}, {fd=14, events=POLLIN}, {fd=13, events=POLLIN}, {fd=12, events=POLLIN}, {fd=11, events=POLLIN}, {fd=10, events=POLLIN}, {fd=8, events=POLLIN}], 10, 258) = 3 ([{fd=13, revents=POLLIN}, {fd=11, revents=POLLIN}, {fd=8, revents=POLLIN}])

And every few seconds, when one of the arguments to poll reaches zero (the argument that is 258 above) it does:

time(NULL) = 1289344984
write(7, "W", 1) = 1
write(7, "W", 1) = 1
read(6, "WW", 10) = 2

Not sure how to interpret that, so I've attached the full strace.

Revision history for this message
Vilmundur Palmason (vilmundur) wrote :

I am running Ubuntu in VirtualBox 3.2.10 on Windows 7.

I first saw this problem a few days ago after I upgraded to 10.10.

Revision history for this message
Eric Goodwin (diagonalfish) wrote :

Found this bug report while searching for a solution to the problem. After my machine (recently upgraded from 10.04 to 10.10) has been running for a while it has the same issue. ahavi-daemon uses 100% of available CPU. Restarting it helps for a little while but then CPU usage jumps up again.

Revision history for this message
Chris Betti (cbetti) wrote :

We had a good 15 minute period of unproductivity at work when avahi-daemon pegged a CPU core and our gigE ethernet connections (70MB/s sustained). We use distcc across all of our developer workstations running Ubuntu 10.10, but it generally works flawlessly. No strace, but I did see that my instance of VBoxHeadless was pegging another core for the duration avahi did so. People without VirtualBox experienced the problem, though.

Revision history for this message
Nicola Ferralis (feranick) wrote :

I still have this issue with 10.10 native (no virtualization).

Revision history for this message
Saul (4-ubuntuone-public-mailcan-com) wrote :
Revision history for this message
hamish (hamish-b) wrote :

the original bugs are probably unrelated, but see also the comments in bugs #257687 and #546231

notably null UDP packets causing the loop ... "J G Miller: That patch is in Natty"

Revision history for this message
Jens Maus (jens.maus) wrote :

Here we are facing the same problem with two of our main servers where users login to work. Both servers are Natty (11.04) and as soon as we start avahi-daemon its CPU load jumps up to 100%. After some investigation I identified that setting the "enable-dbus" option in the avahi-daemon.conf file to "No" immediately solves the issue. However, dbus applications can then not use avahi-daemon properly. Anyone else having this issue with natty (11.04) as well?

Revision history for this message
CTenorman (ctenorman) wrote :

I'm seeing the same problem on Natty, fully patched. This is a netbook on a university wifi system. It seems that whenever Ubuntu jumps on a network with more than a few people on it, this problem crops up. It's turning my netbook into a turbine for fan noise, so I'd love a fix.

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

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

Changed in avahi (Ubuntu):
status: New → Confirmed
Revision history for this message
Ruben Verhack (ruben-verhack) wrote :

I'm also having this problem, each time I connect to eduroam (the european educational network), which obviously has tons of connected devices. (I don't know the exact configuration of this network).

Still persists on ubuntu 12.04...

Revision history for this message
Ruben Verhack (ruben-verhack) wrote :

Maybe I should add that the connection is over tunneled TLS, I don't have other networks that use this, so I'm not able to check if this could be causing something.

Revision history for this message
ajaydharan (ajaydharan-km) wrote :

When I add more service files (say around 40), it still results in 100% CPU. As well as, it fails to register the service files too. Even observed in the latest avahi source too(0.6.30).

Revision history for this message
Ruben Verhack (ruben-verhack) wrote :

Still exists in Ubuntu 13.04

Revision history for this message
David Chin (david-w-h-chin) wrote :

I am seeing this in 15.04, fully updated.

Revision history for this message
Chris Billington (cjbil1) wrote :

Still present in 18.04

Revision history for this message
cemly soy (cemlysoy) wrote :

 I have an Epson L380 it is printing slow and paper jam issue I tried my best to solve the problems but I am not able to do I contact Epson Printer support they will help out in short time, they are expert technician because they will resolve the problem in one time. Visit https://www.epsonprintersupport247.com/

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.