package installation failure during partial upgrade reports crash against ubuntu-release-upgrader

Bug #1302380 reported by Jean-Baptiste Lallement
26
This bug affects 3 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I did a partial upgrade (update-manager -d) with a broken package (isc-dhcp-client) and it triggered this crash report.

As a consequence:
1. Package installation failures are reported against the wrong package
2. errors on error.u.c are grouped in the same bucket, without any information about the origin of the failure making them useless
e.g https://errors.ubuntu.com/problem/46463809739f8320957064ebeaa7f9abc1bd8fa4
the traceback is simply:
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)

The expected behaviour is to generate a crash report directly for the right package.

ProblemType: Crash
DistroRelease: Ubuntu 14.04
Package: ubuntu-release-upgrader-core 1:0.219.2
ProcVersionSignature: Ubuntu 3.13.0-20.42-generic 3.13.7
Uname: Linux 3.13.0-20-generic x86_64
ApportVersion: 2.14-0ubuntu1
Architecture: amd64
CrashDB: ubuntu
Date: Fri Apr 4 09:15:46 2014
DuplicateSignature: SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)
ExecutablePath: /usr/bin/do-release-upgrade
InterpreterPath: /usr/bin/python3.4
PackageArchitecture: all
ProcCmdline: /usr/bin/python3 /usr/lib/ubuntu-release-upgrader/do-partial-upgrade --frontend=DistUpgradeViewGtk3
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_US.UTF-8
 LANGUAGE=en_US
 PATH=(custom, no user)
PythonArgs: ['/usr/bin/do-release-upgrade', '--frontend=DistUpgradeViewGtk3']
SourcePackage: ubuntu-release-upgrader
Title: do-release-upgrade crashed with SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)
Traceback: SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1), E:Sub-process /usr/bin/dpkg returned an error code (1)
UpgradeStatus: Upgraded to trusty on 2012-01-31 (793 days ago)
UserGroups:

Related branches

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
description: updated
information type: Private → Public
tags: removed: need-duplicate-check
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → Medium
summary: - do-release-upgrade crashed with SystemError: E:Sub-process /usr/bin/dpkg
- returned an error code (1), E:Sub-process /usr/bin/dpkg returned an
- error code (1)
+ package installation failure during partial upgrade reports crash
+ against ubuntu-release-upgrader
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

Wow, this is quite the mess.

VarLogDistupgradeMainLog.txt covers a distribution upgrade done on 2012-02-01, and I believe that is where the Traceback comes from:

2012-02-01 00:11:43,511 ERROR not handled exception:
SystemError: E:Sub-process /usr/bin/dpkg returned an error code (1)

Then in VarLogDistupgradeApttermlog.txt we have:

var/lib/dpkg/tmp.ci/preinst: 17: /var/lib/dpkg/tmp.ci/preinst: Syntax error: "fi" unexpected (expecting "then")^M
dpkg: error processing archive /var/cache/apt/archives/isc-dhcp-client_4.2.4-7ubuntu10_amd64.deb (--unpack):^M
 subprocess new pre-installation script returned error exit status 2^M
Errors were encountered while processing:^M
 /var/cache/apt/archives/isc-dhcp-client_4.2.4-7ubuntu10_amd64.deb^M

I would have expected that to start the apport_pkgfailure routine in DistUpgradeApport.py, but it does not seem to have.

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

Looking on one of my systems I see the following in /var/log/dist-upgrade/.

-rw-r--r-- 1 root root 47K Mar 18 08:53 apt.log
-rw-r----- 1 root adm 902K Mar 18 08:53 apt-term.log
-rw-r--r-- 1 root root 181K Mar 18 08:53 history.log
-rw-r--r-- 1 root root 2.1K Feb 7 13:41 lspci.txt
-rw-r--r-- 1 root root 79K Feb 7 17:00 main.log
-rw-r--r-- 1 root root 15M Jan 31 09:04 screenlog.0
-rw-r--r-- 1 root root 0 Feb 7 13:41 term.log

It looks like main.log is leftover from a dist-upgrade and apt-term.log is from a partial dist upgrade on the March 18th. The first part of fixing this will be ensuring that partial upgrades properly clean up log files in /var/log/dist-upgrade/.

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

As far as I can tell this is because do-partial-upgrade calls doPartialUpgrade() from DistUpgradeController.py which doesn't use any of DistUpgradeMain.py - particularly setup_logging.

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

I've linked a branch to this bug report that worked for me although /var/log/dist-upgrade/main.log ended up being empty. I'd prefer someone else have a look at it though.

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

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

---------------
ubuntu-release-upgrader (1:14.10.2) utopic; urgency=low

  * debian/test/control:
    - add missing pep8 test dependency
  * tests/test_xorg_fix_intrepid.py:
    -
 -- Michael Vogt <email address hidden> Sat, 03 May 2014 08:37:51 +0200

Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → Fix Released
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.