sanity check can fail for packages missing dependencies

Bug #1654070 reported by Brian Murray
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unattended-upgrades (Ubuntu)
Fix Released
Medium
Brian Murray
Xenial
Fix Released
Undecided
Unassigned

Bug Description

I've been getting mail for days about pulseaudio-module-gconf and -module-zeroconf being upgraded, come to find out its not really happening.

bdmurray@flash:~$ sudo /usr/bin/unattended-upgrade --debug --verbose
Initial blacklisted packages: nvidia-304
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,a=xenial', 'o=Ubuntu,a=xenial-security', 'o=Ubuntu,a=xenial-updates']
Checking: pulseaudio-module-gconf ([<Origin component:'universe' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'192.168.10.7' isTrusted:True>])
Checking: pulseaudio-module-zeroconf ([<Origin component:'universe' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'192.168.10.7' isTrusted:True>])
pkgs that look like they should be upgraded: pulseaudio-module-gconf
pulseaudio-module-zeroconf
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: ['nvidia-304']
whitelist: []
Checking the black and whitelist: pulseaudio-module-gconf
Checking the black and whitelist: pulseaudio-module-zeroconf
Packages that will be upgraded: pulseaudio-module-gconf pulseaudio-module-zeroconf
Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
All upgrades installed
InstCount=0 DelCount=0 BrokenCount=0
Extracting content from '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log' since '2017-01-04 12:27:12'
Sending mail to '<email address hidden>'
mail returned: 0
bdmurray@flash:~$ apt-cache policy pulseaudio-module-gconf
pulseaudio-module-gconf:
  Installed: 1:8.0-0ubuntu3
  Candidate: 1:8.0-0ubuntu3.1
  Version table:
     1:8.0-0ubuntu3.1 500
        500 http://192.168.10.7/ubuntu xenial-updates/universe amd64 Packages
 *** 1:8.0-0ubuntu3 500
        500 http://192.168.10.7/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Brian Murray (brian-murray) wrote :

This still happens with the Zesty version of unattended-upgrades on Xenial so bears further investigation.

tags: added: xenial zesty
Revision history for this message
Brian Murray (brian-murray) wrote :

Ah, running with --apt-debug is more informative.

bdmurray@flash:~$ sudo /usr/bin/unattended-upgrade -v --apt-debug
Initial blacklisted packages: nvidia-304
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: ['o=Ubuntu,a=xenial', 'o=Ubuntu,a=xenial-security', 'o=Ubuntu,a=xenial-updates']
  pulseaudio-module-gconf:amd64 Depends on libpulse0 [ amd64 ] < 1:8.0-0ubuntu3 > ( libs ) (= 1:8.0-0ubuntu3.1) can't be satisfied!
  pulseaudio-module-zeroconf:amd64 Depends on libpulse0 [ amd64 ] < 1:8.0-0ubuntu3 > ( libs ) (= 1:8.0-0ubuntu3.1) can't be satisfied!
  pulseaudio-module-gconf:amd64 Depends on libpulse0 [ amd64 ] < 1:8.0-0ubuntu3 > ( libs ) (= 1:8.0-0ubuntu3.1) can't be satisfied!
  pulseaudio-module-zeroconf:amd64 Depends on libpulse0 [ amd64 ] < 1:8.0-0ubuntu3 > ( libs ) (= 1:8.0-0ubuntu3.1) can't be satisfied!
Packages that will be upgraded: pulseaudio-module-gconf pulseaudio-module-zeroconf
Writing dpkg log to '/var/log/unattended-upgrades/unattended-upgrades-dpkg.log'
All upgrades installed

If the dependencies can't be satisfied we shouldn't say that the package will be upgraded.

Revision history for this message
Brian Murray (brian-murray) wrote :

For some reason on this particular system libpulse0 from xenial-updates isn't found.

bdmurray@flash:~$ apt-cache policy libpulse0
libpulse0:
  Installed: 1:8.0-0ubuntu3
  Candidate: 1:8.0-0ubuntu3
  Version table:
 *** 1:8.0-0ubuntu3 500
        500 http://192.168.10.7/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Although the gconf module update is found.

