do-release-upgrade configuration prompts fail to handle SIGINT

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

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.
root@code:/#

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
          /etc/apt/sources.list.distUpgrade.

                                             Traceback (most recent call last):

                                                                                File "/tmp/update-manager-9cwRNH/precise", line 7, in <module>
                                                               sys.exit(main())

                                                                                File "/tmp/update-manager-9cwRNH/DistUpgradeMain.py", line 226, in
                                                                   main
                                                                        if app.run():

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

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

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

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

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

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

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

                                        File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 436, in
                           install_archives
                                            res = install_progress.run(pm)

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

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

    KeyboardInterrupt
=== 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

Remote bug watches

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