method mirror broken at 1.3

Bug #1613184 reported by Ivan Borzenkov on 2016-08-15
94
This bug affects 15 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Medium
Julian Andres Klode
Xenial
Undecided
Unassigned
Zesty
Medium
Unassigned

Bug Description

[Impact]
The mirror method always dies with a SEGV. It does not initialize _system but calls a function that sometimes uses it.

[Test case]
Use a mirror sources.list entry like

deb mirror://mirrors.ubuntu.com/mirrors.txt zesty main restricted universe multiverse

[Regression potential]
The fix is small, and simply avoids using _system if _system is NULL in the called method. There should not be any regressions due to this.

https://anonscm.debian.org/cgit/apt/apt.git/commit/?id=cba5c5a26a9bf00724f8ea647ac61b30e32734ba

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

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

Changed in apt (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Andres Klode (juliank) wrote :

Confirmed. Seems to crash in pkgSystem::ArchitecturesSupported(), called transitively from pkgSourceList::Type::ParseLine()

Changed in apt (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Pieter (diepes) wrote :

temporary workaround is to downgrade to 1.2

# dpkg -i /var/cache/apt/archives/apt-transport-https_1.2.15ubuntu0.2_amd64.deb

repeat dpkg -i for

/var/cache/apt/archives/apt-transport-https_1.2.15ubuntu0.2_amd64.deb
/var/cache/apt/archives/apt-utils_1.2.15ubuntu0.2_amd64.deb
/var/cache/apt/archives/libapt-inst2.0_1.2.15ubuntu0.2_amd64.deb
/var/cache/apt/archives/libapt-pkg5.0_1.2.15ubuntu0.2_amd64.deb

Revision history for this message
Pieter (diepes) wrote :

synaptic pop-up error message.

Method mirror has died unexpectedly!Sub-process mirror received a segmentation fault.

Revision history for this message
Pieter (diepes) wrote :

Permanent fix, avoid mirror in apt source file

#Replaced
deb mirror://mirrors.ubuntu.com/mirrors.txt yakkety main restricted

#with

deb http://nz.archive.ubuntu.com/ubuntu/ yakkety main restricted

Revision history for this message
Bortnyák Roland (antivirtel) wrote :

@diepes don't forget to downgrade also APT, since it will not be installed without that

tags: removed: yakkety
Revision history for this message
Ivan Borzenkov (ivan1986) wrote :

Pieter, great fix! :)

strange
if install from zesty by apt - segmentation fault
if download dsc from zesty and build package - works fine

Revision history for this message
Bortnyák Roland (antivirtel) wrote :

@ivan1986 I've tried on 17.04 (Zesty), but it didn't work:

sudo apt update && sudo apt install apt-src
sudo nano /etc/apt/sources.list # enable deb-src lines
sudo apt-src update
sudo apt-src install apt-transport-https apt-utils libapt-inst2.0 libapt-pkg5.0
sudo apt-src build apt apt-transport-https apt-utils libapt-inst2.0 libapt-pkg5.0

How did you fix it?

Revision history for this message
elichai2 (elichai2) wrote :

Same problem in Zesty.

Revision history for this message
Julian Andres Klode (juliank) wrote :
Changed in apt (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Julian Andres Klode (juliank)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.5~rc2

---------------
apt (1.5~rc2) unstable; urgency=medium

  [ Julian Andres Klode ]
  * Actually install apt_auth.conf manual page (Closes: #873934)
  * test: Workaround gpgv warning
  * apt-daily: Wait for network before daily updates.
    Introduce a new helper, apt-helper wait-online that uses
    NetworkManager and/or systemd-networkd to wait for them
    reporting online, with a time out of 30 seconds; and run
    that helper before running the daily update script. (LP: #1699850)
  * apt-daily: Pull in network-online.target in service, not timer
  * Do not warn about duplicate "legacy" targets (Closes: #839259)
    (LP: #1697120)
  * cdrom: Don't hardcode "Files" field for copying source files
  * ftparchive: Do not pass through disabled hashes in Sources (Closes: #872963)
  * Directly link against libudev on Linux systems - this does not affect
    public API and ABI, but protected pkgUdevCdromDevices function pointers
    were renamed and are now always NULL, even if Dlopen returns true.

  [ Christos Trochalakis ]
  * doc: correct '--allow-releaseinfo-change-*' typos (Closes: #873914)

  [ Frans Spiesschaert ]
  * Dutch program translation update (Closes: #874285)
  * Dutch manpage translation update (Closes: #874293)

  [ David Kalnischkies ]
  * don't write & chmod /dev/null log files
  * don't ask an uninit _system for supported archs (LP: #1613184)

 -- Julian Andres Klode <email address hidden> Sat, 09 Sep 2017 21:47:14 +0200

Changed in apt (Ubuntu):
status: In Progress → Fix Released
description: updated
description: updated
Changed in apt (Ubuntu Zesty):
status: New → Triaged
importance: Undecided → Medium
Changed in apt (Ubuntu Zesty):
status: Triaged → In Progress
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Ivan, or anyone else affected,

Accepted apt into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.4.8 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 and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision.

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

Changed in apt (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-zesty
Changed in apt (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Ivan, or anyone else affected,

Accepted apt into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.2.25 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 and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

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

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote : [apt/xenial] possible regression found

As a part of the Stable Release Updates quality process a search for Launchpad bug reports using the version of apt from xenial-proposed was performed and bug 1728596 was found. Please investigate this bug report to ensure that a regression will not be created by this SRU. In the event that this is not a regression remove the "verification-failed" tag from this bug report and add the tag "bot-stop-nagging" to bug 1728596 (not this bug). Thanks!

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

Hmm, this bug is not actually triggered in xenial, but the fix is still a good thing. I think we should keep it, but it's not really verifiable on its own, and just mark it as verified-done.

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

Verified on zesty:

root@d5c73dbb41a2:/# apt-cache policy libapt-pkg5.0
libapt-pkg5.0:
  Installed: 1.4.6~17.04.1
  Candidate: 1.4.8
  Version table:
     1.4.8 500
        500 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 Packages
 *** 1.4.6~17.04.1 500
        500 http://archive.ubuntu.com/ubuntu zesty-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     1.4 500
        500 http://archive.ubuntu.com/ubuntu zesty/main amd64 Packages
root@d5c73dbb41a2:/# apt update
Hit:1 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu zesty InRelease
Hit:3 http://archive.ubuntu.com/ubuntu zesty-updates InRelease
Get:4 http://archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]
Reading package lists... Done
E: Method mirror has died unexpectedly!
E: Sub-process mirror received a segmentation fault.
root@d5c73dbb41a2:/# apt install -q -y libapt-pkg5.0
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
  libapt-pkg5.0
1 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
Need to get 784 kB of archives.
After this operation, 1024 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu zesty-proposed/main amd64 libapt-pkg5.0 amd64 1.4.8 [784 kB]
Fetched 784 kB in 1s (550 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4078 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.4.8_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.4.8) over (1.4.6~17.04.1) ...
Setting up libapt-pkg5.0:amd64 (1.4.8) ...
Processing triggers for libc-bin (2.24-9ubuntu2.2) ...
root@d5c73dbb41a2:/# apt update
Hit:1 http://archive.ubuntu.com/ubuntu zesty InRelease
Hit:2 http://security.ubuntu.com/ubuntu zesty-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu zesty-updates InRelease
Get:4 http://archive.ubuntu.com/ubuntu zesty-backports InRelease [89.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu zesty-proposed InRelease [240 kB]
Get:6 mirror://mirrors.ubuntu.com/mirrors.txt zesty InRelease [243 kB]
Get:7 mirror://mirrors.ubuntu.com/mirrors.txt zesty/main amd64 Packages [1574 kB]
Fetched 2147 kB in 2s (733 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.

tags: added: verification-done-zesty
removed: verification-needed-zesty
Revision history for this message
Jarl (jarl-dk) wrote :

Confirmed Verified on zesty using version 1.4.8

Jarl

Revision history for this message
Jarl (jarl-dk) wrote :

Note that this bug is a blocker for standard upgrade path from Zesty to Artful.

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

Marked xenial as verified, because, while the problem itself does not exist, it still fixes the same underlying bug from an API perspective.

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

This bug was fixed in the package apt - 1.2.25

---------------
apt (1.2.25) xenial; urgency=medium

  * Microrelease covering 1.4.7 (LP: #1702326) and 1.4.8

  [ Robert Luberda ]
  * fix a "critical" typo in old changelog entry (Closes: 866358)

  [ David Kalnischkies ]
  * use port from SRV record instead of initial port
  * don't ask an uninit _system for supported archs (LP: #1613184)

  [ Julian Andres Klode ]
  * Reset failure reason when connection was successful
  * http: A response with Content-Length: 0 has no content
  * apt-daily: Pull in network-online.target in service, not timer
    (LP: #1716973)

  [ Balint Reczey ]
  * Gracefully terminate process when stopping apt-daily-upgrade (LP: #1690980)

 -- Julian Andres Klode <email address hidden> Tue, 26 Sep 2017 16:14:54 +0200

Changed in apt (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for apt has completed successfully and the package has now been 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.

Revision history for this message
Bojan Markovic (bmarkovic) wrote :

I am still having this error if I select mirror method on Zesty with apt 1.4.6

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

@Bojan The fix would have been in 1.4.8, but zesty is not supported anymore - please upgrade to artful.

Changed in apt (Ubuntu Xenial):
status: Fix Released → Won't Fix
status: Won't Fix → Fix Released
Changed in apt (Ubuntu Zesty):
status: Fix Committed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers