This bug was fixed in the package unattended-upgrades - 1.1ubuntu1.18.04.1 --------------- unattended-upgrades (1.1ubuntu1.18.04.1) bionic; urgency=medium
[ Michael Vogt ] * unattended-upgrades: fix Unlocked context manager. (LP: #1602536) The Unlocked context manager did correctly unlock but did not reacquire the lock which means that in minimal-upgrade step mode it is possible to run apt code without a lock. If something else (like landscape, apt, synaptic, packagekit) locks the cache in the meantime this will work and u-u will get dpkg errors because dpkg will not be able to perform its operations. It is less of an issue in non-minimal mode, but even then the auto-remove step may fail in this way. [ Balint Reczey ] * Fix adjusting candidates (LP: #1775292) * Relock apt lock before reopening the cache (LP: #1602536) * Fix crashing while adjusting candidates and save candidates to adjust only in first sweep run, not emptying the set later (Closes: #901258) (LP: #1775307) -- Balint Reczey <rbal...@ubuntu.com> Wed, 06 Jun 2018 16:30:55 -0700 ** Changed in: unattended-upgrades (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of नेपाली भाषा समायोजकहरुको समूह, which is subscribed to Xenial. Matching subscriptions: Ubuntu 16.04 Bugs https://bugs.launchpad.net/bugs/1602536 Title: /usr/bin/unattended-upgrade:apt.cache.LockFailedException:/usr/bin /unattended- upgrade@1468:main:do_auto_remove:cache_commit:commit:_fetch_archives Status in python-apt package in Ubuntu: Fix Committed Status in unattended-upgrades package in Ubuntu: Fix Released Status in python-apt source package in Xenial: New Status in unattended-upgrades source package in Xenial: New Status in python-apt source package in Bionic: New Status in unattended-upgrades source package in Bionic: Fix Released Bug description: [Impact] * Unattended-upgrades fails to autoremove packages after installing updates or fails to install updates due to a parallel process acquiring apt or dpkg lock while u-u is running. [Test Case] * Set up a system with packages (> 30) to be upgraded. In case of Bionic -security has a low number of updates, thus set up the system to install -updates to have more packages for u-u to upgrade: echo 'Unattended-Upgrade::Allowed-Origins:: "${distro_id}:${distro_codename}-updates";' > /etc/apt/apt.conf.d/51-updates * Set up two shells to run commands in parallel * In shell "A" run sudo apt update && sudo unattended-upgrade --dry-run --verbose --debug * After u-u started run the following command in shell "B": while sleep 1; do python3 -c 'import apt; import apt_pkg; print(apt_pkg.pkgsystem_lock())' ; done * Observe the following exception repeated while running u-u and True being printed after u-u is finished: ... Traceback (most recent call last): File "<string>", line 1, in <module> apt_pkg.Error: E:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable), E:Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? Traceback (most recent call last): File "<string>", line 1, in <module> apt_pkg.Error: E:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable), E:Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? True Traceback (most recent call last): File "<string>", line 1, in <module> apt_pkg.Error: E:Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable), E:Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? True True True True ... [Regression Potential WIP] * Unattended-upgrade may crash [Other Info] It looks like python-apt also releases the lock sometimes unexpectedly thus the both packages need to be fixed to avoid loosing the lock. [Original Bug Text] The Ubuntu Error Tracker has been receiving reports about a problem regarding unattended-upgrades. This problem was most recently seen with version 0.90, the problem page at https://errors.ubuntu.com/problem/19f99745d7dce5aea118eb31bfffcbdcdf238c4f contains more details. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1602536/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~group.of.nepali.translators Post to : group.of.nepali.translators@lists.launchpad.net Unsubscribe : https://launchpad.net/~group.of.nepali.translators More help : https://help.launchpad.net/ListHelp