given a foreign architecture of i386 on amd64 machine, and an outdated libc, apt tries to remove libc-bin

Bug #850264 reported by Clint Byrum
This bug affects 187 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Fix Released
High
Unassigned
apt (Ubuntu)
Fix Released
High
Michael Vogt
Oneiric
Fix Released
High
Steve Langasek
Precise
Fix Released
High
Michael Vogt

Bug Description

SRU justification: a bug in apt's resolver causes apt to select pathological upgrade solutions when foreign-arch packages are installed. This affects a substantial proportion of amd64 users, who will have multiarch enabled (e.g., for ia32-libs or for skype). This fix allows apt to calculate the upgrade correctly, preferring native packages over foreign ones whenever possible.

TEST CASE:
1) on an oneiric amd64 system, install the skype:i386 package from the Canonical Partner repository.
2) attempt a release upgrade to precise with update-manager -d.
3) verify that the release upgrade failed, with errors in apt.log indicating involvement of :i386 packages
4) install the apt from oneiric-proposed
5) attempt the release upgrade a second time
6) verify that the release upgrade completes successfully.

RELEASE NOTES: although users will generally have -updates installed already before they begin the upgrade, this particular issue has enough of an impact on the upgrade for amd64 desktop users that I think it's worth singling out in the release notes telling users that they need to use the apt from -updates. (I'm assuming here that we won't have time to enforce this through update-manager prior to release.)

This reproducer was verified to work in the live system of current precise-dailies. It doesn't work on an installed system where libc6:i386 is already installed!

1. Drop libc6-dev:
   sudo dpkg -P libc6-dev

2. Downgrade to a previous libc:

  wget https://launchpad.net/ubuntu/+source/eglibc/2.13-20ubuntu9/+build/2979954/+files/libc-bin_2.13-20ubuntu9_amd64.deb https://launchpad.net/ubuntu/+source/eglibc/2.13-20ubuntu9/+build/2979954/+files/libc6_2.13-20ubuntu9_amd64.deb
  sudo dpkg -i libc*.bin

3. Ensure apt is consistent:

    sudo apt-get install -f

  should not complain about anything.

4. Install i386 package:

  sudo apt-get install cpp:i386

  This will propose to remove libc-bin and install the newer version of libc-bin:i386 instead.

It seems that apt prefers install the foreign arch libc6-bin:i386 over upgrading the native arch libc6-bin to the current version?

WORKAROUND
If you get this bug with Precise Alpha1 you can workaround by:
* Keeping 'install 3rd party software' _unchecked_ in the Prepare step of Ubiquity
or
* Disconnecting the system from the network before starting the installation

----
Original bug report:

Today I added i386 as a foreign architecture and then tried to install something with apt, but was presented with a very bad plan:

$ sudo apt-get install skype:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  gcc-4.6-base:i386 libasound2:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libc-bin:i386 libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libc6-i386 libcomerr2:i386
  libcups2:i386 libdbus-1-3:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386
  libgcrypt11:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libice6:i386
  libjpeg62:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libmng1:i386
  libpcre3:i386 libpng12-0:i386 libqt4-dbus libqt4-dbus:i386 libqt4-declarative libqt4-declarative:i386
  libqt4-network libqt4-network:i386 libqt4-opengl libqt4-script libqt4-script:i386 libqt4-sql libqt4-sql:i386
  libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-xml libqt4-xml:i386 libqt4-xmlpatterns
  libqt4-xmlpatterns:i386 libqtcore4 libqtcore4:i386 libqtgui4 libqtgui4:i386 libselinux1:i386 libsm6:i386
  libstdc++6:i386 libtasn1-3:i386 libtiff4:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386
  libxext6:i386 libxi6:i386 libxrender1:i386 libxss1:i386 libxt6:i386 libxv1:i386 qdbus zlib1g:i386
