method mirror broken at 1.3

Bug #1613184 reported by Ivan Borzenkov on 2016-08-15
86
This bug affects 13 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
Launchpad Janitor (janitor) wrote :

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

Changed in apt (Ubuntu):
status: New → Confirmed
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
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

Pieter (diepes) wrote :

synaptic pop-up error message.

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

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

Bortnyák Roland (antivirtel) wrote :

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

tags: removed: yakkety
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

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?

elichai2 (elichai2) wrote :

Same problem in Zesty.

Julian Andres Klode (juliank) wrote :
Changed in apt (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Julian Andres Klode (juliank)
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

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
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!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers