Saucy -> Trusty upgrade failed: procps fails to configure

Bug #1347721 reported by Erick Brunzell on 2014-07-23
168
This bug affects 27 people
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Critical
Michael Vogt
Saucy
High
Michael Vogt
Trusty
High
Brian Murray
Utopic
Critical
Michael Vogt

Bug Description

Test Case:
1. Install Saucy + the task ubuntu-dekstop^
2. Upgrade with do-release-upgrade

Result:
Upgrade fails with:
Setting up libprocps3:i386 (1:3.3.9-1ubuntu2) ...
dpkg: dependency problems prevent configuration of procps:
 procps depends on initscripts; however:
  Package initscripts is not configured yet.

dpkg: error processing package procps (--configure):
 dependency problems - leaving unconfigured

== Original Description ==
I'm just performing 14.04.1 pre-release testing and decided to try a Saucy -> Trusty upgrade even though Saucy recently reached EOL. I'd expected to be told no upgrade was available (or was impossible) early in the process if it were not possible at this point in time but the upgrade appeared to be in progress until the attached warning appeared (I'd guess about half-way into the upgrade process based on lapsed time) .

No idea what will happen on reboot so I wanted to file this prior to reboot. I'll follow up later.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: ubuntu-release-upgrader-core 1:0.220.2
ProcVersionSignature: Ubuntu 3.11.0-26.45-generic 3.11.10.12
Uname: Linux 3.11.0-26-generic i686
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: i386
CrashDB: ubuntu
CurrentDesktop: GNOME
Date: Wed Jul 23 09:03:39 2014
InstallationDate: Installed on 2014-07-17 (5 days ago)
InstallationMedia: Ubuntu-GNOME 13.10 "Saucy Salamander" - Release i386 (20131015)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to trusty on 2014-07-23 (0 days ago)
VarLogDistupgradeTermlog:

Erick Brunzell (lbsolost) wrote :
Erick Brunzell (lbsolost) wrote :

This is the message displayed at the very end.

Ubuntu QA Website (ubuntuqa) wrote :

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/1347721

tags: added: iso-testing
Erick Brunzell (lbsolost) wrote :

It does boot, looks like Trusty running a Saucy kernel:

lance@lance-desktop:~$ uname -a
Linux lance-desktop 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:04:15 UTC 2014 i686 i686 i686 GNU/Linux
lance@lance-desktop:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

Andy Whitcroft (apw) wrote :

I found that it did not reboot as expected at the end, but when rebooted the system as found was upgraded and viable. Both on 32 and 64 bit.

Erick Brunzell (lbsolost) wrote :

I'm trying to figure out an unrelated release-upgrade bug and stumbled upon bug #1310411 where the kernel did not upgrade - possible duplicate?

Jean-Baptiste Lallement (jibel) wrote :

Error from term.log

Setting up libprocps3:i386 (1:3.3.9-1ubuntu2) ...
dpkg: dependency problems prevent configuration of procps:
 procps depends on initscripts; however:
  Package initscripts is not configured yet.

dpkg: error processing package procps (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of udev:
 udev depends on procps; however:
  Package procps is not configured yet.

dpkg: error processing package udev (--configure):
 dependency problems - leaving unconfigured

Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
status: New → Confirmed
summary: - Ubuntu GNOME Saucy -> Trusty upgrade displays failure warning
+ Saucy -> Trusty upgrade failed: procps fails to configure
Changed in ubuntu-release-upgrader (Ubuntu):
importance: High → Critical
assignee: nobody → Canonical Foundations Team (canonical-foundations)
description: updated
Steve Langasek (vorlon) wrote :

The jenkins log shows packages being configured out of order:

Preparing to unpack .../initscripts_2.88dsf-41ubuntu6_amd64.deb ...
Unpacking initscripts (2.88dsf-41ubuntu6) over (2.88dsf-41ubuntu3) ...
[...]
dpkg: dependency problems prevent configuration of procps:
 procps depends on initscripts; however:
  Package initscripts is not configured yet.

dpkg: error processing package procps (--configure):
 dependency problems - leaving unconfigured
[...]

So this probably points to an apt bug. Michael, can you take a look?

affects: ubuntu-release-upgrader (Ubuntu) → apt (Ubuntu)
Changed in apt (Ubuntu):
assignee: Canonical Foundations Team (canonical-foundations) → Michael Vogt (mvo)
Michael Vogt (mvo) wrote :

I just tried to reproduce it locally without much success, I try again tomorrow.

Michael Vogt (mvo) wrote :

It seems like the issue is the following:

There is a dependency loop mountall->udev->procps->initscripts->mountall. When apt tries to deal with it, it configures them all initially together, then it finds the "libplymouth4" dependency of mountall that is not unpacked yet and inserts the unpack at this point wich breaks the condition that all packages in the loop need to be unpacked at the same time.

        Unpacking mountall:i386 to avoid loop initscripts:i386 Depends on mountall [ i386 ] < 2.53 -> 2.54build1 > ( admin ) (>= 2.28)
          SmartUnPack mountall:i386 (replace version 2.53 with 2.54build1) immediately
          PreDepends order for mountall:i386
          Found ok package dpkg:i386
            SmartConfigure mountall:i386 (2.54build1)
            Unpacking udev:i386 to avoid loop mountall:i386 Depends on udev [ i386 ] < 204-10ubuntu1 -> 208-6ubuntu2 > ( admin )
              SmartUnPack udev:i386 (replace version 204-10ubuntu1 with 208-6ubuntu2) immediately
              PreDepends order for udev:i386
              Found ok package debconf:i386
                SmartConfigure udev:i386 (208-6ubuntu2)
                Unpacking procps:i386 to avoid loop udev:i386 Depends on procps [ i386 ] < 1:3.3.9-1ubuntu2 -> 1:3.3.9-1ubuntu5 > ( admin )
                  SmartUnPack procps:i386 (replace version 1:3.3.9-1ubuntu2 with 1:3.3.9-1ubuntu5) immediately
                    SmartConfigure procps:i386 (1:3.3.9-1ubuntu5)
                    Unpacking libprocps3:i386 to avoid loop procps:i386 Depends on libprocps3 [ i386 ] < 1:3.3.9-1ubuntu2 -> 1:3.3.9-1ubuntu5 > ( libs )
                      SmartUnPack libprocps3:i386 (replace version 1:3.3.9-1ubuntu2 with 1:3.3.9-1ubuntu5) immediately
                      PreDepends order for libprocps3:i386
                      Found ok package multiarch-support:i386
                        SmartConfigure libprocps3:i386 (1:3.3.9-1ubuntu5)
                    Configure already unpacked initscripts [ i386 ] < 2.88dsf-41ubuntu6 -> 2.88dsf-41ubuntu16 > ( admin )
                      SmartConfigure initscripts:i386 (2.88dsf-41ubuntu16) (Only Correct Dependencies)
                    Configure already unpacked initscripts [ i386 ] < 2.88dsf-41ubuntu6 -> 2.88dsf-41ubuntu16 > ( admin )
                      SmartConfigure initscripts:i386 (2.88dsf-41ubuntu16) (Only Correct Dependencies)
            Unpacking libplymouth4:i386 to avoid loop mountall:i386 Depends on libplymouth4 [ i386 ] < none -> 0.9.0-0ubuntu2 > ( libs ) (>= 0.8.1-3)
              SmartUnPack libplymouth4:i386 (install version 0.9.0-0ubuntu2) immediately
              PreDepends order for libplymouth4:i386
              Found ok package multiarch-support:i386
                SmartConfigure libplymouth4:i386 (0.9.0-0ubuntu2)

Michael Vogt (mvo) wrote :

I bisected this now (as the precise apt did not trigger the bug in the chroot) and it it appears to be caused by: 42d51f333e8ef522fed02cdfc48663488d56c3a3

Michael Vogt (mvo) wrote :

And I just verified that the commit before the offending one (66706285) fully works and upgrades the system correctly. The immediate-configure property is also better honored.

Michael Vogt (mvo) wrote :

This diff works for me:

diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index 393f836..57d4b5a 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -406,6 +406,12 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int
               if (Cache[DepPkg].InstallVer != *I || List->IsNow(DepPkg) == fals
                  continue;

+ // only packages that are in the unpacked state may need
+ // configure so ignore anything that is not currently
+ // unpacked
+ if (List->IsFlag(DepPkg,pkgOrderList::UnPacked) == false)
+ continue;
+
               if (PkgLoop == true)
               {
                  if (Debug)
---

Changed in apt (Ubuntu):
status: Confirmed → In Progress
Michael Vogt (mvo) wrote :

Hm, now that saucy is closed, how can I upload a updated apt into saucy-updates that contains the fix?

tags: added: patch
Michael Vogt (mvo) wrote :

Some more work is needed fo the patch, its eliminating too many case. But the direction is there, the SmartConfigure() is currently trying to configure too much too early when its not really needed.

Michael Vogt (mvo) wrote :

A improved version of the patch, I tested it with:

- precise build chroot -> trusty
- saucy build chroot -> trusty
- trusty build chroot -> utopic (2014-07-29)

and it worked for those cases correctly.

The bug was that apt tried to SmartUnPack packages that were dependencies but did not need action just yet (i.e. where the dependencies of the installed version are fine now and the unpack/configure of the updated version would be hapen in a later stages of the ordering).

Michael Vogt (mvo) wrote :

I also did a precise->trusty->utopic upgrade cycle with the patch (the precise base that triggered #1347964 before) and again all good.

Michael Vogt (mvo) on 2014-07-29
Changed in apt (Ubuntu Trusty):
assignee: nobody → Michael Vogt (mvo)
milestone: none → ubuntu-14.04.2
importance: Undecided → High
status: New → In Progress
status: In Progress → Triaged
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.0.4ubuntu6

---------------
apt (1.0.4ubuntu6) utopic; urgency=low

  * apt-pkg/packagemanager.cc:
    - fix incorrect configure ordering in the SmartConfigure step
      by skiping packages that do not need immediate action
      (LP: #1347721)
 -- Michael Vogt <email address hidden> Tue, 29 Jul 2014 11:46:18 +0200

Changed in apt (Ubuntu Utopic):
status: In Progress → Fix Released
Jim Fenton (fenton-1) wrote :

For those of us who have been affected by the bug, it would be good to have guidance on whether we need to do a clean install of 14.04 or if there's some other action that should be taken. As some others have reported, my system seems to be working properly, but would like to know if there's some inconsistency I'm not seeing.

Brian Murray (brian-murray) wrote :

@Jim - its hard to know with our more information from you. Did you upgrade from 12.04 or from 13.10? How did you go about working around the upgrade failure?

Hello Erick, or anyone else affected,

Accepted apt into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/apt/0.9.9.1~ubuntu3.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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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!

tags: added: verification-needed
Changed in apt (Ubuntu Saucy):
status: New → Fix Committed
assignee: nobody → Michael Vogt (mvo)
importance: Undecided → High
Jim Fenton (fenton-1) wrote :

@Brian - I updated from 13.10. All I did to recover was wait for the aborted upgrade to complete or recover, and rebooted my system, and it claims to be running 14.04 now. The only thing that seemed potentially funny was a message, "error: diskfilter writes are not supported" when I booted it. Someone (I think in one of the duplicate bugs) mentioned that rebooting was successful on both 32-bit and 64-bit processors.

@Adam - would love to test it but I no longer have a Saucy system to test it on unless I need to restore from backup, which I'm hoping isn't necessary.

Erick Brunzell (lbsolost) wrote :

@Adam, I'm installing Saucy now - will follow up ASAP.

@Jim, be sure to check and see what kernel you're now running via uname -r as I did in comment #4. As best I recall I seemed to be able to recover simply by running update-grub and apt-get -f install (and following suggestions provided by -f install), possibly a few times until things appeared to resolve. But I was using a test installation that was long since erased.

Erick Brunzell (lbsolost) wrote :

Installed and updated Saucy, enabled proposed, and ran apt-get install apt:

Start-Date: 2014-08-11 23:15:49
Commandline: apt-get install apt
Upgrade: apt:i386 (0.9.9.1~ubuntu3.2, 0.9.9.1~ubuntu3.3), libapt-pkg4.12:i386 (0.9.9.1~ubuntu3.2, 0.9.9.1~ubuntu3.3)
End-Date: 2014-08-11 23:16:02

Then disabled proposed, refreshed the cache using update-manager and was offered the upgrade via GUI so I proceeded and all went perfectly so I'm marking this verification-done.

Many thanks.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.9.9.1~ubuntu3.3

---------------
apt (0.9.9.1~ubuntu3.3) saucy-proposed; urgency=low

  * apt-pkg/packagemanager.cc:
    - fix incorrect configure ordering in the SmartConfigure step
      by skiping packages that do not need immediate action
      (LP: #1347721)
 -- Michael Vogt <email address hidden> Tue, 29 Jul 2014 21:37:01 +0200

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

Changed in apt (Ubuntu Trusty):
milestone: ubuntu-14.04.2 → ubuntu-14.04.4
Brian Murray (brian-murray) wrote :

This was never fixed in Trusty and has manifested itself as bug 1497688 when upgrading to Vivid. The test case for fixing this exists in the other bug.

Changed in apt (Ubuntu Trusty):
status: Triaged → In Progress
assignee: Michael Vogt (mvo) → Brian Murray (brian-murray)

Hello Erick, or anyone else affected,

Accepted apt into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/apt/1.0.1ubuntu2.11 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 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 to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. 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 Trusty):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Brian Murray (brian-murray) wrote :

Verification done via the other bug report.

tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 1.0.1ubuntu2.11

---------------
apt (1.0.1ubuntu2.11) trusty; urgency=medium

  * apt-pkg/packagemanager.cc:
    - fix incorrect configure ordering in the SmartConfigure step by skipping
      packages that do not need immediate action. (LP: #1347721, #1497688)

 -- Brian Murray <email address hidden> Fri, 08 Jan 2016 16:09:22 -0800

Changed in apt (Ubuntu Trusty):
status: Fix Committed → Fix Released
To post a comment you must log in.