Suggested packages:
  libasound2-plugins:i386 libasound2-python:i386 nas:i386 glibc-doc glibc-doc:i386 locales:i386 cups-common:i386
  rng-tools:i386 gnutls-bin:i386 krb5-doc:i386 krb5-user:i386 liblcms-utils:i386 libqt4-declarative-folderlistmodel
  libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer
  libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386
  libqt4-declarative-shaders:i386 qt4-qmlviewer:i386 libqt4-dev libqt4-dev:i386 qt4-qtconfig qt4-qtconfig:i386
Recommended packages:
  libqt4-sql-mysql:i386 libqt4-sql-odbc:i386 libqt4-sql-psql:i386 libqt4-sql-sqlite:i386
The following packages will be REMOVED:
  libc-bin
The following NEW packages will be installed:
  gcc-4.6-base:i386 libasound2:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libc-bin:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libexpat1:i386
  libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libglib2.0-0:i386
  libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libice6:i386 libjpeg62:i386 libk5crypto3:i386
  libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libmng1:i386 libpcre3:i386 libpng12-0:i386
  libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-xml:i386
  libqt4-xmlpatterns:i386 libqtcore4:i386 libqtgui4:i386 libselinux1:i386 libsm6:i386 libstdc++6:i386
  libtasn1-3:i386 libtiff4:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386
  libxi6:i386 libxrender1:i386 libxss1:i386 libxt6:i386 libxv1:i386 skype:i386 zlib1g:i386
The following packages will be upgraded:
  libc-dev-bin libc6 libc6-dbg libc6-dev libc6-i386 libqt4-dbus libqt4-declarative libqt4-network libqt4-opengl
  libqt4-script libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-xml libqt4-xmlpatterns libqtcore4
  libqtgui4 qdbus
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  libc-bin
19 upgraded, 58 newly installed, 1 to remove and 274 not upgraded.
Need to get 71.5 MB of archives.
After this operation, 96.3 MB of additional disk space will be used.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] ^C

To fix this, on slangasek's advice, I did

$ sudo apt-get install skype:i386 libc-bin

This upgraded libc-bin instead of removing it.

$ sudo apt-get install skype:i386 libc-bin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  gcc-4.6-base:i386 libasound2:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libc-dev-bin libc6 libc6:i386 libc6-dbg libc6-dev libc6-i386 libcomerr2:i386 libcups2:i386
  libdbus-1-3:i386 libexpat1:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386
  libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libice6:i386 libjpeg62:i386
  libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libmng1:i386 libpcre3:i386
  libpng12-0:i386 libqt4-dbus libqt4-dbus:i386 libqt4-declarative libqt4-declarative:i386 libqt4-network
  libqt4-network:i386 libqt4-opengl libqt4-script libqt4-script:i386 libqt4-sql libqt4-sql:i386 libqt4-sql-mysql
  libqt4-sql-sqlite libqt4-svg libqt4-xml libqt4-xml:i386 libqt4-xmlpatterns libqt4-xmlpatterns:i386 libqtcore4
  libqtcore4:i386 libqtgui4 libqtgui4:i386 libselinux1:i386 libsm6:i386 libstdc++6:i386 libtasn1-3:i386
  libtiff4:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxi6:i386
  libxrender1:i386 libxss1:i386 libxt6:i386 libxv1:i386 qdbus zlib1g:i386
Suggested packages:
  libasound2-plugins:i386 libasound2-python:i386 nas:i386 glibc-doc glibc-doc:i386 locales:i386 cups-common:i386
  rng-tools:i386 gnutls-bin:i386 krb5-doc:i386 krb5-user:i386 liblcms-utils:i386 libqt4-declarative-folderlistmodel
  libqt4-declarative-gestures libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer
  libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386
  libqt4-declarative-shaders:i386 qt4-qmlviewer:i386 libqt4-dev libqt4-dev:i386 qt4-qtconfig qt4-qtconfig:i386
Recommended packages:
  libqt4-sql-mysql:i386 libqt4-sql-odbc:i386 libqt4-sql-psql:i386 libqt4-sql-sqlite:i386
