#922630 avahi-daemon high cpu usage

Package:
avahi-daemon
Source:
avahi
Description:
Avahi mDNS/DNS-SD daemon
Submitter:
David Miguel Susano Pinto
Date:
2022-06-06 11:51:02 UTC
Severity:
normal
#922630#5
Date:
2019-02-18 16:10:35 UTC
From:
To:
Dear Maintainer,

avahi-dameon shows a very high cpu usage and I found no useful
messages on the logs.  Restarting the daemon does nothing.  When I ran
the daemon with '--debug' option, I see hundreds of lines like this on
syslog:

    Received response from host 10.31.19.92 with invalid source port 63227
    Received response from host 10.31.20.38 with invalid source port 57554
    Received response from host 10.31.40.164 with invalid source port 58307
    Received response from host 10.31.44.4 with invalid source port 54151

It's always those four IP addresses and those four ports.  There's
many other entries but those are the ones that look the most like an
error.

This issue only happens at a specific network (eduroam wifi network at
my university).  There are no problems on many other networks so I
think there may be something odd with this specific university.

However, I also think that avahi should be a bit more resilient.  Even
if there is an issue on the network, it should not bring a laptop to a
halt.  avahi-daemon goes at 100% CPU usage nonstop.  The only reason I
can do any work at all is that this is a quite beffy quadcore laptop.

#922630#10
Date:
2019-05-29 02:58:29 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
    eduroam WIFI connected to the internet at a university.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
     Nothing.
   * What was the outcome of this action?
   Slow computer, fan running on and off at full speed.
   * What outcome did you expect instead?
   That the avahi-daemon wasn't acting like a magnet to all my CPU.

#922630#15
Date:
2019-05-29 03:13:37 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?
    eduroam WIFI connected to the internet at a university.
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
     Nothing.
   * What was the outcome of this action?
   Slow computer, fan running on and off at full speed.
   * What outcome did you expect instead?
   That the avahi-daemon wasn't acting like a magnet to all my CPU.

#922630#20
Date:
2022-03-03 15:12:57 UTC
From:
To:
Control: found -1 0.8-5

Same issue. The htop utility shows:

    PID USER      PRI  NI  VIRT   RES   SHR S CPU%▽MEM%   TIME+  Command
    634 avahi      20   0 36172 31724  3936 R 99.9  0.1 32h20:44 avahi-daemon: running [cventin.local]

Here this is at my lab, for a machine connected via an Ethernet cable.

#922630#27
Date:
2022-03-03 15:30:45 UTC
From:
To:
I've looked at the atop logs since the machine got rebooted.
The CPU usage actually increases during the first 24 hours
to reach about 100%:
  00:30  1%
  00:40  2%
  01:00  3%
  01:10  4%
  01:20  5%
  02:00  6%
  03:00  8%
  04:00 11%
  05:00  9%
  06:00 11%
  07:00 12%
  08:00 14%
  09:00 10%
  10:00 10%
  11:00 12%
  12:00 16%
  13:00 17%
  14:00 18%
  15:00 20%
  16:00 21%
  17:00 24%
  18:00 29%
  19:00 38%
  20:00 42%
  21:00 49%
  21:30 59%
  22:00 68%
  22:30 86%
  23:00 93%
  24:00 96%

So bug 922630 looks like the same bug as bug 993051.

#922630#32
Date:
2022-06-05 15:10:49 UTC
From:
To:
Hi there,

On at least 3 different computer I hit this bug.

Do anyone made a patched .deb or is there any notion that there could be
an updated package anytime soon?

(or any alternative software suggest)


Regards,

#922630#37
Date:
2022-06-05 15:21:39 UTC
From:
To:
Am 05.06.22 um 17:10 schrieb Mathieu ROY:

I don't see anyone having provided a patch for this issue.

My recommendation would be to file this issue upstream at
https://github.com/lathiat/avahi/issues

Upstream can probably help you with debugging this issue.
Once a fix/patch is available, we can cherry-pick that in the Debian
package.

Michael

#922630#42
Date:
2022-06-06 09:51:17 UTC
From:
To:
Hi,

This bug is very likely the same as 993051 that you fixed yesterday.

Thanks!

Regards,

#922630#47
Date:
2022-06-06 11:47:06 UTC
From:
To:
I agree. With the absence of additional information (and a vague
bug title), these bugs should be regarded as being the same.

Before the upgrade to 0.8-6 (i.e. containing the 993051 bug fix),
I'm trying to reproduce the issue with 0.8-5[*], but I do not
notice it any longer. I suppose that on the network, there was a
machine that triggered the issue, but it is no longer there. So,
unfortunately, I can't say more on the issue I got at that time.

[*] Same machine, same network, same avahi-daemon version as
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922630#20
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=922630#27