Kernel upgrades may leave system unbootable when its hibernated during the upgrade

Bug #191514 reported by Nikolaus Rath
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Medium
Unassigned
unattended-upgrades (Ubuntu)
Fix Released
Medium
Michael Vogt

Bug Description

Binary package hint: unattended-upgrades

It is possible to restart, shutdown or hibernate the system while a kernel update is installed in the background. This leaves the system unbootable because the inititramdisk and/or kernel image have not been written to disk completely. The same problem may apply to other critical packages, but for the kernel it is especially likely to occur (I already had the problem several times) because running mkinitrd takes quite some time.

Tags: cft-2.6.27
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I'm adding a linux-source task here. It seems to me like the best course of action here is to modify the building/updating of the initramfs in a way that the time-window were the system does not boot is minimized. Maybe building them all first and then moving them into place once all is done. I don't know enough about the kernel packages.

Cheers,
 Michael

Changed in unattended-upgrades:
importance: Undecided → Medium
status: New → Confirmed
Changed in linux-source-2.6.24:
assignee: nobody → ubuntu-kernel-team
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
oschwa2s (oliver-schwaneberg) wrote :

Hi!

I think that shutdown, restart and hibernate should be avoided if the package-manager is working anyways.
To achieve this i recommend that the gnome (or KDE/Xfce) dialog to initiate those actions should check for apt's lock-file and warn the user before he can proceed.
A small warning dialog like "Warning: the package manager is working right now, it is strongly recommended to wait for it to finish." and the user's options could be like "proceed anyways / wait and proceed / cancel".
Of course this could also be a text-based dialog if you're going to call poweroff, reboot or pm-whatsoever from shell.

Cheers,
Oliver

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Launchpad Janitor (janitor) wrote : Kernel team bugs

Per a decision made by the Ubuntu Kernel Team, bugs will longer be assigned to the ubuntu-kernel-team in Launchpad as part of the bug triage process. The ubuntu-kernel-team is being unassigned from this bug report. Refer to https://wiki.ubuntu.com/KernelTeamBugPolicies for more information. Thanks.

Revision history for this message
Brad Figg (brad-figg) wrote : Re: Kernel upgrades may leave system unbootable

This bug was reported a while ago but there hasn't been any recent comments or updates. Is this still an issue with the latest pre-release of Jaunty 9.04? Refer to http://www.ubuntu.com/testing/jaunty/beta . Please let us know.

tags: added: ct-rev
Revision history for this message
Nikolaus Rath (nikratio) wrote :

Unless I overlooked the relevant changelog entry, this is still an issue in Jaunty, since it has neither been fixed in update-initrd nor in unattended-upgrades.

Brad Figg (brad-figg)
tags: removed: ct-rev
Changed in unattended-upgrades (Ubuntu):
assignee: nobody → brad-figg
Revision history for this message
Michael Vogt (mvo) wrote :

This is fixed in bzr now.

Changed in unattended-upgrades (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Michael Vogt (mvo) wrote :

There is a shutdown script now that will ensure that the unattended-upgrades run finished before the shutdown can continue.

Changed in unattended-upgrades (Ubuntu):
assignee: Brad Figg (brad-figg) → Michael Vogt (mvo)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
unattended-upgrades (0.50ubuntu1) karmic; urgency=low

  * fix crash in ouput, thanks to Joerg Schuetter, closes: #535347
  * when running in --debug mode, also print debug output to stderr
  * add --dry-run option to simulate a run, but not actually install
    something
  * when running with --debug, install packages instead of just
    simulating the install, --dry-run is avaialble for simulation
  * check for packages on hold and do not upgrade them (closes: #511677)
  * deal better with failures in pkgname_from_deb() (LP: #305046)
  * improved the README some more (LP: #311052)
  * fix locking problem (LP: #359010)
  * Contain unattended-upgrades log in the status mail as well
    (LP: #245422)
  * ensure that unattended-upgrade is finished on shutdown
    (LP: #191514)

 -- Michael Vogt <email address hidden> Mon, 06 Jul 2009 09:26:48 +0200

Changed in unattended-upgrades (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Nikolaus Rath (nikratio) wrote :

Ensuring that unattended-upgrades is finished when shutting down only partially fixes this bug. The problem still exists when hibernating.

Changed in unattended-upgrades (Ubuntu):
status: Fix Released → Confirmed
Michael Vogt (mvo)
summary: - Kernel upgrades may leave system unbootable
+ Kernel upgrades may leave system unbootable when its hibernated during
+ the upgrade
Revision history for this message
Michael Vogt (mvo) wrote :

I commited a pm-utils hook for this now, it will be part of the next upload.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
unattended-upgrades (0.51ubuntu1) karmic; urgency=low

  * unattended-upgrade-shutdown:
    - deal with syslog not avaiable (LP: #396263)
  * pm/sleep.d/10_unatteded-upgrades-hibernate:
    - add script to ensure that installing is finished when
      hibernating (LP: #191514)

 -- Michael Vogt <email address hidden> Fri, 10 Jul 2009 10:20:47 +0200

Changed in unattended-upgrades (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Kari Aliranta (kpaliran) wrote :

A good point in a comment earlier:

"A small warning dialog like "Warning: the package manager is working right now, it is strongly recommended to wait for it to finish." and the user's options could be like "proceed anyways / wait and proceed / cancel".
Of course this could also be a text-based dialog if you're going to call poweroff, reboot or pm-whatsoever from shell."

Unattended upgrades is often the update method of choice on the computers of numerous non-computer-savvy desktop users - the more informed friends/relatives turn it on to keep the security up-to-date without user interaction, which may not be possible because the user doesn't know the superuser password required for the upgrade.

In this case, a clear warning for the user would be useful, in order to prevent the confused user from forcibly shutting down the computer (by pulling the plug, for example). The easiest way to do this would probably be a LOCALIZED uppercase message in the stdout. Something like "ATTENTION! THE COMPUTER IS PERFORMING AUTOMATIC SECURITY UPDATES, AND WILL SHUT DOWN AUTOMATICALLY AFTER HAVING FINISHED. PLEASE DON'T TURN THE COMPUTER OFF MANUALLY!"

(For a possible more GUIly way of printing the message, see a deferred Karmic spec: https://wiki.ubuntu.com/FoundationsTeam/Specs/KarmicUpdatesOnShutdown )

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.