The following NEW packages will be installed:
  gcc-4.6-base:i386 libasound2:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libc6:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libexpat1:i386 libffi6:i386
  libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libglib2.0-0:i386 libgnutls26:i386
  libgpg-error0:i386 libgssapi-krb5-2:i386 libice6:i386 libjpeg62:i386 libk5crypto3:i386 libkeyutils1:i386
  libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libmng1:i386 libpcre3:i386 libpng12-0:i386 libqt4-dbus:i386
  libqt4-declarative:i386 libqt4-network:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-xml:i386
  libqt4-xmlpatterns:i386 libqtcore4:i386 libqtgui4:i386 libselinux1:i386 libsm6:i386 libstdc++6:i386
  libtasn1-3:i386 libtiff4:i386 libuuid1:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386
  libxi6:i386 libxrender1:i386 libxss1:i386 libxt6:i386 libxv1:i386 skype:i386 zlib1g:i386
The following packages will be upgraded:
  libc-bin libc-dev-bin libc6 libc6-dbg libc6-dev libc6-i386 libqt4-dbus libqt4-declarative libqt4-network
  libqt4-opengl libqt4-script libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-xml libqt4-xmlpatterns
  libqtcore4 libqtgui4 qdbus
20 upgraded, 57 newly installed, 0 to remove and 274 not upgraded.
Need to get 43.7 MB/71.6 MB of archives.
After this operation, 96.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?

libc-bin was version 2.13-17ubuntu2 at the time, and updated to 2.13-20ubuntu2

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: apt 0.8.16~exp5ubuntu6
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 1.22.1-0ubuntu2
Architecture: amd64
Date: Wed Sep 14 11:43:35 2011
InstallationMedia: Xubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101008.1)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: apt
UpgradeStatus: Upgraded to oneiric on 2011-07-14 (61 days ago)

Revision history for this message
Clint Byrum (clint-fewbar) wrote :
tags: added: multiarch
Revision history for this message
Rolf Leggewie (r0lf) wrote :

There's several reports of this, I think. Many of them with the multiarch tag.

Steve Langasek (vorlon)
Changed in apt (Ubuntu):
status: New → Triaged
importance: Undecided → High
Steve Langasek (vorlon)
Changed in apt (Ubuntu Precise):
milestone: none → precise-alpha-2
assignee: nobody → Martin Pitt (pitti)
Revision history for this message
Steve Langasek (vorlon) wrote :

Martin, assigning this to you since you had claimed the duplicate that was filed against ubiquity; if you would rather have foundations take it, feel free to reassign.

tags: added: rls-mgr-p-tracking
tags: added: iso-testing
Revision history for this message
Martin Pitt (pitti) wrote :

I assigned the original one to me for reproduction and investigation, my first hunch was that some dependency in ubuntu-restricted-addons was wrong. If it's an error in the core multiarch logic of apt, I'll almost certainly need Michael's help, but I'm happy to at least work on a small and reproducible test case.

Martin Pitt (pitti)
description: updated
Revision history for this message
Martin Pitt (pitti) wrote :
Download full text (8.9 KiB)

with debug output:

ubuntu@ubuntu:~$ sudo apt-get install -o Debug::pkgProblemResolver=true cpp:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Starting
Starting 2
Investigating (0) x11-xserver-utils [ amd64 ] < 7.6+3 > ( x11 )
Broken x11-xserver-utils:amd64 Depends on cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters )
  Considering cpp:amd64 5 as a solution to x11-xserver-utils:amd64 8
  Added cpp:amd64 to the remove list
  Fixing x11-xserver-utils:amd64 via keep of cpp:amd64
Investigating (0) cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters )
Broken cpp:amd64 Depends on cpp-4.6 [ amd64 ] < 4.6.2-5ubuntu1 > ( interpreters ) (>= 4.6.1-1)
  Considering cpp-4.6:amd64 1 as a solution to cpp:amd64 5
  Added cpp-4.6:amd64 to the remove list
Broken cpp:amd64 Conflicts on cpp [ i386 ] < none -> 4:4.6.1-2ubuntu5 > ( interpreters )
  Considering cpp:i386 9999 as a solution to cpp:amd64 5
  Removing cpp:amd64 rather than change cpp:i386