bdmurray@flash:~$ apt-cache policy pulseaudio-module-gconf
pulseaudio-module-gconf:
  Installed: 1:8.0-0ubuntu3
  Candidate: 1:8.0-0ubuntu3.1
  Version table:
     1:8.0-0ubuntu3.1 500
        500 http://192.168.10.7/ubuntu xenial-updates/universe amd64 Packages
 *** 1:8.0-0ubuntu3 500
        500 http://192.168.10.7/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

Another system using the same mirror is fine.

 $ apt-cache policy libpulse0
libpulse0:
  Installed: 1:8.0-0ubuntu3.1
  Candidate: 1:8.0-0ubuntu3.1
  Version table:
 *** 1:8.0-0ubuntu3.1 500
        500 http://192.168.10.7/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1:8.0-0ubuntu3 500
        500 http://192.168.10.7/ubuntu xenial/main amd64 Packages

summary: - lies about upgrading pulseaudio-module-gconf
+ sanity check can fail for packages missing dependencies
Changed in unattended-upgrades (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Brian Murray (brian-murray) wrote :

Emails from unattended-upgrades are saner now with my patch:

Packages that were upgraded:
 libnss3 libnss3-nssdb
Packages with upgradable origin but kept back:
 pulseaudio-module-gconf pulseaudio-module-zeroconf

As opposed to:

Packages that were upgraded:
 libnss3 libnss3-nssdb pulseaudio-module-gconf
 pulseaudio-module-zeroconf

And then the pulseaudio packages not being installed.

Changed in unattended-upgrades (Ubuntu):
milestone: none → ubuntu-17.03
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unattended-upgrades - 0.93.1ubuntu1

---------------
unattended-upgrades (0.93.1ubuntu1) zesty; urgency=medium

  [ Brian Murray ]
  * When performing a sanity check for packages to install or upgrade return
    false when either there are no packages in the cache or the package to
    upgrade is not in the change set. (LP: #1654070)
  * Do not mark packages for deletion / autoremoval if unattended-upgrades is
    being run in dry-run mode. (LP: #1544942)

  [ Louis Bouchard ]
  * Store delay command line option as an int not a string since we do maths
    with it.

 -- Brian Murray <email address hidden> Fri, 06 Jan 2017 13:00:24 -0800

Changed in unattended-upgrades (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted unattended-upgrades into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unattended-upgrades/1.1ubuntu1.18.04.7~16.04.0 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in unattended-upgrades (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed verification-needed-xenial
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted unattended-upgrades into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unattended-upgrades/1.1ubuntu1.18.04.7~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Brian, or anyone else affected,

Accepted unattended-upgrades into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/unattended-upgrades/1.1ubuntu1.18.04.7~16.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Balint Reczey (rbalint) wrote :

Verified with 1.1ubuntu1.18.04.7~16.04.2:

Added a not existing dep to git:
# vi /var/lib/apt/lists/security.ubuntu.com_ubuntu_dists_xenial-security_main_binary-amd64_Packages

# apt-cache show git
...
Package: git
Architecture: amd64
Version: 1:2.7.4-0ubuntu1.6
Multi-Arch: foreign
Priority: optional
Section: vcs
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Gerrit Pape <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 23556
Provides: git-completion, git-core
Depends: libc6 (>= 2.16), libcurl3-gnutls (>= 7.16.2), libexpat1 (>= 2.0.1), libpcre3, zlib1g (>= 1:1.2.0), perl-modules, liberror-perl, git-man (>> 1:2.7.4), git-man (<< 1:2.7.4-.), zz-not-existing-dep
...
# installed old git
# apt install git=1:2.7.4-0ubuntu1
...
# unattended-upgrade --dry-run --verbose --debug
Initial blacklisted packages:
Initial whitelisted packages:
Starting unattended upgrades script
Allowed origins are: o=Ubuntu,a=xenial, o=Ubuntu,a=xenial-security, o=UbuntuESM,a=xenial
...
Checking: git ([<Origin component:'main' archive:'xenial-updates' origin:'Ubuntu' label:'Ubuntu' site:'archive.ubuntu.com' isTrusted:True>])
pkg git not in allowed origin
sanity check failed
pkgs that look like they should be upgraded:
Fetched 0 B in 0s (0 B/s)
fetch.run() result: 0
blacklist: []
whitelist: []
Option --dry-run given, *not* performing real actions
Packages that will be upgraded:
InstCount=0 DelCount=0 BrokenCount=0
#

Now git is not listed among packages to be installed.
The message of not being in an allowed origin is correct, git from -updates is installable. There could be a better debug message and when I add the missing dep to the version in -updates, only the "sanity check failed" is printed.

Users can turn to APT to explain:
root@x-uu-verify:~# apt install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 git : Depends: zz-missing-dep-updates but it is not installable
E: Unable to correct problems, you have held broken packages.

Balint Reczey (rbalint)
tags: added: verification-done verification-done-xenial
removed: verification-needed verification-needed-xenial
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (33.9 KiB)

This bug was fixed in the package unattended-upgrades - 1.1ubuntu1.18.04.7~16.04.2

---------------
unattended-upgrades (1.1ubuntu1.18.04.7~16.04.2) xenial; urgency=medium

  * Don't check blacklist too early and report updates from not allowed origins
    as kept back. (LP: #1781176)
  * test/test_blacklisted_wrong_origin.py: Fix and enable test
  * Filter out progress indicator from dpkg log (LP: #1599646)
  * Clear cache when autoremoval fails (LP: #1779157)
  * Find autoremovable kernel packages using the patterns in APT's way
    (LP: #1815494)

unattended-upgrades (1.1ubuntu1.18.04.7~16.04.1) xenial; urgency=medium

  * Start service after systemd-logind.service to be able to take inhibition
    lock (LP: #1806487)
  * Handle gracefully when logind is down (LP: #1806487)

unattended-upgrades (1.1ubuntu1.18.04.7~16.04.0) xenial; urgency=medium

  * Backport to Xenial (LP: #1702793)
  * Revert to build-depending on debhelper (>= 9~) and dh-systemd
  * Revert configuration example changes to avoid triggering a debconf question
  * debian/postinst: Update recovery to be triggered on Xenial's package versions

unattended-upgrades (1.1ubuntu1.18.04.7) bionic; urgency=medium

  * Trigger unattended-upgrade-shutdown actions with PrepareForShutdown()
    Performing upgrades in service's ExecStop did not work when the upgrades
    involved restarting services because systemd blocked other stop/start
    actions making maintainer scripts time out and be killed leaving a broken
    system behind.
    Running unattended-upgrades.service before shutdown.target as a oneshot
    service made it run after unmounting filesystems and scheduling services
    properly on shutdown is a complex problem and adding more services to the
    mix make it even more fragile.
    The solution of monitoring PrepareForShutdown() signal from DBus
    allows Unattended Upgrade to run _before_ the jobs related to shutdown are
    queued thus package upgrades can safely restart services without
    risking causing deadlocks or breaking part of the shutdown actions.
    Also ask running unattended-upgrades to stop when shutdown starts even in
    InstallOnShutdown mode and refactor most of unattended-upgrade-shutdown to
    UnattendedUpgradesShutdown class. (LP: #1778219)
  * Increase logind's InhibitDelayMaxSec to 30s. (LP: #1778219)
    This allows more time for unattended-upgrades to shut down gracefully
    or even install a few packages in InstallOnShutdown mode, but is still a
    big step back from the 30 minutes allowed for InstallOnShutdown previously.
    Users enabling InstallOnShutdown node are advised to increase
    InhibitDelayMaxSec even further possibly to 30 minutes.
    - Add NEWS entry about increasing InhibitDelayMaxSec and InstallOnShutdown
      changes
  * Ignore "W503 line break before binary operator"
    because it will become the best practice and breaks the build
  * Stop using ActionGroups, they interfere with apt.Cache.clear()
    causing all autoremovable packages to be handled as newly autoremovable
    ones and be removed by default. Dropping ActionGroup usage does not slow
    down the most frequent case of not having anything to upgrade a...

Changed in unattended-upgrades (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.