unattended-upgrade might enter an infinite loop if an upgradable package is on hold
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray |
Bug Description
If a package is upgradable but it is set on hold, unattende-upgrade might enter a infinite 100% CPU loop.
From the log:
2014-01-03 07:19:06,777 INFO Initial blacklisted packages: mysql-server mysql-server-5.1 mysql-server-5.5 mysql-server-
2014-01-03 07:19:06,777 INFO Starting unattended upgrades script
2014-01-03 07:19:06,778 INFO Allowed origins are: ['o=Ubuntu,
2014-01-03 07:19:09,694 INFO Initial blacklisted packages: mysql-server mysql-server-5.1 mysql-server-5.5 mysql-server-
2014-01-03 07:19:09,694 INFO Starting unattended upgrades script
2014-01-03 07:19:09,695 INFO Allowed origins are: ['o=Ubuntu,
2014-01-03 07:19:11,359 DEBUG Checking: curl (["<Origin component:'main' archive:
archive:
2014-01-03 07:19:11,403 DEBUG pkg 'curl' is on hold
2014-01-03 07:19:11,403 DEBUG sanity check failed
2014-01-03 07:19:12,318 DEBUG Checking: libcurl3 (["<Origin component:'main' archive:
in' archive:
2014-01-03 07:19:12,934 DEBUG Checking: libcurl3-gnutls (["<Origin component:'main' archive:
2014-01-03 07:19:13,134 DEBUG pkg 'libcurl3-gnutls' is on hold
2014-01-03 07:19:13,134 DEBUG sanity check failed
2014-01-03 07:19:14,295 DEBUG pkgs that look like they should be upgraded: libcurl3
2014-01-03 07:19:14,328 DEBUG blacklist: ['mysql-server', 'mysql-server-5.1', 'mysql-server-5.5', 'mysql-
2014-01-03 07:19:15,102 DEBUG Checking (blacklist): libcurl3
2014-01-03 07:19:16,323 INFO Packages that are auto removed: ''
2014-01-03 07:19:16,323 DEBUG InstCount=0 DelCount=0 BrokenCout=0
2014-01-03 07:19:16,323 INFO Packages that are upgraded: libcurl3
2014-01-03 07:19:16,324 INFO Writing dpkg log to '/var/log/
2014-01-03 07:19:16,350 DEBUG found partition of size 0 ([])
2014-01-03 07:19:17,118 DEBUG applying set []
2014-01-03 07:19:24,010 DEBUG left to upgrade set(['libcurl3'])
2014-01-03 07:19:24,037 DEBUG found partition of size 0 ([])
2014-01-03 07:19:24,891 DEBUG applying set []
2014-01-03 07:19:32,046 DEBUG left to upgrade set(['libcurl3'])
2014-01-03 07:19:32,080 DEBUG found partition of size 0 ([])
2014-01-03 07:19:32,939 DEBUG applying set []
2014-01-03 07:19:39,982 DEBUG left to upgrade set(['libcurl3'])
2014-01-03 07:19:40,017 DEBUG found partition of size 0 ([])
2014-01-03 07:19:40,893 DEBUG applying set []
2014-01-03 07:19:48,116 DEBUG left to upgrade set(['libcurl3'])
2014-01-03 07:19:48,149 DEBUG found partition of size 0 ([])
2014-01-03 07:19:49,002 DEBUG applying set []
2014-01-03 07:19:55,605 DEBUG left to upgrade set(['libcurl3'])
2014-01-03 07:19:55,639 DEBUG found partition of size 0 ([])
This patch seems to fix the issue:
--- /tmp/unattended
+++ /usr/bin/
@@ -297,6 +297,8 @@
else:
+ if not changes:
+ continue
if len(changes) == 1:
ubuntu-bug report:
ProblemType: Bug
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Fri Jan 3 07:40:10 2014
Dependencies:
apt 0.8.16~exp12+ll2 [origin: <myrepo>.com]
apt-utils 0.8.16~exp12+ll2 [origin: <myrepo>.com]
coreutils 8.13-3ubuntu3.2
debconf 1.5.42ubuntu1
dpkg 1.16.1.2ubuntu7.2
gcc-4.6-base 4.6.3-1ubuntu5
gnupg 1.4.11-3ubuntu2.5 [modified: usr/lib/
gpgv 1.4.11-3ubuntu2.5
libacl1 2.2.51-5ubuntu1
libapt-inst1.4 0.8.16~exp12+ll2 [origin: <myrepo>.com]
libapt-pkg4.12 0.8.16~exp12+ll2 [origin: <myrepo>.com]
libattr1 1:2.4.46-5ubuntu1
libbz2-1.0 1.0.6-1
libc-bin 2.15-0ubuntu10.5
libc6 2.15-0ubuntu10.5
libdb5.1 5.1.25-11build1
libexpat1 2.0.1-7.2ubuntu1.1
libgcc1 1:4.6.3-1ubuntu5
liblzma5 5.1.1alpha+
libncursesw5 5.9-4
libreadline6 6.2-8
libselinux1 2.1.0-4.1ubuntu1
libsqlite3-0 3.7.9-2ubuntu1.1
libssl1.0.0 1.0.1-4ubuntu5.10
libstdc++6 4.6.3-1ubuntu5
libtinfo5 5.9-4
libusb-0.1-4 2:0.1.12-20
lsb-release 4.0-0ubuntu20.3
mime-support 3.51-1ubuntu1
multiarch-support 2.15-0ubuntu10.5
perl-base 5.14.2-6ubuntu2.3
python 2.7.3-0ubuntu2.2
python-apt 0.8.3ubuntu7.1
python-apt-common 0.8.3ubuntu7.1
python-minimal 2.7.3-0ubuntu2.2
python2.7 2.7.3-0ubuntu3.4
python2.7-minimal 2.7.3-0ubuntu3.4
readline-common 6.2-8
tar 1.26-4ubuntu1
tzdata 2013g-0ubuntu0.
ubuntu-keyring 2011.11.21.1
ucf 3.0025+nmu2ubuntu1
xz-utils 5.1.1alpha+
zlib1g 1:1.2.3.
DistroRelease: Ubuntu 12.04
MarkForUpload: True
Package: unattended-upgrades 0.76ubuntu1 [modified: usr/bin/
PackageArchitec
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcVersionSign
SourcePackage: unattended-upgrades
Tags: third-party-
Uname: Linux 3.2.0-48-virtual x86_64
UpgradeStatus: Upgraded to precise on 2013-06-28 (189 days ago)
modified.
// Automatically upgrade packages from these (origin:archive) pairs
Unattended-
"${distro_
// "${distro_
// "${distro_
// "${distro_
};
// List of packages to not update
Unattended-
// "vim";
// "libc6";
// "libc6-dev";
// "libc6-i686";
};
// This option allows you to control if on a unclean dpkg exit
// unattended-upgrades will automatically run
// dpkg --force-confold --configure -a
// The default is true, to ensure updates keep getting installed
Unattended-
// Split the upgrade into the smallest possible chunks so that
// they can be interrupted with SIGUSR1. This makes the upgrade
// a bit slower but it has the benefit that shutdown while a upgrade
// is running is possible (with a small delay)
Unattended-
// Install all unattended-upgrades when the machine is shuting down
// instead of doing it in the background while the machine is running
// This will (obviously) make shutdown slower
Unattended-
// Send email to this address for problems or packages upgrades
// If empty or unset then no email is sent, make sure that you
// have a working mail setup on your system. A package that provides
// 'mailx' must be installed.
Unattended-
// Set this value to "true" to get emails only on errors. Default
// is to always send a mail if Unattended-
Unattended-
// Do automatic removal of new unused dependencies after the upgrade
// (equivalent to apt-get autoremove)
Unattended-
// Automatically reboot *WITHOUT CONFIRMATION* if a
// the file /var/run/
Unattended-
// Use apt bandwidth limit feature, this example limits the download
// speed to 70kb/sec
//Acquire:
mtime.conffile.
Related branches
- Michael Vogt: Approve
- unattended-upgrades-developers: Pending requested
-
Diff: 38 lines (+12/-1)2 files modifieddebian/changelog (+8/-0)
unattended-upgrade (+4/-1)
Changed in unattended-upgrades (Ubuntu): | |
status: | Incomplete → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in unattended-upgrades (Ubuntu): | |
status: | Triaged → Fix Committed |
The attachment "unattende- upgrade. patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]