interruption of dist-upgrade can leave you next release in sources.list

Bug #1898026 reported by udippel
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Fix Released
High
Julian Andres Klode
Bionic
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Fix Released
Undecided
Unassigned
Hirsute
Fix Released
High
Julian Andres Klode
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Bionic
New
Undecided
Unassigned
Focal
Fix Released
Undecided
Brian Murray
Groovy
Fix Released
Undecided
Brian Murray
Hirsute
Fix Released
High
Brian Murray

Bug Description

[Impact]
Calling update() or installing packages from apt clients resets their SIGINT and SIGQUIT handlers to SIG_DFL, overriding any signal handlers they might have set for them.

In case of ubuntu-release-upgrader, this results in the release upgrader being unable to handle interrupts after it did the initial update - the default libc handler will run and the program exits.

[Test plan]

[[apt]]
As a standalone test for apt, we can test the following script:

import apt
import time

apt.Cache().update()
print("WAITING")
try:
    time.sleep(10000)
except BaseException as e:
    print("Seen", repr(e))
print("END")

Pressing Ctrl+C while WAITING is printed should print Seen KeyboardInterrupt, and importantly, also the END line.

[[ubuntu-release-upgrader]]
1) On an Ubuntu 18.04 system run do-release-upgrade in a terminal.
2) At the "Do you want to start the upgrade?" question say Y.
3) When you see the "Lock screen disabled" message you will also see "Inhibiting until Ctrl+C is pressed".
4) Press "Ctrl+C"

Your /etc/apt/sources.list file will now have focal in it instead of bionic although the upgrade has quit. With the version of ubuntu-release-upgrader in -proposed you will not see the "Ctrl+C" message. For your sources.list file to be restored you'll need the version of apt from bionic-proposed installed before starting the upgrade.

[Where problems could occur]
apt: This specific change removes the two lines that SIG_DFL the signal handlers after running scripts. AFAWCT those lines are unnecessary - the code that calls it temporarily sets the handlers to SIG_IGN but restores previous handlers at the end; it was wrongly refactored decades ago. A regression could occur in that those signals will now continue to be ignored if we missed a spot.

ubuntu-release-upgrader: The change is wrapping a bunch of code in a try: except: block so if the indentation was off the pyflakes / pycodestyle tests would fail but autopkgtest will catch that.

[Original bug report]
As a long-time-user of ?ubuntu, with apt-get as tool of choice for updates/upgrades I wrote a daily script for updates, with 'dist-upgrade'.
In all earlier years, it wouldn't actually do an upgrade of a ?ubuntu version; just all packages including new ones. Version updates had to be initiated manually, and I was always asked if I really wanted the new ?ubuntu version. Sounds appropriate.

Last night when it (dist-upgrade), it just gave me 20.04. No questions asked. I for one consider this kind of intrusive, though.
It *might* have to make with me trying 'sudo do-release-upgrade -m desktop' a number of times earlier; just to *check* if the upgrade was on offer; but this is only a guess.

In *any* case, a pop-up asking "Are you sure? Are you connected through an adequate pipe? Are you sitting with full batteries; better a power supply?" would be convenient; since I am using my PC for urgent duties, and didn't want to fiddle with unexpected upgrade bugs.

ProblemType: BugDistroRelease: Ubuntu 20.04
Package: ubuntu-release-upgrader-core 1:20.04.25
ProcVersionSignature: Ubuntu 5.4.0-48.52-generic 5.4.60
Uname: Linux 5.4.0-48-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.9
Architecture: amd64
CasperMD5CheckResult: skip
CrashDB: ubuntu
CurrentDesktop: KDE
Date: Thu Oct 1 11:48:39 2020
InstallationDate: Installed on 2019-03-14 (566 days ago)
InstallationMedia: Kubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
PackageArchitecture: allSourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to focal on 2020-09-29 (1 days ago)
VarLogDistupgradeAptlog:
 Log time: 2020-09-29 19:44:28.696289
 Log time: 2020-09-29 19:44:33.573481

Revision history for this message
udippel (udippel) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

The release upgrade process is interactive and should ask you questions during the upgrade process. Do you have any other log files in /var/log/dist-upgrade? There may be an apt-term.log and / or a screenlog.0 file. Both of those may help sorting out what happened.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Incomplete
Revision history for this message
udippel (udippel) wrote :

$ ls -l
total 832
-rw------- 1 root root 834466 Sep 29 19:44 apt-clone_system_state.tar.gz
-rw-r--r-- 1 root root 74 Sep 29 19:44 apt.log
-rw-r--r-- 1 root root 1381 Sep 29 19:44 lspci.txt
-rw-r--r-- 1 root root 7283 Sep 29 19:44 main.log

