/usr/bin/unattended-upgrade:apt.cache.LockFailedException:/usr/bin/unattended-upgrade@1468:main:do_auto_remove:cache_commit:commit:_fetch_archives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unattended-upgrades (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
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-
* 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_
* 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-
Changed in unattended-upgrades (Ubuntu): | |
importance: | Undecided → High |
Changed in unattended-upgrades (Ubuntu): | |
status: | New → Confirmed |
description: | updated |
Changed in python-apt (Ubuntu): | |
status: | New → Fix Committed |
no longer affects: | python-apt (Ubuntu Bionic) |
no longer affects: | python-apt (Ubuntu Xenial) |
no longer affects: | python-apt (Ubuntu) |
Apparently this is the hottest crash in Ubuntu for the past year... /errors. ubuntu. com/?period= year
https:/