Public bug reported:

Every once in a while, /usr/sbin/apt-cacher-ng is seems to get stuck in
a loop and takes up 100% of cpu.

root@magicbox:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute

root@magicbox:~# dpkg -l | grep apt-cacher
ii  apt-cacher-ng                                3.6.3-1                        
                                      amd64        caching proxy server for 
software repositories

root@magicbox:~# ps -P 1494
    PID PSR TTY      STAT   TIME COMMAND
   1494   2 ?        Ssl  2674:27 /usr/sbin/apt-cacher-ng -c /etc/apt-cacher-ng 
ForeGround=1

root@magicbox:~# top -p 1494
    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   1494 apt-cac+  20   0  755256  10244   7392 S 100.0   0.1   2681:35 
apt-cacher-ng  

Seems one of the threads stuck in a select/pool loop:
x00007f8c9495309e in epoll_wait (epfd=3, events=0x55b8c69e4eb0, maxevents=32, 
timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
Download failed: Function not implemented.  Continuing without source file 
./misc/../sysdeps/unix/sysv/linux/epoll_wait.c.
30      ../sysdeps/unix/sysv/linux/epoll_wait.c: No such file or directory.
(gdb) bt
#0  0x00007f8c9495309e in epoll_wait (epfd=3, events=0x55b8c69e4eb0, 
maxevents=32, timeout=-1) at ../sysdeps/unix/sysv/linux/epoll_wait.c:30
#1  0x00007f8c94ca8719 in ?? () from /lib/x86_64-linux-gnu/libevent-2.1.so.7
#2  0x00007f8c94c9e685 in event_base_loop () from 
/lib/x86_64-linux-gnu/libevent-2.1.so.7
#3  0x00007f8c94d8455a in acng::evabase::MainLoop() () from 
/lib/x86_64-linux-gnu/libsupacng.so
#4  0x000055b8c61f5b25 in ?? ()
#5  0x00007f8c94863565 in __libc_start_main (main=0x55b8c61f5af0, argc=4, 
argv=0x7fff32802fc8, init=<optimised out>, fini=<optimised out>, 
rtld_fini=<optimised out>, stack_end=0x7fff32802fb8) at ../csu/libc-start.c:332
#6  0x000055b8c61f5ede in ?? ()

(gdb) info threads
  Id   Target Id                 Frame
* 1    LWP 1494 "apt-cacher-ng"  0x00007f8c9495309e in epoll_wait (epfd=3, 
events=0x55b8c69e4eb0, maxevents=32, timeout=-1) at 
../sysdeps/unix/sysv/linux/epoll_wait.c:30
  2    LWP 5052 "apt-cacher-ng"  __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8c94dae090) at 
../sysdeps/nptl/futex-internal.c:74
  3    LWP 11108 "apt-cacher-ng" __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8c8802ba98) at 
../sysdeps/nptl/futex-internal.c:74
  4    LWP 18009 "apt-cacher-ng" __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8c8802ba98) at 
../sysdeps/nptl/futex-internal.c:74
  5    LWP 18010 "apt-cacher-ng" __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8c8802ba98) at 
../sysdeps/nptl/futex-internal.c:74
  6    LWP 18014 "apt-cacher-ng" __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x7f8c7bffeca0, clockid=1, expected=0, 
futex_word=0x7f8c94dacd38) at ../sysdeps/nptl/futex-internal.c:74
  7    LWP 19462 "apt-cacher-ng" 0x00007f8c94949b31 in __GI___select (nfds=15, 
readfds=0x7f8c915daa00, writefds=0x7f8c915daa80, exceptfds=0x0, 
timeout=<optimised out>) at ../sysdeps/unix/sysv/linux/select.c:49
  8    LWP 21198 "apt-cacher-ng" __futex_abstimed_wait_common64 (cancel=true, 
private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7f8c94dae090) at 
../sysdeps/nptl/futex-internal.c:74
  9    LWP 22284 "apt-cacher-ng" 0x00007f8c94949b31 in __GI___select (nfds=19, 
readfds=0x7f8c7b7fda00, writefds=0x7f8c7b7fda80, exceptfds=0x0, 
timeout=<optimised out>) at ../sysdeps/unix/sysv/linux/select.c:49
(gdb) thread 7
[Switching to thread 7 (LWP 19462)]
#0  0x00007f8c94949b31 in __GI___select (nfds=15, readfds=0x7f8c915daa00, 
writefds=0x7f8c915daa80, exceptfds=0x0, timeout=<optimised out>) at 
../sysdeps/unix/sysv/linux/select.c:49
Download failed: Function not implemented.  Continuing without source file 
./misc/../sysdeps/unix/sysv/linux/select.c.
49      ../sysdeps/unix/sysv/linux/select.c: No such file or directory.
(gdb) bt
#0  0x00007f8c94949b31 in __GI___select (nfds=15, readfds=0x7f8c915daa00, 
writefds=0x7f8c915daa80, exceptfds=0x0, timeout=<optimised out>) at 
../sysdeps/unix/sysv/linux/select.c:49
#1  0x00007f8c94d135f8 in 
acng::dlcon::Impl::ExchangeData(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >&, 
std::shared_ptr<acng::tcpconnect>&, 
std::__cxx11::list<acng::dlcon::Impl::tDlJob, 
std::allocator<acng::dlcon::Impl::tDlJob> >&) () from 
/lib/x86_64-linux-gnu/libsupacng.so
#2  0x00007f8c94d15636 in acng::dlcon::Impl::WorkLoop() () from 
/lib/x86_64-linux-gnu/libsupacng.so
#3  0x00007f8c94b1c694 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f8c94c64450 in start_thread (arg=0x7f8c915db640) at 
pthread_create.c:473
#5  0x00007f8c94952d53 in clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:95

** Affects: apt-cacher-ng (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  apt-cache-ng is taking 100% cpu

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt-cacher-ng/+bug/1942182/+subscriptions


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

Reply via email to