Would any of these help?

Revision history for this message
udippel (udippel) wrote :

https://ubuntuforums.org/showthread.php?t=2451286&p=13989918#post13989918

has come up with an answer that sounds possible to me; though I had it written in here in my OP.
In any case, if the poster was correct, the whole thing would still be a tad off expectations as far as I am concerned: a job cancelled continues on its own later?

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

[Expired for ubuntu-release-upgrader (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-release-upgrader (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Brian Murray (brian-murray) wrote :

Thinking about this more I suspect what happened was that the release upgrade process (running 'sudo do-release-upgrade -m desktop') was interrupted at a point after it had modified your /etc/apt/sources.list file to focal. Then when 'dist-upgrade' was run because your sources.list file now containted focal all the packages from focal were installed. The release upgrade process should do a better job of restoring your sources.list file in the event that it is interrupted (Ctrl-C).

Also for what its worth do-release-upgrade has a '-c' switch which specifically only checks if a new distribution release is available.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Expired → Confirmed
summary: - upgrade to 20.04 is quite invasive
+ interruption of dist-upgrade can leave you next release in sources.list
tags: added: rls-ff-incoming
Revision history for this message
Balint Reczey (rbalint) wrote :

I've also experienced this in 18.04 -> 20.04 upgrade when running do-release-upgrade without any option.

tags: added: fr-1056
tags: removed: rls-ff-incoming
Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
assignee: nobody → Brian Murray (brian-murray)
status: Confirmed → In Progress
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

While a KeyboardInterrupt handler has been introduced to ubuntu-release-upgrader apt is actually sending the SIGINT back to the distribution upgrade process. This can be fixed in apt by removing the following:

--- apt-2.1.10ubuntu0.2/apt-pkg/contrib/fileutl.cc 2021-01-14 03:29:25.000000000 -0800
+++ apt-2.1.10ubuntu0.3~ppa1/apt-pkg/contrib/fileutl.cc 2021-02-26 09:13:10.000000000 -0800
@@ -140,10 +140,6 @@
       return _error->Errno("waitpid","Couldn't wait for subprocess");
    }

- // Restore sig int/quit
- signal(SIGQUIT,SIG_DFL);
- signal(SIGINT,SIG_DFL);
-
    // Check for an error code.
    if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
    {

Changed in apt (Ubuntu Hirsute):
importance: Undecided → High
status: New → Triaged
assignee: nobody → Julian Andres Klode (juliank)
Changed in apt (Ubuntu Hirsute):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.2.1

---------------
apt (2.2.1) unstable; urgency=medium

  [ Julian Andres Klode ]
  * Do not require force-loopbreak on Protected packages (Closes: #983014)
  * Branch of as 2.2.y for bullseye
  * configuration: Add missing #include <array>
  * Remove .travis.yml, we are using GitLab CI these days
  * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
  * regression fix: do require force-loopbreak for Conflicts

  [ Алексей Шилин ]
  * Russian translation update (Closes: #983348)

 -- Julian Andres Klode <email address hidden> Mon, 01 Mar 2021 22:27:55 +0100

Changed in apt (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Changed in apt (Ubuntu Groovy):
status: New → Triaged
description: updated
Changed in apt (Ubuntu Groovy):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:21.04.5

---------------
ubuntu-release-upgrader (1:21.04.5) hirsute; urgency=medium

  [ William 'jawn-smith' Wilson ]
  * Add quirk to block upgrade if docker containers are configured to use the
    aufs storage-driver (LP: #1907713)

  [ Brian Murray ]
  * DistUpgrade/DistUpgradeController.py: where possible restore sources.list
    if a KeyboardInterrupt event is received. (LP: #1898026)
  * DistUpgrade/DistUpgradeController.py: redirect the output of
    gnome-session-inhibit to devnull so a message regarding Ctrl-C is not
    displayed.

 -- Brian Murray <email address hidden> Fri, 26 Feb 2021 11:27:39 -0800

Changed in ubuntu-release-upgrader (Ubuntu Hirsute):
status: In Progress → Fix Released
Revision history for this message
Julian Andres Klode (juliank) wrote :

For the record, we are going to roll the apt change out in groovy shortly, but delay the LTS updates to give it some more real world testing.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello udippel, or anyone else affected,

Accepted apt into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/2.1.10ubuntu0.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apt (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apt/2.1.10ubuntu0.3)

All autopkgtests for the newly accepted apt (2.1.10ubuntu0.3) for groovy have finished running.
The following regressions have been reported in tests triggered by the package:

reprotest/0.7.15 (arm64, s390x)
livecd-rootfs/2.694.3 (amd64, s390x)
dgit/9.11ubuntu1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/groovy/update_excuses.html#apt

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Julian Andres Klode (juliank) wrote :

I checked do-release-upgrade -d before upgrading apt, and pressing Ctrl+C at the prompt for conforming changes left hirsute in sources.list.

I upgraded to apt 2.1.10ubuntu0.3 from proposed, ran it again, and Ctrl+C now caused the restore code to run:

 Continue [yN] Details [d]^C
Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Tue Mar 30 15:04:31 2021) ===

Revision history for this message
Julian Andres Klode (juliank) wrote :

The small simple script also worked with the proposed version:

# python3 a.py
WAITING
^CSeen KeyboardInterrupt()
END

tags: added: verification-done verification-done-groovy
removed: verification-needed verification-needed-groovy
Revision history for this message
udippel (udippel) wrote :

With respect to #12, I am not sufficiently well versed in rolling back to 18_04 in order to try once again, as much as I would love to do so and help by repeating my earlier steps that lead to the upgrade.
Though, it looks like others have been able to simulate the steps.

Thanks a lot for all the efforts!

Uwe

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

This bug was fixed in the package apt - 2.1.10ubuntu0.3

---------------
apt (2.1.10ubuntu0.3) groovy; urgency=medium

  [ David Kalnischkies ]
  * Fix incorrect base64 encoding due to int promotion (LP: #1916050)
  * Harden test for no new acquires after transaction abort (Closes: #984966)
    (LP: #1918920)

  [ Julian Andres Klode ]
  * Implement update --error-on=any (Closes: #594813) (LP: #1693900)
  * Include all translations when building the cache (LP: #1907850)
  * Do not require force-loopbreak on Protected packages (Closes: #983014)
    (LP: #1916725)
  * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
  * Protect currently running kernel at run-time (LP: #1615381)
  * Make ADDARG{,C}() macros expand to single statements

 -- Julian Andres Klode <email address hidden> Fri, 12 Mar 2021 09:22:11 +0100

Changed in apt (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for apt has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Changed in ubuntu-release-upgrader (Ubuntu Focal):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
Changed in ubuntu-release-upgrader (Ubuntu Groovy):
assignee: nobody → Brian Murray (brian-murray)
status: New → In Progress
description: updated
description: updated
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello udippel, or anyone else affected,

Accepted ubuntu-release-upgrader into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:20.04.33 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-release-upgrader (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
removed: verification-done
Revision history for this message
Brian Murray (brian-murray) wrote :

I tested and upgrade from a Bionic system to Focal using do-release-upgrade -p and as you can see in the attached screenshot the "Inhibiting until Ctrl+C is pressed" message no longer appears. So I'm setting this to verification-done.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello udippel, or anyone else affected,

Accepted ubuntu-release-upgrader into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:20.10.16 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-release-upgrader (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed-groovy
removed: verification-done-groovy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:20.04.33

---------------
ubuntu-release-upgrader (1:20.04.33) focal; urgency=medium

  * DistUpgrade/DistUpgradeController.py: restore sources.list where possible
    if a KeyboardInterrupt event is received and redirect the output of
    gnome-session-inhibit to devnull so a message regarding Ctrl-C is not
    displayed. (LP: #1898026)
  * DistUpgrade/DistUpgradeQuirks.py: Restore code which ensured the python
    package was maked for removal. (LP: #1928397)
  * Update mirrors and translations.

 -- Brian Murray <email address hidden> Thu, 13 May 2021 16:38:41 -0700

Changed in ubuntu-release-upgrader (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
dragonhahney (dragonhahney) wrote : Re: [Bug 1898026] Re: interruption of dist-upgrade can leave you next release in sources.list
Download full text (5.8 KiB)

On Mon, May 24, 2021, 8:20 AM Launchpad Bug Tracker <
<email address hidden>> wrote:

> This bug was fixed in the package ubuntu-release-upgrader - 1:20.04.33
>
> ---------------
> ubuntu-release-upgrader (1:20.04.33) focal; urgency=medium
>
> * DistUpgrade/DistUpgradeController.py: restore sources.list where
> possible
> if a KeyboardInterrupt event is received and redirect the output of
> gnome-session-inhibit to devnull so a message regarding Ctrl-C is not
> displayed. (LP: #1898026)
> * DistUpgrade/DistUpgradeQuirks.py: Restore code which ensured the python
> package was maked for removal. (LP: #1928397)
> * Update mirrors and translations.
>
> -- Brian Murray <email address hidden> Thu, 13 May 2021 16:38:41 -0700
>
> ** Changed in: ubuntu-release-upgrader (Ubuntu Focal)
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to apt in
> Ubuntu.
> Matching subscriptions: dragonhahney
> https://bugs.launchpad.net/bugs/1898026
>
> Title:
> interruption of dist-upgrade can leave you next release in
> sources.list
>
> Status in apt package in Ubuntu:
> Fix Released
> Status in ubuntu-release-upgrader package in Ubuntu:
> Fix Released
> Status in apt source package in Bionic:
> New
> Status in ubuntu-release-upgrader source package in Bionic:
> New
> Status in apt source package in Focal:
> New
> Status in ubuntu-release-upgrader source package in Focal:
> Fix Released
> Status in apt source package in Groovy:
> Fix Released
> Status in ubuntu-release-upgrader source package in Groovy:
> Fix Committed
> Status in apt source package in Hirsute:
> Fix Released
> Status in ubuntu-release-upgrader source package in Hirsute:
> Fix Released
>
> Bug description:
> [Impact]
> Calling update() or installing packages from apt clients resets their
> SIGINT and SIGQUIT handlers to SIG_DFL, overriding any signal handlers they
> might have set for them.
>
> In case of ubuntu-release-upgrader, this results in the release
> upgrader being unable to handle interrupts after it did the initial
> update - the default libc handler will run and the program exits.
>
> [Test plan]
>
> [[apt]]
> As a standalone test for apt, we can test the following script:
>
> import apt
> import time
>
> apt.Cache().update()
> print("WAITING")
> try:
> time.sleep(10000)
> except BaseException as e:
> print("Seen", repr(e))
> print("END")
>
> Pressing Ctrl+C while WAITING is printed should print Seen
> KeyboardInterrupt, and importantly, also the END line.
>
> [[ubuntu-release-upgrader]]
> 1) On an Ubuntu 18.04 system run do-release-upgrade in a terminal.
> 2) At the "Do you want to start the upgrade?" question say Y.
> 3) When you see the "Lock screen disabled" message you will also see
> "Inhibiting until Ctrl+C is pressed".
> 4) Press "Ctrl+C"
>
> Your /etc/apt/sources.list file will now have focal in it instead of
> bionic although the upgrade has quit. With the version of ubuntu-
> release-upgrader in -proposed you will not see the "Ctrl+C" message.
> For your sources.list file to be restored you'll need th...

Read more...

Revision history for this message
Brian Murray (brian-murray) wrote :

I tested and upgrade from a Focal system to Groovy using do-release-upgrade -p and as you can see in the attached screenshot the "Inhibiting until Ctrl+C is pressed" message no longer appears. So I'm setting this to verification-done for ubuntu-release-upgrader.

tags: added: verification-done-groovy
removed: verification-needed-groovy
Mathew Hodson (mhodson)
tags: removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:20.10.16

---------------
ubuntu-release-upgrader (1:20.10.16) groovy; urgency=medium

  * DistUpgrade/DistUpgradeController.py: restore sources.list where possible
    if a KeyboardInterrupt event is received and redirect the output of
    gnome-session-inhibit to devnull so a message regarding Ctrl-C is not
    displayed. (LP: #1898026)
  * Update mirrors, demotions, and translations.

 -- Brian Murray <email address hidden> Fri, 14 May 2021 10:27:44 -0700

Changed in ubuntu-release-upgrader (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello udippel, or anyone else affected,

Accepted apt into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/2.0.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in apt (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
removed: verification-done-focal
Changed in apt (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello udippel, or anyone else affected,

Accepted apt into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.6.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apt/1.6.14)

All autopkgtests for the newly accepted apt (1.6.14) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

apport/2.20.9-0ubuntu7.24 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#apt

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (apt/2.0.6)

All autopkgtests for the newly accepted apt (2.0.6) for focal have finished running.
The following regressions have been reported in tests triggered by the package:

reprotest/0.7.14 (ppc64el)
apport/2.20.11-0ubuntu27.18 (amd64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/focal/update_excuses.html#apt

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Julian Andres Klode (juliank) wrote :

focal/2.0.6: The standalone test certainly worked, and the keyboard interrupts were delivered to do-release-upgrade

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Julian Andres Klode (juliank) wrote :

bionic, 1.6.14 is good too.

root@b:~# python3 a.py
WAITING
^C
root@b:~# apt install libapt-pkg5.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  apt apt-utils
Suggested packages:
  apt-doc aptitude | synaptic | wajig dpkg-dev
The following packages will be upgraded:
  apt apt-utils libapt-pkg5.0
3 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
Need to get 2224 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 libapt-pkg5.0 amd64 1.6.14 [809 kB]
Get:2 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apt amd64 1.6.14 [1207 kB]
Get:3 http://archive.ubuntu.com/ubuntu bionic-proposed/main amd64 apt-utils amd64 1.6.14 [209 kB]
Fetched 2224 kB in 0s (7775 kB/s)
(Reading database ... 28937 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.6.14_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.6.14) over (1.6.13) ...
Setting up libapt-pkg5.0:amd64 (1.6.14) ...
(Reading database ... 28937 files and directories currently installed.)
Preparing to unpack .../archives/apt_1.6.14_amd64.deb ...
Unpacking apt (1.6.14) over (1.6.13) ...
Setting up apt (1.6.14) ...
(Reading database ... 28937 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.6.14_amd64.deb ...
Unpacking apt-utils (1.6.14) over (1.6.13) ...
Setting up apt-utils (1.6.14) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...
root@b:~# python3 a.py
WAITING
^CSeen KeyboardInterrupt()
END

do-release-upgrade was fine too:
Upgrading
Fetched 0 B in 0s (0 B/s)

Restoring original system state

Note that if you Ctrl+C while it's downloading the upgrades, it gets the keyboardinterrupt in the wrong spot - inside the progress handler and does not restore the correct state, probably should be a different bug, though.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 2.0.6

---------------
apt (2.0.6) focal; urgency=medium

  * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
  * test suite fix: Check for and discard expected warning from MaybeAddAuth
  * Fix downloads of unsized files that are largest in pipeline (LP: #1921626),
    and warn about packages without size (option Acquire::AllowUnsizedPackages)
  * JSON hooks 0.2 and assorted JSON bugfixes (LP: #1926150)
    - encoder fixes:
      + json: Escape strings using \u escape sequences, add test
      + json: Actually pop states
      + json: Encode NULL strings as null
    - json: Flush standard file descriptors before calling hooks
      (this avoids output from hooks in middle of apt output)
    - non-code changes:
      + test/json: Make the test hook more reliable
      + Fix a typo in json-hooks-protocol.md (thanks to Brian Murray)
    - semantic changes (new fields, hooks, and protocol 0.2):
      + json: Add origins fields to version
      + upgrade: Add JSON hook support (AptCli::Hooks::Upgrade)
      + json: Add `package-list` and `statistics` install hooks
      + json: Hook protocol 0.2 (added upgrade,downgrade,reinstall modes)
    + Fix a typo in json-hooks-protocol.md (thanks to Brian Murray)
  * Avoid infinite loop on EOF on media change prompt (LP: #1928687)

 -- Julian Andres Klode <email address hidden> Tue, 15 Jun 2021 13:05:46 +0200

Changed in apt (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.6.14

---------------
apt (1.6.14) bionic; urgency=medium

  * RunScripts: Do not reset SIGQUIT and SIGINT to SIG_DFL (LP: #1898026)
  * Fix downloads of unsized files that are largest in pipeline (LP: #1921626),
    and warn about packages without size (option Acquire::AllowUnsizedPackages)
  * JSON hooks 0.2 and assorted JSON bugfixes (LP: #1926150)
    - encoder fixes:
      + json: Escape strings using \u escape sequences, add test
      + json: Actually pop states
      + json: Encode NULL strings as null
    - json: Flush standard file descriptors before calling hooks
      (this avoids output from hooks in middle of apt output)
    - Minor fixes to include and C++ namespaces
    - non-code changes:
      + test/json: Make the test hook more reliable
      + Fix a typo in json-hooks-protocol.md (thanks to Brian Murray)
    - semantic changes (new fields, hooks, and protocol 0.2):
      + json: Add origins fields to version
      + upgrade: Add JSON hook support (AptCli::Hooks::Upgrade)
      + json: Add `package-list` and `statistics` install hooks
      + json: Hook protocol 0.2 (added upgrade,downgrade,reinstall modes)
    + Fix a typo in json-hooks-protocol.md (thanks to Brian Murray)
  * Avoid infinite loop on EOF on media change prompt (LP: #1928687)

 -- Julian Andres Klode <email address hidden> Tue, 15 Jun 2021 16:12:38 +0200

Changed in apt (Ubuntu Bionic):
status: Fix Committed → 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.