Hitting Ctrl-C in the dpkg config conflict interactive sub-shell aborts the upgrade
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| ubuntu-release-upgrader (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Bug Description
During an upgrade from 23.10 to 24.04, while investigating a config conflict in an interactive sub shell I used ^C to discard the current command in that shell. Instead of the shell receiving the interrupt signal and responding in the way it normally did, some other process in the upgrade process received it and aborted the upgrade.
Using ^C to discard the current command in a shell is normal use and shouldn't result in catastrophic failure of the upgrade.
Some of the upgrade is still running, but nothing is responding to keyboard input.
Here is the output of the process after I hit ^C:
-------
recovery will run now (dpkg --configure -a).
The upgrade has completed but there were errors during the upgrade
-------
Here is the process tree that remained after the upgrade process aborted:
-------
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1218552 0.0 0.0 17396 7680 pts/3 S+ 12:50 0:01 sudo do-release-upgrade
root 1218553 0.0 0.0 17396 2628 pts/2 Ss 12:50 0:00 \_ sudo do-release-upgrade
root 1218554 0.7 0.7 558320 245452 pts/2 Sl+ 12:50 0:50 \_ /usr/bin/python3 -s /tmp/ubuntu-
root 1224613 0.0 0.0 0 0 pts/2 Z+ 12:58 0:00 \_ [sh] <defunct>
root 1224643 0.1 0.5 560428 172244 pts/2 S+ 12:58 0:12 \_ /usr/bin/python3 -s /tmp/ubuntu-
root 1275670 0.0 0.0 21320 16700 pts/0 Ss 13:12 0:02 \_ /usr/bin/dpkg --force-overwrite --status-fd 112 --configure --pending
root 1320513 0.0 0.0 8592 5376 pts/0 S+ 14:27 0:00 \_ /bin/bash -i --
-------
It appears there are several pseudoterminals in use.
I thought screen used to be used for this, but it doesn't seem to be in this case. Maybe that's not relevant here, I don't know.
Whatever code is doing this needs to put the outer layer in raw mode to be able to handle normal interactive use.