Investigating (0) x11-apps [ amd64 ] < 7.6+5 > ( x11 )
Broken x11-apps:amd64 Depends on cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters )
  Considering cpp:amd64 5 as a solution to x11-apps:amd64 2
  Removing x11-apps:amd64 rather than change cpp:amd64
Investigating (0) gcc-4.6 [ amd64 ] < 4.6.2-5ubuntu1 > ( devel )
Broken gcc-4.6:amd64 Depends on cpp-4.6 [ amd64 ] < 4.6.2-5ubuntu1 > ( interpreters ) (= 4.6.2-5ubuntu1)
  Considering cpp-4.6:amd64 1 as a solution to gcc-4.6:amd64 2
  Added cpp-4.6:amd64 to the remove list
  Fixing gcc-4.6:amd64 via keep of cpp-4.6:amd64
Investigating (0) x11-session-utils [ amd64 ] < 7.6+1ubuntu1 > ( x11 )
Broken x11-session-utils:amd64 Depends on cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters )
  Considering cpp:amd64 5 as a solution to x11-session-utils:amd64 2
  Removing x11-session-utils:amd64 rather than change cpp:amd64
Investigating (0) libidl0 [ amd64 ] < 0.8.14-0.2 > ( libs )
Broken libidl0:amd64 Depends on cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters )
  Considering cpp:amd64 5 as a solution to libidl0:amd64 2
  Removing libidl0:amd64 rather than change cpp:amd64
Investigating (0) liborbit2 [ amd64 ] < 1:2.14.19-0.1 > ( libs )
Broken liborbit2:amd64 Depends on libidl0 [ amd64 ] < 0.8.14-0.2 > ( libs )
  Considering libidl0:amd64 2 as a solution to liborbit2:amd64 2
  Removing liborbit2:amd64 rather than change libidl0:amd64
Investigating (0) libreoffice-gnome [ amd64 ] < 1:3.4.4-0ubuntu2 > ( gnome )
Broken libreoffice-gnome:amd64 Depends on liborbit2 [ amd64 ] < 1:2.14.19-0.1 > ( libs ) (>= 1:2.14.10)
  Considering liborbit2:amd64 2 as a solution to libreoffice-gnome:amd64 1
  Removing libreoffice-gnome:amd64 rather than change liborbit2:amd64
Investigating (0) gcc [ amd64 ] < 4:4.6.1-2ubuntu5 > ( devel )
Broken gcc:amd64 Depends on cpp [ amd64 ] < 4:4.6.1-2ubuntu5 > ( interpreters ) (>= 4:4.6.1-2ubuntu5)
  Considering cpp:amd64 5 as a solution to gcc:amd64 1
  Removing gcc:amd64 rather than change cpp:amd64
Investigating (0) xorg [ amd64 ] < 1:7.6+7ubuntu7 > ( x11 )
Broken xorg:amd64 Depends on x11-apps [ amd64 ] < 7.6+5 > ( x11 )
  Considering x11-apps:amd64 2 as a solution to xorg:amd64 1
  Removing xorg:amd64 ...

Read more...

Revision history for this message
Michael Vogt (mvo) wrote :

This problem should actually be fixed in the current bzr trunk. Kudos to Donkult (both debian-experimental and ubuntu). There are some ABI issues I will see if I can backport the fix easily.

Martin Pitt (pitti)
Changed in apt (Ubuntu Precise):
assignee: Martin Pitt (pitti) → Michael Vogt (mvo)
tags: added: rls-p-tracking
removed: rls-mgr-p-tracking
tags: added: rls-mgr-p-tracking
Revision history for this message
Carlos Sang (karolinger) wrote :

i'm unabe to complete the installation of Precise Alpha 1 because of this bug. Everytime Ubiquity crashes before completely "installing system", almost at the end after finishing "downloading packages".

Revision history for this message
Stephen Cradock (s-cradock) wrote :

Carlos - the trick is to refuse the offer to download and install updates - the installation should then proceed to completion. After you re-start, you can update/upgrade without any trouble.

Good luck!

Revision history for this message
William Bouterse (bill-bouterse) wrote : Re: [Bug 850264] Re: given a foreign architecture of i386 on amd64 machine, and an outdated libc, apt tries to remove libc-bin

I confirm that this works as well.....
i.e. disable updates/Internet during installation achieves a successful install.

I also vaguely remember this happening before to other early builds
on other Ubuntu releases !?

----- Original Message -----
From: "Stephen Cradock" <email address hidden>
To: <email address hidden>
Sent: Monday, December 12, 2011 5:59:47 PM
Subject: [Bug 850264] Re: given a foreign architecture of i386 on amd64 machine, and an outdated libc, apt tries to remove libc-bin

Carlos - the trick is to refuse the offer to download and install
updates - the installation should then proceed to completion. After you
re-start, you can update/upgrade without any trouble.

Good luck!

--
You received this bug notification because you are subscribed to a
duplicate bug report (903007).
https://bugs.launchpad.net/bugs/850264

Title:
  given a foreign architecture of i386 on amd64 machine, and an outdated
  libc, apt tries to remove libc-bin

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/850264/+subscriptions

Revision history for this message
Colin Watson (cjwatson) wrote :

William, that's unlikely since multiarch wasn't enabled before mid-Oneiric. However, you certainly might have experienced some other problem with similar symptoms.

Revision history for this message
Carlos Sang (karolinger) wrote :

Thanks, for information, William.

I have read some info on Ubuntu Forums that seems to resolved my issue. I didn't choose to install 3rd party software before intiating setup and the bug didn't affect me.

 http://ubuntuforums.org/showpost.php?p=11533626&postcount=384

description: updated
Revision history for this message
jatoo (wainwright-alex) wrote :

Stephen, I experienced this bug trying to install Precise Alpha 1, but I had download and install updates disabled.

Revision history for this message
Steve Langasek (vorlon) wrote :

The fix for this is committed to the apt bzr repo, but not yet uploaded; debian/changelog warns not to upload because another ABI break is coming soon, but this warning dates from November. Michael, is this ABI change still pending?

Changed in apt (Ubuntu Precise):
status: Triaged → Fix Committed
Revision history for this message
Grayson Peddie (graysonpeddie) wrote :

In bug #912991, I must have misspelled "ubiquity" as "ubuquity." Whoops... my bad. :(

(And pardon my duplicate. :))

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote : ISO tracker notification

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/897680

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.0 KiB)

This bug was fixed in the package apt - 0.8.16~exp12ubuntu1

---------------
apt (0.8.16~exp12ubuntu1) precise; urgency=low

  [ Michael Vogt ]
  * merge from debian/experimental:
    - new ABI

  [ Steve Langasek ]
  * apt-pkg/algorithms.cc: iterate Breaks the same way as Conflicts, so that
    we resolve virtual package Breaks more effectively. Thanks to Colin
    Watson for the patch. Closes: #657695, LP: #922485.
  * apt-pkg/algorithms.{cc,h}: use an int to represent resolver scores, not
    a signed short, because large upgrades can result in an overflow for
    core packages. Thanks again to Colin Watson. Closes: #657732,
    LP: #917173.
  * Multi-Arch: none build-deps should be DEB_HOST_ARCH, not DEB_BUILD_ARCH.
    Closes: #646288.

apt (0.8.16~exp12) experimental; urgency=low

  [ Michael Vogt ]
  * apt-pkg/deb/dpkgpm.cc:
    - fix segfault on pkg removal

  [ David Kalnischkies ]
  * apt-pkg/cacheiterators.h:
    - return the correct version arch for all+foreign, too
  * apt-pkg/packagemanager.cc:
    - ignore breaks on not-installed versions while searching for
      breakage loops as we don't have to avoid them
  * debian/control:
    - remove APT from the short descriptions as lintian doesn't like it
      and it doesn't transport any information for a reader anyway
    - apply typofixes by Pascal De Vuyst, thanks! (Closes: #652834, #652835)
  * debian/rules:
    - apply patch to enable usage of hardning CPPFLAGS and LDFLAGS by
      Moritz Muehlenhoff, thanks! (Closes: #653504)
  * methods/https.cc:
    - use curls list append instead of appending Range and If-Range by hand
      which generates malformed requests, thanks Mel Collins for the hint!
      (Closes: #646381)
  * test/libapt/run-tests:
    - hurd doesn't have dmesg yet and we don't really need it either,
      so use with $0 a more stable data source for hashsumming

  [ Pino Toscano ]
  * test/libapt/globalerror_test.cc:
    - errno 0 has a different strerror on hurd, so generate the expected
      message dynamically instead of hardcoding 'Success' (Closes: #656530)

apt (0.8.16~exp11) experimental; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/deb/dpkgpm.cc:
    - redirect out/input of dpkg --assert-multi-arch to /dev/null
    - if multi-arch is detected ensure that pkg:all is reported as pkg:all

apt (0.8.16~exp10) experimental; urgency=low

  [ David Kalnischkies ]
  * apt-pkg/depcache.cc:
    - implicit conflicts (for multiarch) are supposed to conflict
      only with real packages, not with virtual providers
  * apt-pkg/pkgcache.cc:
    - ignore implicit conflicts on providers in AllTarget, too
  * apt-pkg/deb/dpkgpm.cc:
    - check if dpkg supports multiarch with --assert-multi-arch
      and if it does be always explicit about the architecture
  * apt-pkg/contrib/fileutl.h:
    - store the offset in the internal fd before calculate size of
      the zlib-handled file to jump back to this place again

  [ Michael Vogt ]
  * apt-pkg/contrib/fileutl.h:
    - fix segfault triggered by the python-apt testsuite

apt (0.8.16~exp9) experimental; urgency=low

  [ Julian Andres Klode ]
  * apt-pkg/cdrom.cc:
    - Accept .bz2, .xz files in addition to .gz fil...

Read more...

Changed in apt (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

This issue still affects upgrades from oneiric to precise (see duplicate bug #940571) because the upgrader uses the oneiric version of apt. So we may need to backport this.

Changed in apt (Ubuntu Oneiric):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Backported the patch in apt on precise to oneiric apt.

Revision history for this message
Steve Langasek (vorlon) wrote :

Jean-Louis, thanks for preparing this patch. Unfortunately, before uploading it, I wanted to run the integration tests (test-multiarch-foreign) to make sure the bug is actually fixed; and it doesn't appear that it is:

Test for equality of apt-get install cool-bar:i386 -s …
 Reading package lists...
 Building dependency tree...
 The following extra packages will be installed:
- bar
+ bar:i386
 The following NEW packages will be installed:
- bar cool-bar:i386
+ bar:i386 cool-bar:i386
 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
-Inst bar (1.0 Testcases:unstable [amd64])
+Inst bar:i386 (1.0 Testcases:unstable [i386])
 Inst cool-bar:i386 (1.0 Testcases:unstable [i386])
-Conf bar (1.0 Testcases:unstable [amd64])
+Conf bar:i386 (1.0 Testcases:unstable [i386])
 Conf cool-bar:i386 (1.0 Testcases:unstable [i386])
FAIL

This clearly shows dependencies being followed as i386 packages on amd64; so something seems to be missing here.

Attached is the test-multiarch-foreign that I've ported back to the oneiric version of apt, for reference.

Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Some more code needed to be backported.
Did this now, and the tests run without issues now.

Revision history for this message
Steve Langasek (vorlon) wrote :

Thanks, this looks good! Pushed to oneiric-proposed.

description: updated
Changed in apt (Ubuntu Oneiric):
status: Triaged → In Progress
assignee: nobody → Steve Langasek (vorlon)
Steve Langasek (vorlon)
Changed in ubuntu-release-notes:
importance: Undecided → High
Revision history for this message
Jean-Louis Dupond (dupondje) wrote :

Patch with changes from 0.8.16~exp5ubuntu13.1 also included.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 850264] Re: given a foreign architecture of i386 on amd64 machine, and an outdated libc, apt tries to remove libc-bin

On Tue, Apr 17, 2012 at 12:54:05PM -0000, Jean-Louis Dupond wrote:
> Patch with changes from 0.8.16~exp5ubuntu13.1 also included.

I'd appreciate it if you could provide an incremental patch against the
previous 13.3 upload.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Revision history for this message
Steve Langasek (vorlon) wrote :

Documented at https://wiki.ubuntu.com/PrecisePangolin/ReleaseNotes/CommonInfrastructure:
 * If you have i386 packages installed an an amd64 system in Ubuntu 11.10, it is strongly recommended that you install the versions of apt and dpkg from oneiric-updates before upgrading. A number of multiarch-affecting upgrade issues have been fixed in those versions. (Bug:850264, Bug:902603)

Changed in ubuntu-release-notes:
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Hello Clint, or anyone else affected,

Accepted apt into oneiric-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in apt (Ubuntu Oneiric):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
karl anliot (kanliot) wrote :

uh how exactly would i test the fix?

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 850264] Re: given a foreign architecture of i386 on amd64 machine, and an outdated libc, apt tries to remove libc-bin

On Wed, Apr 18, 2012 at 07:07:22PM -0000, karl anliot wrote:
> uh how exactly would i test the fix?

Instructions for testing the fix are given in the bug description.

Revision history for this message
karl anliot (kanliot) wrote :

performed tests 1 and 2, but on step 3, the upgrade succeeded. No sense continuing the test.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Oneiric:
I have reproduced the problem with apt 0.8.16~exp5ubuntu13.2 in oneiric-updates and have verified that the version of apt 0.8.16~exp5ubuntu13.3 in -proposed fixes the issue.

Marking as verification-done

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

This bug was fixed in the package apt - 0.8.16~exp5ubuntu13.3

---------------
apt (0.8.16~exp5ubuntu13.3) oneiric-proposed; urgency=low

  [ Jean-Louis Dupond ]
  * Backport fixes from precise verison of apt, to fix multiarch upgrades
    from oneiric.
  * apt-pkg/depcache.cc:
    - prefer native providers over foreigns even if the chain is foreign.
      (LP: #850264)
  * cmdline/apt-get.cc:
    - ignore foreign architectures if we check if a provides has only one
      resolver as it's basically the same for the user, so no need to choose.
  * apt-pkg/deb/deblistparser.cc:
    - M-A: foreign packages provide for other archs, too

  [ Colin Watson ]
  * Include 0.8.16~exp5ubuntu13.1 patches.
  * apt-pkg/algorithms.cc: Iterate Breaks the same way as Conflicts, so that
    we resolve virtual package Breaks more effectively (LP: #922485).
  * apt-pkg/algorithms.{cc,h}: Use an int to represent resolver scores, not
    a signed short, because large upgrades can result in an overflow for
    core packages (LP: #917173).
 -- Jean-Louis Dupond <email address hidden> Tue, 17 Apr 2012 14:43:00 +0200

Changed in apt (Ubuntu Oneiric):
status: Fix Committed → Fix Released
Revision history for this message
vignesh (vignesh-sarma) wrote :

hi,

I have seen this occure in the released version of ubuntu 12.04,

has the fix happened after, the release?If it has its still not working.. else, please tell me ...

Revision history for this message
Steve Langasek (vorlon) wrote :

On Thu, Apr 26, 2012 at 11:41:46AM -0000, vignesh wrote:
> I have seen this occure in the released version of ubuntu 12.04,

You almost certainly haven't seen this bug in 12.04. Please attach apt logs
showing what it was you did run into.

Revision history for this message
Phill Whiteside (phillw) wrote :
Download full text (11.9 KiB)

The release notes all state that you must update the installers before
upgrading. That's why we have release notes :)

Regards,

Phill.

On 26 April 2012 17:11, vignesh <email address hidden> wrote:

> hi,
>
> I have seen this occure in the released version of ubuntu 12.04,
>
> has the fix happened after, the release?If it has its still not
> working.. else, please tell me ...
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (904840).
> https://bugs.launchpad.net/bugs/850264
>
> Title:
> given a foreign architecture of i386 on amd64 machine, and an outdated
> libc, apt tries to remove libc-bin
>
> Status in Release Notes for Ubuntu:
> Fix Released
> Status in “apt” package in Ubuntu:
> Fix Released
> Status in “apt” source package in Oneiric:
> Fix Released
> Status in “apt” source package in Precise:
> Fix Released
>
> Bug description:
> SRU justification: a bug in apt's resolver causes apt to select
> pathological upgrade solutions when foreign-arch packages are
> installed. This affects a substantial proportion of amd64 users, who
> will have multiarch enabled (e.g., for ia32-libs or for skype). This
> fix allows apt to calculate the upgrade correctly, preferring native
> packages over foreign ones whenever possible.
>
> TEST CASE:
> 1) on an oneiric amd64 system, install the skype:i386 package from the
> Canonical Partner repository.
> 2) attempt a release upgrade to precise with update-manager -d.
> 3) verify that the release upgrade failed, with errors in apt.log
> indicating involvement of :i386 packages
> 4) install the apt from oneiric-proposed
> 5) attempt the release upgrade a second time
> 6) verify that the release upgrade completes successfully.
>
> RELEASE NOTES: although users will generally have -updates installed
> already before they begin the upgrade, this particular issue has
> enough of an impact on the upgrade for amd64 desktop users that I
> think it's worth singling out in the release notes telling users that
> they need to use the apt from -updates. (I'm assuming here that we
> won't have time to enforce this through update-manager prior to
> release.)
>
> This reproducer was verified to work in the live system of current
> precise-dailies. It doesn't work on an installed system where
> libc6:i386 is already installed!
>
> 1. Drop libc6-dev:
> sudo dpkg -P libc6-dev
>
> 2. Downgrade to a previous libc:
>
> wget
> https://launchpad.net/ubuntu/+source/eglibc/2.13-20ubuntu9/+build/2979954/+files/libc-bin_2.13-20ubuntu9_amd64.deb
> https://launchpad.net/ubuntu/+source/eglibc/2.13-20ubuntu9/+build/2979954/+files/libc6_2.13-20ubuntu9_amd64.deb
> sudo dpkg -i libc*.bin
>
> 3. Ensure apt is consistent:
>
> sudo apt-get install -f
>
> should not complain about anything.
>
> 4. Install i386 package:
>
> sudo apt-get install cpp:i386
>
> This will propose to remove libc-bin and install the newer version
> of libc-bin:i386 instead.
>
> It seems that apt prefers install the foreign arch libc6-bin:i386 over
> upgrading the native arch libc6-bin to the current version?
>
> WORKAROUND
> If you get this bug with Pre...

Revision history for this message
ill (illumilore) wrote :
Download full text (7.6 KiB)

This is happening in 12.04. The instructions above do not work. Is there another way to fix this?

$ sudo dpkg -P libc6-dev
dpkg: dependency problems prevent removal of libc6-dev:
 ruby1.8-dev depends on libc6-dev.
 libfreetype6-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libgnutls-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 liblircclient-dev depends on libc6-dev.
 libcdio-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 zlib1g-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libtiff4-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 comerr-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 build-essential depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libcdio-cdda-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libcurl4-gnutls-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 nvidia-current depends on libc6-dev.
 libc6-dev-i386 depends on libc6-dev (= 2.13-20ubuntu5.1).
 libxft-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libslang2-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libimlib2-dev depends on libc6-dev.
 libstdc++6-4.6-dev depends on libc6-dev (>= 2.13-0ubuntu6).
 libasound2-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libaudiofile-dev depends on libc6-dev.
 lsb-core depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be removed.
 libgcrypt11-dev depends on libc6-dev | libc-dev; however:
  Package libc6-dev is to be removed.
  Package libc-dev is not installed.
  Package libc6-dev which provides libc-dev is to be r...

Read more...

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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