[Aptitude-devel] Bug#933335: dpkg: error: dpkg frontend lock is locked by another process

Guillem Jover guillem at debian.org
Mon Jul 29 17:55:54 BST 2019


Control: reassign -1 aptitude
Control: severity -1 important
Control: retitle -1 aptitude: Please add support for dpkg frontend lock

Hi!

On Mon, 2019-07-29 at 13:47:05 +0200, Vincent Lefevre wrote:
> Package: dpkg
> Version: 1.19.7
> Severity: serious

> I wanted to upgrade with aptitude, but it failed with the error
> "dpkg: error: dpkg frontend lock is locked by another process".

This is a problem with aptitude, which I'm told has not been modified
to make use of the new frontend locks, so it suffers from the
historical race conditions when more than one frontend are running
concurrently. I've lowered the severity due to this.

I'm leaving all report for context.

> In the terminal:
> 
> Performing actions...
> Retrieving bug reports... Done
> Parsing Found/Fixed information... Done
> Retrieving bug reports... Done
> Parsing Found/Fixed information... Done
> Reading changelogs... Done
> apt-listchanges: Do you want to continue? [Y/n] 
> Extracting templates from packages: 100%
> Preconfiguring packages ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../bsdutils_1%3a2.34-0.1_amd64.deb ...
> Unpacking bsdutils (1:2.34-0.1) over (1:2.33.1-0.1) ...
> Setting up bsdutils (1:2.34-0.1) ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../0-uuid-dev_2.34-0.1_amd64.deb ...
> Unpacking uuid-dev:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../1-libuuid1_2.34-0.1_amd64.deb ...
> De-configuring libuuid1:i386 (2.33.1-0.1) ...
> Unpacking libuuid1:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../2-libuuid1_2.34-0.1_i386.deb ...
> Unpacking libuuid1:i386 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../3-libblkid-dev_2.34-0.1_amd64.deb ...
> Unpacking libblkid-dev:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../4-libblkid1_2.34-0.1_i386.deb ...
> De-configuring libblkid1:amd64 (2.33.1-0.1) ...
> Unpacking libblkid1:i386 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../5-libblkid1_2.34-0.1_amd64.deb ...
> Unpacking libblkid1:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Setting up libblkid1:amd64 (2.34-0.1) ...
> Setting up libblkid1:i386 (2.34-0.1) ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../libmount-dev_2.34-0.1_amd64.deb ...
> Unpacking libmount-dev:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../libmount1_2.34-0.1_amd64.deb ...
> De-configuring libmount1:i386 (2.33.1-0.1) ...
> Unpacking libmount1:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../libmount1_2.34-0.1_i386.deb ...
> Unpacking libmount1:i386 (2.34-0.1) over (2.33.1-0.1) ...
> Preparing to unpack .../libsmartcols1_2.34-0.1_amd64.deb ...
> Unpacking libsmartcols1:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Setting up libsmartcols1:amd64 (2.34-0.1) ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../libfdisk1_2.34-0.1_amd64.deb ...
> Unpacking libfdisk1:amd64 (2.34-0.1) over (2.33.1-0.1) ...
> Setting up libuuid1:amd64 (2.34-0.1) ...
> Setting up libuuid1:i386 (2.34-0.1) ...
> Setting up libfdisk1:amd64 (2.34-0.1) ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../fdisk_2.34-0.1_amd64.deb ...
> Unpacking fdisk (2.34-0.1) over (2.33.1-0.1) ...
> Setting up libmount1:amd64 (2.34-0.1) ...
> Setting up libmount1:i386 (2.34-0.1) ...
> Setting up fdisk (2.34-0.1) ...
> (Reading database ... 588715 files and directories currently installed.)
> Preparing to unpack .../util-linux_2.34-0.1_amd64.deb ...
> Unpacking util-linux (2.34-0.1) over (2.33.1-0.1) ...
> dpkg: error: dpkg frontend lock is locked by another process
> ======  How can you help?  (doc: https://wiki.debian.org/how-can-i-help ) ======
> 
> New bugs where assistance is requested (tagged 'help'):
>  - bsdutils - https://bugs.debian.org/198559 - script should set an environment variable that shells can use
>  - bsdutils - https://bugs.debian.org/254199 - /usr/bin/script: please consider setting an envvar
>  - mount - https://bugs.debian.org/863373 - mount: option to use losetup -P when mounting
>  - mount - https://bugs.debian.org/870364 - say "... is already mounted rw elsewhere. Cannot mount ro."
>  - mount - https://bugs.debian.org/907536 - Update fstab template & docs to mention systemctl daemon-reload
> 
> -----  Show old opportunities as well as new ones: how-can-i-help --old  -----
> E: Sub-process /usr/bin/dpkg returned an error code (2)
> Setting up uuid-dev:amd64 (2.34-0.1) ...
> Setting up util-linux (2.34-0.1) ...
> Setting up libblkid-dev:amd64 (2.34-0.1) ...
> Setting up libmount-dev:amd64 (2.34-0.1) ...
> Processing triggers for libc-bin (2.28-10) ...
> Processing triggers for systemd (241-7) ...
> Processing triggers for man-db (2.8.5-2) ...
> Processing triggers for mime-support (3.62) ...
> Press Return to continue, 'q' followed by Return to quit.
> 
> Note: I was not using dpkg/aptitude/... in another terminal.
> 
> /var/log/dpkg.log shows:
> 
> [...]
> 2019-07-29 13:19:11 upgrade util-linux:amd64 2.33.1-0.1 2.34-0.1
> 2019-07-29 13:19:11 status half-configured util-linux:amd64 2.33.1-0.1
> 2019-07-29 13:19:11 status unpacked util-linux:amd64 2.33.1-0.1
> 2019-07-29 13:19:11 status half-installed util-linux:amd64 2.33.1-0.1
> 2019-07-29 13:19:11 status triggers-pending systemd:amd64 241-7
> 2019-07-29 13:19:11 status triggers-pending mime-support:all 3.62
> 2019-07-29 13:19:12 status unpacked util-linux:amd64 2.34-0.1
> 2019-07-29 13:19:15 startup packages configure
> 2019-07-29 13:19:15 configure uuid-dev:amd64 2.34-0.1 <none>
> [...]
> 
> Thus the error occurred around 13:19:12 (BTW, error messages should
> include the date/time).
> 
> In "journalctl -b" logs, I can see:
> 
> Jul 29 13:19:12 cventin systemd[1]: Reloading.
> Jul 29 13:19:12 cventin systemd[1]: Starting Daily apt download activities...
> Jul 29 13:19:13 cventin systemd[1]: apt-daily.service: Succeeded.
> Jul 29 13:19:13 cventin systemd[1]: Started Daily apt download activities.
> Jul 29 13:19:15 cventin systemd[1]: Reloading.
> Jul 29 13:19:15 cventin systemd[1]: Reloading.
> Jul 29 13:19:16 cventin systemd[1]: Reloading.
> 
> I can see other "Starting Daily apt download activities...", and
> another one also occurred just before "startup packages configure":
> 
> Jul 23 10:19:45 cventin systemd[1]: Starting Daily apt download activities...
> 
> 2019-07-23 10:19:46 startup packages configure
> 
> So I would say that this is not just random.
> 
> In any case, the lock should start at the beginning of the upgrade
> so that the upgrade cannot be interrupted.
> 
> -- Package-specific info:
> 
> -- System Information:
> Debian Release: bullseye/sid
>   APT prefers unstable-debug
>   APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 4.19.0-5-amd64 (SMP w/12 CPU cores)
> Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
> Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=POSIX (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> LSM: AppArmor: enabled
> 
> Versions of packages dpkg depends on:
> ii  libbz2-1.0   1.0.6-9.2
> ii  libc6        2.28-10
> ii  liblzma5     5.2.4-1
> ii  libselinux1  2.9-2
> ii  tar          1.30+dfsg-6
> ii  zlib1g       1:1.2.11.dfsg-1
> 
> dpkg recommends no packages.
> 
> Versions of packages dpkg suggests:
> ii  apt            1.8.2
> pn  debsig-verify  <none>
> 
> -- no debconf information

Thanks,
Guillem



More information about the Aptitude-devel mailing list