Package: unattended-upgrades
Severity: important

Dear Maintainer,

While I do understand the importance of having upgrades being
installed automatically to keep the system updated, unatended-upgrades
is blocking my own attempts to upgrade, install or remove packages.

Its process runs automatically, so more often than not, when I try to
do any of the mentioned tasks I'm confronted with the following
message:

mosca: /home/fmneto#> sudo apt upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource 
temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is 
another process using it?

Taking a careful look, the following processes are running that are
using those locks:

mosca: /home/fmneto#> ps aux | grep apt
root      7209  0.0  0.0   2388   756 ?        Ss   08:24   0:00 /bin/sh 
/usr/lib/apt/apt.systemd.daily install
root      7221  0.0  0.0   2388  1520 ?        S    08:24   0:00 /bin/sh 
/usr/lib/apt/apt.systemd.daily lock_is_held install
fmneto   10803  0.0  0.0   6076   824 pts/0    S+   08:28   0:00 grep apt

I take two issues with this.

1. Although the task being run is listed as "daily", this lock is in
place no matter what the time I try to run apt.
2. Because of this I need to kill those processes and remove the locks
in order to be able to actually perform the tasks I need
(e.g. install/remove packages)

As I said before, I completely understand the necessity and usefulness
of having unattended upgrades, but as of now I prefer to remove the
package and upgrade my system manually. This way at least I can
install packages when I actually need to.

I propose that some kind of countermeasure is implemented in dpkg,
making it possible for the processes related to unattended upgrades to
abort their actions and release the locks when it detects that dpkg is
trying to perform some task that was started by the user. 

Best regards,
Francisco

-- System Information:
Debian Release: 10.0
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.28-flycap (SMP w/4 CPU cores)
Kernel taint flags: TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.utf8), LANGUAGE=en_US.utf8 (charmap=UTF-8) (ignored: LC_ALL set to 
en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages unattended-upgrades depends on:
ii  apt                    1.8.2
ii  apt-utils              1.8.2
ii  debconf [debconf-2.0]  1.5.71
ii  init-system-helpers    1.56+nmu1
ii  lsb-base               10.2019051400
ii  lsb-release            10.2019051400
ii  python3                3.7.3-1
ii  python3-apt            1.8.4
ii  python3-dbus           1.2.8-3
ii  python3-distro-info    0.21
ii  ucf                    3.0038+nmu1
ii  xz-utils               5.2.4-1

Versions of packages unattended-upgrades recommends:
ii  anacron             2.3-28
ii  cron [cron-daemon]  3.0pl1-134
ii  systemd-sysv        241-5

Versions of packages unattended-upgrades suggests:
pn  bsd-mailx                                  <none>
ii  exim4-daemon-light [mail-transport-agent]  4.92-8
pn  needrestart                                <none>
pn  powermgmt-base                             <none>
ii  python3-gi                                 3.30.4-1

Reply via email to