[Pkg-utopia-maintainers] Bug#993051: Acknowledgement (avahi-daemon CPU usage increases over time)

Ryan Armstrong bugs at zerker.ca
Wed Sep 15 00:12:10 BST 2021


I have made an attempt at profiling where the avahi-daemon is getting 
stuck. Hopefully this is useful to someone. I downloaded the source 
package for avahi-daemon, then rebuilt it and installed the resulting 
debug packages. After waiting for the CPU usage to reach around 70% or 
so, I attempted to profile where it is executing.

My initial attempt at running `perf record -p 514 -g` failed; when 
running `perf report` after, the report was fully blank. As a result, I 
decided to go back to my original plan and just break a few times in gdb 
to see where it stopped. See the attached log for a full log of that 
session. It seemed to be usually in one of two places:

#0  0x00007ff359801fb0 in find_next_timeout (s=<optimized out>) at 
simple-watch.c:431
#1  0x00007ff3598027ea in avahi_simple_poll_prepare 
(s=s at entry=0x558f0b1e5ff0, timeout=timeout at entry=-1) at simple-watch.c:481
#2  0x00007ff359802c69 in avahi_simple_poll_iterate (s=0x558f0b1e5ff0, 
timeout=timeout at entry=-1) at simple-watch.c:599
#3  0x0000558f09c929ee in run_server (c=0x558f09cb01e0 <config>) at 
main.c:1268
#4  main (argc=<optimized out>, argv=<optimized out>) at main.c:1686

or

#0  0x00007ff35962d3c3 in __GI___poll (fds=0x558f0b1eec90, nfds=10, 
timeout=2209504) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ff359802aa1 in avahi_simple_poll_run (s=0x558f0b1e5ff0) at 
simple-watch.c:527
#2  avahi_simple_poll_run (s=0x558f0b1e5ff0) at simple-watch.c:518
#3  0x00007ff359802c78 in avahi_simple_poll_iterate (s=0x558f0b1e5ff0, 
timeout=timeout at entry=-1) at simple-watch.c:602
#4  0x0000558f09c929ee in run_server (c=0x558f09cb01e0 <config>) at 
main.c:1268
#5  main (argc=<optimized out>, argv=<optimized out>) at main.c:1686

Ryan

On 2021-09-11 1:11 p.m., Ryan Armstrong wrote:
> I edited my Avahi service to add the --debug flag to see if added 
> anything useful. It doesn't seem so, but here it is regardless. I've 
> attached both the full log (gzipped) and an annotated and simplified log.
>
> I may try and attach to the process with GDB in the future to trace 
> what part of the code it is primarily working in.
>
> Ryan
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: avahi-debug session.log
Type: text/x-log
Size: 11552 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-utopia-maintainers/attachments/20210914/dd5c8329/attachment.bin>


More information about the Pkg-utopia-maintainers mailing list