2017-01-06 16:39:20 |
Erik Mouw |
bug |
|
|
added bug |
2017-01-06 16:39:20 |
Erik Mouw |
attachment added |
|
Reverse logic https://bugs.launchpad.net/bugs/1654600/+attachment/4800928/+files/unattended-upgrade-shutdown.diff |
|
2017-01-06 20:22:33 |
Hans Joachim Desserud |
bug |
|
|
added subscriber Ubuntu Review Team |
2017-01-06 20:22:39 |
Hans Joachim Desserud |
tags |
|
patch |
|
2017-01-09 12:55:34 |
Launchpad Janitor |
unattended-upgrades (Ubuntu): status |
New |
Confirmed |
|
2017-01-09 12:59:31 |
Anders Oftedal |
bug |
|
|
added subscriber Anders Oftedal |
2017-01-12 07:43:27 |
cmeerw |
bug |
|
|
added subscriber cmeerw |
2017-01-13 21:31:44 |
Brian Murray |
unattended-upgrades (Ubuntu): importance |
Undecided |
High |
|
2017-01-14 06:02:54 |
Seydon |
bug |
|
|
added subscriber Seydon |
2017-01-16 09:03:30 |
Ronny Vogt |
bug |
|
|
added subscriber Ronny Vogt |
2017-01-26 10:17:45 |
Louis Bouchard |
nominated for series |
|
Ubuntu Xenial |
|
2017-01-26 10:17:45 |
Louis Bouchard |
bug task added |
|
unattended-upgrades (Ubuntu Xenial) |
|
2017-01-26 10:17:45 |
Louis Bouchard |
nominated for series |
|
Ubuntu Yakkety |
|
2017-01-26 10:17:45 |
Louis Bouchard |
bug task added |
|
unattended-upgrades (Ubuntu Yakkety) |
|
2017-01-26 10:20:58 |
Louis Bouchard |
unattended-upgrades (Ubuntu): assignee |
|
Louis Bouchard (louis-bouchard) |
|
2017-01-26 10:21:01 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): assignee |
|
Louis Bouchard (louis-bouchard) |
|
2017-01-26 10:21:02 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): assignee |
|
Louis Bouchard (louis-bouchard) |
|
2017-01-26 10:21:04 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): importance |
Undecided |
High |
|
2017-01-26 10:21:06 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): importance |
Undecided |
High |
|
2017-01-26 10:21:13 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): status |
New |
Confirmed |
|
2017-01-29 12:19:44 |
Dominique Poulain |
bug |
|
|
added subscriber Dominique Poulain |
2017-01-30 10:55:54 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Yakkety): status |
New |
Confirmed |
|
2017-01-31 18:16:39 |
Brian Murray |
bug |
|
|
added subscriber Brian Murray |
2017-02-04 02:25:14 |
Scott Leggett |
bug watch added |
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809669 |
|
2017-02-04 02:25:14 |
Scott Leggett |
bug task added |
|
unattended-upgrades (Debian) |
|
2017-02-04 03:27:43 |
Bug Watch Updater |
unattended-upgrades (Debian): status |
Unknown |
New |
|
2017-02-18 23:02:23 |
Pawel Brzozowski |
bug |
|
|
added subscriber Pawel Brzozowski |
2017-02-27 22:25:23 |
Dan Greencorn |
bug |
|
|
added subscriber Dan Greencorn |
2017-03-01 11:15:29 |
Ville Mattila |
bug |
|
|
added subscriber Ville Mattila |
2017-03-02 07:14:06 |
LeaseWeb |
bug |
|
|
added subscriber LeaseWeb |
2017-03-02 09:05:25 |
kay |
bug |
|
|
added subscriber kay |
2017-03-02 11:07:01 |
Pavel Zabortsev |
bug |
|
|
added subscriber Pavel Zabortsev |
2017-03-02 15:53:25 |
Louis Bouchard |
unattended-upgrades (Ubuntu): status |
Confirmed |
In Progress |
|
2017-03-03 11:11:52 |
Launchpad Janitor |
unattended-upgrades (Ubuntu): status |
In Progress |
Fix Released |
|
2017-03-06 09:15:44 |
Louis Bouchard |
description |
The systemd unit file unattended-upgrades.service is used to stop a running unattended-upgrade
process during shutdown. This unit file is running together with all filesystem
unmount services.
The unattended-upgrades service checks if the lockfile for unattended-upgrade
(in /var/run) exists, and if it does, there is an unattended-upgrade in progress
and the service will wait until it finishes (and therefore automatically wait at
shutdown).
However, if /var is a separate filesystem, it will get unmounted even though /var/run
is a tmpfs that's still mounted on top of the /var/run directory in the /var filesystem.
The unattended-upgrade script will fail to find lockfile, sleeps for 5 seconds, and
tries to check the lockfile again. After 10 minutes (the default timeout), it will finally
exit and the system will continue shutdown.
The problem is the error handling in /usr/share/unattended-upgrades/unattended-upgrade-shutdown
where it tries to lock itself:
while True:
res = apt_pkg.get_lock(options.lock_file)
logging.debug("get_lock returned %i" % res)
# exit here if there is no lock
if res > 0:
logging.debug("lock not taken")
break
lock_was_taken = True
The function apt_pkg.get_lock() either returns a file descriptor, or -1 on an error.
File descriptors are just C file descriptors, so they are always positive integers.
The code should check the result to be negative, not positive. I have attached a patch
to reverse the logic.
Additional information:
1)
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2)
unattended-upgrades:
Installed: 0.90ubuntu0.3
Candidate: 0.90ubuntu0.3
Version table:
*** 0.90ubuntu0.3 500
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
100 /var/lib/dpkg/status
0.90 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
3)
Fast reboot
4)
Very slow reboot (after a 10 minutes timeout) |
[SRU justification]
This fix is needed to make sure that the system does not hang on shutdown when /var is a speparate file system
[Impact]
System can hang up to 10 minutes if not fixed.
[Fix]
Change the systemd unit's ExecStart to an ExecStop so the unit is correctly sequenced.
[Test Case]
In a VM with /var separated from the / file system, shutdown the VM. It will hang for 10 minutes
[Regression]
None to be expected. A ExecStop unit will be sequenced before the Before= units which is earlier than previously.
[Original description of the problem]
The systemd unit file unattended-upgrades.service is used to stop a running unattended-upgrade
process during shutdown. This unit file is running together with all filesystem
unmount services.
The unattended-upgrades service checks if the lockfile for unattended-upgrade
(in /var/run) exists, and if it does, there is an unattended-upgrade in progress
and the service will wait until it finishes (and therefore automatically wait at
shutdown).
However, if /var is a separate filesystem, it will get unmounted even though /var/run
is a tmpfs that's still mounted on top of the /var/run directory in the /var filesystem.
The unattended-upgrade script will fail to find lockfile, sleeps for 5 seconds, and
tries to check the lockfile again. After 10 minutes (the default timeout), it will finally
exit and the system will continue shutdown.
The problem is the error handling in /usr/share/unattended-upgrades/unattended-upgrade-shutdown
where it tries to lock itself:
while True:
res = apt_pkg.get_lock(options.lock_file)
logging.debug("get_lock returned %i" % res)
# exit here if there is no lock
if res > 0:
logging.debug("lock not taken")
break
lock_was_taken = True
The function apt_pkg.get_lock() either returns a file descriptor, or -1 on an error.
File descriptors are just C file descriptors, so they are always positive integers.
The code should check the result to be negative, not positive. I have attached a patch
to reverse the logic.
Additional information:
1)
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2)
unattended-upgrades:
Installed: 0.90ubuntu0.3
Candidate: 0.90ubuntu0.3
Version table:
*** 0.90ubuntu0.3 500
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
100 /var/lib/dpkg/status
0.90 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
3)
Fast reboot
4)
Very slow reboot (after a 10 minutes timeout) |
|
2017-03-06 09:16:31 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): status |
Confirmed |
In Progress |
|
2017-03-06 09:16:34 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): status |
Confirmed |
In Progress |
|
2017-03-07 12:38:59 |
André Burkhardt |
bug |
|
|
added subscriber André Burkhardt |
2017-03-07 23:39:30 |
Cole Mardle |
bug |
|
|
added subscriber Cole Mardle |
2017-03-08 13:32:54 |
Chris J Arges |
unattended-upgrades (Ubuntu Xenial): status |
In Progress |
Fix Committed |
|
2017-03-08 13:32:57 |
Chris J Arges |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2017-03-08 13:32:58 |
Chris J Arges |
bug |
|
|
added subscriber SRU Verification |
2017-03-08 13:33:08 |
Chris J Arges |
tags |
patch |
patch verification-needed |
|
2017-03-08 13:33:54 |
Chris J Arges |
unattended-upgrades (Ubuntu Yakkety): status |
In Progress |
Fix Committed |
|
2017-03-08 16:29:23 |
Louis Bouchard |
tags |
patch verification-needed |
patch verification-failed |
|
2017-03-09 17:02:01 |
Louis Bouchard |
unattended-upgrades (Ubuntu): status |
Fix Released |
In Progress |
|
2017-03-09 17:02:05 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): status |
Fix Committed |
Triaged |
|
2017-03-09 17:02:07 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): status |
Fix Committed |
Triaged |
|
2017-03-16 09:09:01 |
Volker Kettenbach |
bug |
|
|
added subscriber Volker Kettenbach |
2017-03-16 17:26:05 |
Stanislav Yadykin |
bug |
|
|
added subscriber Stanislav Yadykin |
2017-04-03 10:57:39 |
Louis Bouchard |
bug watch added |
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797108 |
|
2017-04-04 16:01:11 |
Louis Bouchard |
tags |
patch verification-failed |
patch sts-sru-needed verification-failed |
|
2017-04-06 15:46:28 |
Louis Bouchard |
nominated for series |
|
Ubuntu Zesty |
|
2017-04-06 15:46:28 |
Louis Bouchard |
bug task added |
|
unattended-upgrades (Ubuntu Zesty) |
|
2017-04-07 15:09:12 |
Xavier ALT |
bug |
|
|
added subscriber Xavier ALT |
2017-04-10 10:18:46 |
FP |
bug |
|
|
added subscriber FP |
2017-04-10 11:40:25 |
Graham Eames |
bug |
|
|
added subscriber Graham Eames |
2017-04-10 18:07:12 |
Pete Morris |
bug |
|
|
added subscriber Pete Morris |
2017-04-13 15:43:43 |
Guillaume Penin |
bug |
|
|
added subscriber Guillaume Penin |
2017-04-18 15:47:45 |
Ivan Vinogradov |
bug |
|
|
added subscriber Ivan Vinogradov |
2017-04-18 16:16:08 |
alienn |
bug |
|
|
added subscriber alienn |
2017-04-24 21:53:41 |
Launchpad Janitor |
unattended-upgrades (Ubuntu): status |
In Progress |
Fix Released |
|
2017-04-25 11:08:46 |
Louis Bouchard |
description |
[SRU justification]
This fix is needed to make sure that the system does not hang on shutdown when /var is a speparate file system
[Impact]
System can hang up to 10 minutes if not fixed.
[Fix]
Change the systemd unit's ExecStart to an ExecStop so the unit is correctly sequenced.
[Test Case]
In a VM with /var separated from the / file system, shutdown the VM. It will hang for 10 minutes
[Regression]
None to be expected. A ExecStop unit will be sequenced before the Before= units which is earlier than previously.
[Original description of the problem]
The systemd unit file unattended-upgrades.service is used to stop a running unattended-upgrade
process during shutdown. This unit file is running together with all filesystem
unmount services.
The unattended-upgrades service checks if the lockfile for unattended-upgrade
(in /var/run) exists, and if it does, there is an unattended-upgrade in progress
and the service will wait until it finishes (and therefore automatically wait at
shutdown).
However, if /var is a separate filesystem, it will get unmounted even though /var/run
is a tmpfs that's still mounted on top of the /var/run directory in the /var filesystem.
The unattended-upgrade script will fail to find lockfile, sleeps for 5 seconds, and
tries to check the lockfile again. After 10 minutes (the default timeout), it will finally
exit and the system will continue shutdown.
The problem is the error handling in /usr/share/unattended-upgrades/unattended-upgrade-shutdown
where it tries to lock itself:
while True:
res = apt_pkg.get_lock(options.lock_file)
logging.debug("get_lock returned %i" % res)
# exit here if there is no lock
if res > 0:
logging.debug("lock not taken")
break
lock_was_taken = True
The function apt_pkg.get_lock() either returns a file descriptor, or -1 on an error.
File descriptors are just C file descriptors, so they are always positive integers.
The code should check the result to be negative, not positive. I have attached a patch
to reverse the logic.
Additional information:
1)
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2)
unattended-upgrades:
Installed: 0.90ubuntu0.3
Candidate: 0.90ubuntu0.3
Version table:
*** 0.90ubuntu0.3 500
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
100 /var/lib/dpkg/status
0.90 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
3)
Fast reboot
4)
Very slow reboot (after a 10 minutes timeout) |
[SRU justification]
This fix is needed to make sure that the system does not hang on shutdown when /var is a speparate file system
[Impact]
System can hang up to 10 minutes if not fixed.
[Fix]
Change the systemd unit's ExecStart to an ExecStop so the unit is correctly sequenced.
Change WantedBy to multi-user.target. This requires working around Debian Bug #797108 which causes the new unit not to be enabled.
Remove the unneeded override_dh_isntallinit
Add Default-Start levels to the SysV initscript
Improve DEP8 testing
[Test Case]
In a VM with /var separated from the / file system, shutdown the VM. It will hang for 10 minutes
[Regression]
Upgrade has been tested on Xenial, Yakkety, Zesty. do-release-upgrade has been tested from Trusty to Xenial. All behave as expected.
A change of behavior may occur now that the systemd unit is correctly enabled, which would make functionalities like InstallOnShutdown to work as expected whereas it could have been broken previously. This cannot be considered as a regression as it is expected behavior.
Shutdown may be slowed down as it now correctly depends on /var and /boot to be available so the unit will run earlier than previously.
[Original description of the problem]
The systemd unit file unattended-upgrades.service is used to stop a running unattended-upgrade
process during shutdown. This unit file is running together with all filesystem
unmount services.
The unattended-upgrades service checks if the lockfile for unattended-upgrade
(in /var/run) exists, and if it does, there is an unattended-upgrade in progress
and the service will wait until it finishes (and therefore automatically wait at
shutdown).
However, if /var is a separate filesystem, it will get unmounted even though /var/run
is a tmpfs that's still mounted on top of the /var/run directory in the /var filesystem.
The unattended-upgrade script will fail to find lockfile, sleeps for 5 seconds, and
tries to check the lockfile again. After 10 minutes (the default timeout), it will finally
exit and the system will continue shutdown.
The problem is the error handling in /usr/share/unattended-upgrades/unattended-upgrade-shutdown
where it tries to lock itself:
while True:
res = apt_pkg.get_lock(options.lock_file)
logging.debug("get_lock returned %i" % res)
# exit here if there is no lock
if res > 0:
logging.debug("lock not taken")
break
lock_was_taken = True
The function apt_pkg.get_lock() either returns a file descriptor, or -1 on an error.
File descriptors are just C file descriptors, so they are always positive integers.
The code should check the result to be negative, not positive. I have attached a patch
to reverse the logic.
Additional information:
1)
Description: Ubuntu 16.04.1 LTS
Release: 16.04
2)
unattended-upgrades:
Installed: 0.90ubuntu0.3
Candidate: 0.90ubuntu0.3
Version table:
*** 0.90ubuntu0.3 500
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages
100 /var/lib/dpkg/status
0.90 500
500 http://nl.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
500 http://nl.archive.ubuntu.com/ubuntu xenial/main i386 Packages
3)
Fast reboot
4)
Very slow reboot (after a 10 minutes timeout) |
|
2017-04-25 12:14:03 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): status |
Triaged |
In Progress |
|
2017-04-25 12:14:07 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): status |
Triaged |
In Progress |
|
2017-04-25 12:14:19 |
Louis Bouchard |
unattended-upgrades (Ubuntu): assignee |
Louis Bouchard (louis) |
|
|
2017-04-27 20:53:23 |
Brian Murray |
unattended-upgrades (Ubuntu Zesty): status |
In Progress |
Fix Committed |
|
2017-04-27 20:53:40 |
Brian Murray |
tags |
patch sts-sru-needed verification-failed |
patch sts-sru-needed |
|
2017-04-27 20:53:41 |
Brian Murray |
tags |
patch sts-sru-needed |
patch sts-sru-needed verification-needed |
|
2017-04-27 22:35:42 |
Brian Murray |
unattended-upgrades (Ubuntu Yakkety): status |
In Progress |
Fix Committed |
|
2017-04-27 22:42:20 |
Brian Murray |
unattended-upgrades (Ubuntu Xenial): status |
In Progress |
Fix Committed |
|
2017-04-28 12:05:58 |
Louis Bouchard |
tags |
patch sts-sru-needed verification-needed |
patch verification-done |
|
2017-05-07 13:44:56 |
Bug Watch Updater |
unattended-upgrades (Debian): status |
New |
Fix Released |
|
2017-05-08 11:21:20 |
Łukasz Zemczak |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2017-05-08 11:21:47 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Yakkety): status |
Fix Committed |
Fix Released |
|
2017-05-08 11:22:34 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2017-05-08 11:31:23 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Zesty): status |
Fix Committed |
Fix Released |
|
2017-05-09 07:14:19 |
Louis Bouchard |
unattended-upgrades (Ubuntu Xenial): assignee |
Louis Bouchard (louis) |
|
|
2017-05-09 07:14:22 |
Louis Bouchard |
unattended-upgrades (Ubuntu Yakkety): assignee |
Louis Bouchard (louis) |
|
|
2017-05-09 07:14:24 |
Louis Bouchard |
unattended-upgrades (Ubuntu Zesty): assignee |
Louis Bouchard (louis) |
|
|
2018-12-03 19:15:14 |
Brian Murray |
unattended-upgrades (Ubuntu Xenial): status |
Fix Released |
Fix Committed |
|
2018-12-03 19:15:20 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2018-12-03 19:15:36 |
Brian Murray |
tags |
patch verification-done |
patch verification-needed verification-needed-xenial |
|
2018-12-05 03:32:16 |
Mathew Hodson |
bug watch removed |
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=797108 |
|
|
2019-01-22 13:10:15 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2019-02-28 12:57:56 |
Łukasz Zemczak |
unattended-upgrades (Ubuntu Xenial): status |
Fix Released |
Fix Committed |
|
2019-04-07 13:41:57 |
Balint Reczey |
tags |
patch verification-needed verification-needed-xenial |
patch verification-done verification-done-xenial |
|
2019-04-25 10:50:00 |
Launchpad Janitor |
unattended-upgrades (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|