do-release-upgrade configuration prompts fail to handle SIGINT

Bug #1055811 reported by Andy Lutomirski
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released

Bug Description

This bug occurred while upgrading Oneiric to Precise.

The 'Z : start a shell to examine the situation' prompt does not handle SIGINT. This is a severe bug, which just risked hosing my box.

do-release-upgrade said:

Configuration file `/etc/mysql/my.cnf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
 The default action is to keep your current version.
*** my.cnf (Y/I/N/O/D/Z) [default=N] ? z
Type `exit' when you're done.

I typed a few characters, realized I typed the wrong thing, and hit Ctrl-C. I got:

                               A fatal error occurred

                                                      Please report this as a bug and include the files
                        /var/log/dist-upgrade/main.log and /var/log/dist-upgrade/apt.log in
            your report. The upgrade has aborted.
                                                  Your original sources.list was saved in

                                             Traceback (most recent call last):

                                                                                File "/tmp/update-manager-9cwRNH/precise", line 7, in <module>

                                                                                File "/tmp/update-manager-9cwRNH/", line 226, in

      File "/tmp/update-manager-9cwRNH/", line
                                                                       1721, in run
    return self.fullUpgrade()

                              File "/tmp/update-manager-9cwRNH/", line
               1690, in fullUpgrade
                                    if not self.doDistUpgrade():

                                                                 File "/tmp/update-manager-9cwRNH/", line
                                                  1065, in doDistUpgrade
                                                                         res = self.cache.commit(fprogress,iprogress)

                                      File "/tmp/update-manager-9cwRNH/", line 256, in
                                 apt.Cache.commit(self, fprogress, iprogress)

                                                                              File "/usr/lib/python2.7/dist-packages/apt/", line 98,
                                                                   in deprecated_function
          return func(*args, **kwds)

                                     File "/usr/lib/python2.7/dist-packages/apt/", line 473, in
                               res = self.install_archives(pm, install_progress)

 File "/usr/lib/python2.7/dist-packages/apt/", line 98,
                                                                      in deprecated_function
             return func(*args, **kwds)

                                        File "/usr/lib/python2.7/dist-packages/apt/", line 436, in
                                            res =

                                                                           File "/tmp/update-manager-9cwRNH/", line 211, in
                                                                  res = os.WEXITSTATUS(self.wait_child())

                          File "/tmp/update-manager-9cwRNH/", line 174, in
              [self.statusfd], [], [], self.select_timeout)

=== Command terminated with exit status 1 (Mon Sep 24 14:19:12 2012) ===

And there went my upgrade. (The decorative spacing comes from do-release-upgrade. That's a separate bug, presumably.) The system is still sitting there, with dpkg in some mysterious state, stuck, because the 'precise' process is waiting for I/O that's never going to happen.

If you're going to spawn a shell, *give it proper control of the tty so it handles signals*.

Tags: dist-upgrade
tags: added: dist-upgrade
Revision history for this message
Michael Vogt (mvo) wrote :

This is a side-effect of the dpkg issue #1015567

Changed in update-manager (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in update-manager (Ubuntu):
status: New → Confirmed
peterstan (stasnel)
Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers