Tested with 0.90ubuntu0.10 (not fixed) and 1.1ubuntu1.18.04.7~16.04.1 (fixed):
With the not fixed version the lock is lost by u-u, while u-u kept running:
...
SystemError: 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?
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 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?
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 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?
True
True
True
True
True
True
True
True
True
True
...
With the fixed version but keeping unfixed python-apt the lock is still lost by u-u, but u-u crashes. This is expected and is safer than the unfixed behaviour:
...
conffile line: /etc/rsyslog.d/21-cloudinit.conf d4cf2e5d3cb9914cf7e6cdc08d298339
current md5: d4cf2e5d3cb9914cf7e6cdc08d298339
blacklist: []
whitelist: []
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: cloud-init curl kmod libc-bin libc6 libcurl3-gnutls libkmod2 locales multiarch-support python-apt-common python3-apt snapd ubuntu-core-launcher
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
applying set ['python-apt-common']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/python-apt-common_1.1.0~beta1ubuntu0.16.04.3_all.deb
/usr/bin/dpkg --status-fd 11 --configure python-apt-common:all
/usr/bin/dpkg --status-fd 13 --configure --pending
Exception happened during upgrade.
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 374, in __exit__
apt_pkg.pkgsystem_lock_inner()
AttributeError: module 'apt_pkg' has no attribute 'pkgsystem_lock_inner'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/unattended-upgrade", line 558, in cache_commit
res = cache.commit(install_progress=iprogress)
File "/usr/bin/unattended-upgrade", line 376, in __exit__
apt_pkg.pkgsystem_lock()
SystemError: 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?
Exception happened during upgrade.
NoneType
Installing the upgrades failed!
error message: 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?
dpkg returned a error! See /var/log/unattended-upgrades/unattended-upgrades-dpkg.log for details
InstCount=0 DelCount=0 BrokenCount=0
root@x-uu:~#
With both u-u and python-apt fixed u-u keeps the lock for the whole run:
...
SystemError: 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?
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 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?
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 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?
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: 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?
True
True
...
...
Writing dpkg log to /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
applying set ['python-apt-common']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/python-apt-common_1.1.0~beta1ubuntu0.16.04.3_all.deb
/usr/bin/dpkg --status-fd 11 --configure python-apt-common:all
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libc-bin', 'libcurl3-gnutls', 'libkmod2', 'curl', 'libc6', 'ubuntu-core-launcher', 'multiarch-support', 'snapd', 'locales', 'kmod', 'cloud-init'}
applying set ['libc-bin']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/libc-bin_2.23-0ubuntu11_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure libc-bin:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'libc6', 'ubuntu-core-launcher', 'multiarch-support', 'kmod', 'locales', 'snapd', 'cloud-init'}
applying set ['libc6']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/libc6_2.23-0ubuntu11_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure libc6:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-core-launcher', 'multiarch-support', 'snapd', 'locales', 'kmod', 'cloud-init'}
applying set ['multiarch-support']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/multiarch-support_2.23-0ubuntu11_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure multiarch-support:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-core-launcher', 'kmod', 'locales', 'snapd', 'cloud-init'}
applying set ['locales']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/locales_2.23-0ubuntu11_all.deb
/usr/bin/dpkg --status-fd 11 --configure locales:all
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-core-launcher', 'snapd', 'kmod', 'cloud-init'}
applying set ['cloud-init']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/cloud-init_18.5-21-g8ee294d5-0ubuntu1~16.04.1_all.deb
/usr/bin/dpkg --status-fd 11 --configure cloud-init:all
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-core-launcher', 'snapd', 'kmod'}
applying set ['snapd', 'ubuntu-core-launcher']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/ubuntu-core-launcher_2.37.1_amd64.deb /var/cache/apt/archives/snapd_2.37.1_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure snapd:amd64 ubuntu-core-launcher:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libkmod2', 'curl', 'kmod', 'libcurl3-gnutls'}
applying set ['libkmod2', 'kmod']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/kmod_22-1ubuntu5.2_amd64.deb /var/cache/apt/archives/libkmod2_22-1ubuntu5.2_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure libkmod2:amd64 kmod:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'curl', 'libcurl3-gnutls'}
applying set ['curl', 'libcurl3-gnutls']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/apt/archives/curl_7.47.0-1ubuntu2.12_amd64.deb /var/cache/apt/archives/libcurl3-gnutls_7.47.0-1ubuntu2.12_amd64.deb
/usr/bin/dpkg --status-fd 11 --configure libcurl3-gnutls:amd64 curl:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade set()
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0
root@x-uu:~#
Tested with 0.90ubuntu0.10 (not fixed) and 1.1ubuntu1. 18.04.7~ 16.04.1 (fixed):
With the not fixed version the lock is lost by u-u, while u-u kept running: 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? 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? 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?
...
SystemError: E:Could not get lock /var/lib/
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: E:Could not get lock /var/lib/
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: E:Could not get lock /var/lib/
True
True
True
True
True
True
True
True
True
True
...
With the fixed version but keeping unfixed python-apt the lock is still lost by u-u, but u-u crashes. This is expected and is safer than the unfixed behaviour: d/21-cloudinit. conf d4cf2e5d3cb9914 cf7e6cdc08d2983 39 cf7e6cdc08d2983 39 core-launcher unattended- upgrades/ unattended- upgrades- dpkg.log apt-common' ] apt/archives/ python- apt-common_ 1.1.0~beta1ubun tu0.16. 04.3_all. deb apt-common: all unattended- upgrade" , line 374, in __exit__ pkg.pkgsystem_ lock_inner( ) lock_inner'
...
conffile line: /etc/rsyslog.
current md5: d4cf2e5d3cb9914
blacklist: []
whitelist: []
Option --dry-run given, *not* performing real actions
Packages that will be upgraded: cloud-init curl kmod libc-bin libc6 libcurl3-gnutls libkmod2 locales multiarch-support python-apt-common python3-apt snapd ubuntu-
Writing dpkg log to /var/log/
applying set ['python-
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure python-
/usr/bin/dpkg --status-fd 13 --configure --pending
Exception happened during upgrade.
Traceback (most recent call last):
File "/usr/bin/
apt_
AttributeError: module 'apt_pkg' has no attribute 'pkgsystem_
During handling of the above exception, another exception occurred:
Traceback (most recent call last): unattended- upgrade" , line 558, in cache_commit install_ progress= iprogress) unattended- upgrade" , line 376, in __exit__ pkg.pkgsystem_ lock() 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? 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? unattended- upgrades/ unattended- upgrades- dpkg.log for details
File "/usr/bin/
res = cache.commit(
File "/usr/bin/
apt_
SystemError: E:Could not get lock /var/lib/
Exception happened during upgrade.
NoneType
Installing the upgrades failed!
error message: E:Could not get lock /var/lib/
dpkg returned a error! See /var/log/
InstCount=0 DelCount=0 BrokenCount=0
root@x-uu:~#
With both u-u and python-apt fixed u-u keeps the lock for the whole run: 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? 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? 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?
...
SystemError: E:Could not get lock /var/lib/
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: E:Could not get lock /var/lib/
Traceback (most recent call last):
File "<string>", line 1, in <module>
SystemError: E:Could not get lock /var/lib/
Traceback (most recent call last): 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?
File "<string>", line 1, in <module>
SystemError: E:Could not get lock /var/lib/
True
True
...
... unattended- upgrades/ unattended- upgrades- dpkg.log apt-common' ] apt/archives/ python- apt-common_ 1.1.0~beta1ubun tu0.16. 04.3_all. deb apt-common: all core-launcher' , 'multiarch- support' , 'snapd', 'locales', 'kmod', 'cloud-init'} apt/archives/ libc-bin_ 2.23-0ubuntu11_ amd64.deb core-launcher' , 'multiarch- support' , 'kmod', 'locales', 'snapd', 'cloud-init'} apt/archives/ libc6_2. 23-0ubuntu11_ amd64.deb core-launcher' , 'multiarch- support' , 'snapd', 'locales', 'kmod', 'cloud-init'} support' ] apt/archives/ multiarch- support_ 2.23-0ubuntu11_ amd64.deb support: amd64 core-launcher' , 'kmod', 'locales', 'snapd', 'cloud-init'} apt/archives/ locales_ 2.23-0ubuntu11_ all.deb core-launcher' , 'snapd', 'kmod', 'cloud-init'} apt/archives/ cloud-init_ 18.5-21- g8ee294d5- 0ubuntu1~ 16.04.1_ all.deb core-launcher' , 'snapd', 'kmod'} core-launcher' ] apt/archives/ ubuntu- core-launcher_ 2.37.1_ amd64.deb /var/cache/ apt/archives/ snapd_2. 37.1_amd64. deb core-launcher: amd64 apt/archives/ kmod_22- 1ubuntu5. 2_amd64. deb /var/cache/ apt/archives/ libkmod2_ 22-1ubuntu5. 2_amd64. deb apt/archives/ curl_7. 47.0-1ubuntu2. 12_amd64. deb /var/cache/ apt/archives/ libcurl3- gnutls_ 7.47.0- 1ubuntu2. 12_amd64. deb gnutls: amd64 curl:amd64
Writing dpkg log to /var/log/
applying set ['python-
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure python-
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libc-bin', 'libcurl3-gnutls', 'libkmod2', 'curl', 'libc6', 'ubuntu-
applying set ['libc-bin']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure libc-bin:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'libc6', 'ubuntu-
applying set ['libc6']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure libc6:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-
applying set ['multiarch-
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure multiarch-
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-
applying set ['locales']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure locales:all
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-
applying set ['cloud-init']
Preconfiguring packages ...
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure cloud-init:all
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libcurl3-gnutls', 'libkmod2', 'curl', 'ubuntu-
applying set ['snapd', 'ubuntu-
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure snapd:amd64 ubuntu-
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'libkmod2', 'curl', 'kmod', 'libcurl3-gnutls'}
applying set ['libkmod2', 'kmod']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure libkmod2:amd64 kmod:amd64
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade {'curl', 'libcurl3-gnutls'}
applying set ['curl', 'libcurl3-gnutls']
/usr/bin/dpkg --status-fd 9 --unpack --auto-deconfigure /var/cache/
/usr/bin/dpkg --status-fd 11 --configure libcurl3-
/usr/bin/dpkg --status-fd 13 --configure --pending
left to upgrade set()
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0
root@x-uu:~#