unattended upgrade of apt kills running apt-daily job

Bug #1649959 reported by Chaskiel Grundman on 2016-12-14
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
High
Unassigned
Yakkety
High
Unassigned

Bug Description

[Impact]
Causes automatic upgrades by unattended-upgrades to be interrupted if apt is configured, leaving the system in a partially configured state.

[Test case]
Install apt - make sure the apt-daily.service is not restarted (this systemd service runs unattended-upgrades)

[Regression Potential]
It's only overriding dh_systemd_start to not be called for the service, so I don't see any possibility for regressions.

[Original Bug report]
This morning, I discovered that my new xenial system had attempted an unattended upgrade overnight but the upgrade was incomplete. It attempted to upgrade
apt apt-transport-https apt-utils firefox firefox-locale-en flashplugin-installer libapt-inst2.0 libapt-pkg5.0 libgme0

but the unattended-upgrades-dpkg.log log terminates after apt is configured.

I had to dpkg --configure --pending and apt-get -f install to get apt back into working order.
There were no errors, crashes or cores logged.

The journal indicates that apt-daily.service stopped and restarted around the time of the upgrade, so I am assuming that is the problem (that systemd killed the update session as the result of an update to the unit files)
---
ApportVersion: 2.20.3-0ubuntu8
Architecture: amd64
CurrentDesktop: XFCE
DistroRelease: Ubuntu 16.10
InstallationDate: Installed on 2016-12-06 (7 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
NonfreeKernelModules: openafs
Package: apt 1.3.2ubuntu0.1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.8.0-30.32-generic 4.8.6
Tags: yakkety
Uname: Linux 4.8.0-30-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo wireshark
_MarkForUpload: True

apport information

tags: added: apport-collected yakkety
description: updated

apport information

apport information

Chaskiel Grundman (cg2v) wrote :

Right. apport wouldn't know to grab U-U logs for an apt bug. Attached. Also below is the journal snippet that lead me to conclude that system unit updates were responsible:

Dec 14 02:40:02 sphinx systemd[1]: Reloading.
Dec 14 02:40:02 sphinx systemd[1]: snapd.refresh.timer: Adding 10min 24.692802s random time.
Dec 14 02:40:02 sphinx systemd[1]: Reloading.
Dec 14 02:40:02 sphinx systemd[1]: snapd.refresh.timer: Adding 1h 3min 1.020974s random time.
Dec 14 02:40:02 sphinx systemd[1]: Stopped Daily apt activities.
-- Subject: Unit apt-daily.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apt-daily.service has finished shutting down.
Dec 14 02:40:02 sphinx systemd[1]: apt-daily.timer: Adding 7h 38min 41.241571s random time.
Dec 14 02:40:02 sphinx systemd[1]: apt-daily.timer: Adding 2h 14.441752s random time.
Dec 14 02:40:02 sphinx systemd[1]: Starting Daily apt activities...
-- Subject: Unit apt-daily.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apt-daily.service has begun starting up.
Dec 14 02:40:02 sphinx systemd[1]: Started Daily apt activities.
-- Subject: Unit apt-daily.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apt-daily.service has finished starting up.
--
-- The start-up result is done.
Dec 14 02:40:02 sphinx systemd[1]: apt-daily.timer: Adding 10h 59min 12.586084s random time.
Dec 14 02:40:02 sphinx systemd[1]: apt-daily.timer: Adding 7h 36min 31.098210s random time.

Chaskiel Grundman (cg2v) wrote :
Julian Andres Klode (juliank) wrote :

We know. This is fixed in zesty-proposed (in 1.4~beta1 actually). It will be backported into 1.3.3 later this month.

Changed in apt (Ubuntu):
status: New → Fix Committed
Changed in apt (Ubuntu Yakkety):
status: New → Confirmed
Changed in apt (Ubuntu):
importance: Undecided → High
Changed in apt (Ubuntu Yakkety):
importance: Undecided → High
description: updated
Julian Andres Klode (juliank) wrote :

Uploaded 1.3.3 to yakkety-proposed. There'll be another message once it has been accepted to -proposed for testing.

Changed in apt (Ubuntu Yakkety):
status: Confirmed → Fix Committed
status: Fix Committed → In Progress

Hello Chaskiel, or anyone else affected,

Accepted apt into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.3.3 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

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

Changed in apt (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.3.3

---------------
apt (1.3.3) yakkety; urgency=medium

  [ Michael Vogt ]
  * Do not (re)start "apt-daily.system"
    Thanks to Alexandre Detiste (Closes: #841763) (LP: #1649959)

 -- Julian Andres Klode <email address hidden> Wed, 14 Dec 2016 20:25:22 +0100

Changed in apt (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Julian Andres Klode (juliank) wrote :

This has been released in zesty too, but seems we forgot to close it. Doing so now.

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

Duplicates of this bug

Other bug subscribers