mvo5 / unattended-upgrades

Automatic installation of security upgrades on apt based systems
GNU General Public License v2.0
278 stars 78 forks source link

uu is stuck for a long time #343

Open zffocussss opened 1 year ago

zffocussss commented 1 year ago

Ubuntu 18 was upgraded from Ubuntu 16 two weeks ago. it is always stuck,taking up too much cpu resource

journalctl -u apt-daily.service
Starting Daily apt download activities...
cat /var/log/unattended-upgrades/unattended-upgrades.log

2023-03-28 03:24:42,550 WARNING - SIGTERM or SIGHUP received, stopping unattended-upgradesonly if it is running
apt show unattended-upgrades
Package: unattended-upgrades
Version: 1.1ubuntu1.18.04.14
Priority: optional
Section: admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Michael Vogt <mvo@debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 418 kB
Depends: debconf (>= 0.5) | debconf-2.0, debconf, gir1.2-glib-2.0, powermgmt-base, python3, python3-apt, python3-gi, python3-dbus, ucf, lsb-release, lsb-base, xz-utils
Recommends: cron | cron-daemon | anacron
Suggests: bsd-mailx, default-mta | mail-transport-agent, needrestart
Task: ubuntu-desktop, cloud-image, server, kubuntu-desktop, kubuntu-full, xubuntu-core, xubuntu-desktop, ubuntustudio-desktop-core, ubuntustudio-desktop, ubuntukylin-desktop, ubuntu-mate-core, ubuntu-mate-desktop, ubuntu-budgie-desktop
Supported: 5y
Download-Size: 41.7 kB
APT-Manual-Installed: yes
APT-Sources: http://cz.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
Description: automatic installation of security upgrades
 This package can download and install security upgrades automatically
 and unattended, taking care to only install packages from the
 configured APT source, and checking for dpkg prompts about
 configuration file changes.
 .
 This script is the backend for the APT::Periodic::Unattended-Upgrade
 option.

N: There are 4 additional records. Please use the '-a' switch to see them.

os info: 4.15.0-1113-azure #126~16.04.1-Ubuntu SMP Tue Apr 13 16:55:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

eMPee584 commented 1 year ago

When it is 'stuck', it probably is downloading all the updates. It will not proceed before all packages are acquired, which can also cause other issues (#320).. Please check whether apt is downloading stuff f.e. with the nethogs utility or through checking for apt download helper processes being invoked with watch -d -n 0.2 -- pgrep -laf "^/usr/lib/apt/methods" ...