Bug #1689820 reported by errors.ubuntu.com bug bridge on 2017-05-10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Martin Pitt

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding packagekit. This problem was most recently seen with package version 0.8.17-4ubuntu6~gcc5.4ubuntu1.1, the problem page at https://errors.ubuntu.com/problem/8c37a6988b890cc46b415972ef1e2ca746f9ffcc contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker you can request it at http://forms.canonical.com/reports/.

 * Impact: PackageKit immediately crashes in GetUpdateDetail()

 * Test case:
   - Be on a system (container, VM, or real iron) with at least one upgradeable package. If you don't have one, downgrade tzdata:
      sudo apt-get install tzdata=2016j-0ubuntu0.16.04
   - Run "pkcon get-updates" to see upgradeable packages.
   - Run "pkcon get-update-detail tzdata" (or for a different package).
   - Current PackageKit immediately crashes (message from pkcon and systemctl status packagekit), with this fix it should survive and show some data (changelog doesn't work though).

 * Regression potential: Update details are currently completely broken, so very little to regress there. As for dropping the browser plugin package: The current package stopped working long ago with current firefox; however, the package from xenial-release will still be around. All in all this shouldn't change anything visible.

 * Upstream fix: https://github.com/hughsie/PackageKit/commit/18c56fa52 (only the acqpkitstatus.cpp bit)

 * Downstream packaging change to drop browser plugin: https://anonscm.debian.org/git/pkg-packagekit/packagekit.git/commit/?id=b98a978322

Test packages: http://people.ubuntu.com/~pitti/packagekit-updatedetail-crash/

Martin Pitt (pitti) wrote :
Download full text (3.9 KiB)

This is quite simple to reproduce:

$ pkcon get-updates
Getting updates [=========================]
Loading cache [=========================]
Querying [=========================]
Finished [=========================]
Bug fix linux-generic- (xenial-updates) Complete Generic Linux kernel and headers
Bug fix linux-headers-generic- (xenial-updates) Generic Linux kernel headers
Bug fix linux-headers-virtual- (xenial-updates) Transitional package.
Bug fix linux-image-generic- (xenial-updates) Generic Linux kernel image
Bug fix linux-image-virtual- (xenial-updates) This package will always depend on the latest minimal generic kernel image.
Bug fix linux-virtual- (xenial-updates) Minimal Generic Linux kernel and headers

$ pkcon get-update-detail linux-image-virtual
Resolving [=========================]
Getting update details [=========================]
Loading cache [=========================]
Downloading packages [ ] (0%) The daemon crashed mid-transaction!

This doesn't seem to be specific to the particular package. If I downgrade tzdata

$ sudo apt-get install tzdata=2016d-0ubuntu0.16.04

and query that it crashes as well:

$ pkcon get-update-detail tzdata
Downloading packages [ ] (0%) The daemon crashed mid-transaction!

0x00007ffff23ad6d5 in AcqPackageKitStatus::updateStatus(pkgAcquire::ItemDesc&, int) ()
   from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
(gdb) bt
#0 0x00007ffff23ad6d5 in AcqPackageKitStatus::updateStatus(pkgAcquire::ItemDesc&, int) ()
   from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
#1 0x00007ffff23ad7d3 in AcqPackageKitStatus::Fail(pkgAcquire::ItemDesc&) ()
   from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
#2 0x00007ffff1b2bd96 in pkgAcquire::Worker::RunMessages() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
#3 0x00007ffff1b2d9dc in pkgAcquire::Worker::InFdReady() () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
#4 0x00007ffff1b2f1ba in pkgAcquire::RunFdsSane(fd_set*, fd_set*) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
#5 0x00007ffff1b32dd2 in pkgAcquire::Run(int) () from /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0
#6 0x00007ffff23b4be1 in downloadChangelog(AptCacheFile&, pkgAcquire&, pkgCache::VerIterator, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >) () from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
#7 0x00007ffff23c6888 in AptIntf::emitUpdateDetail(pkgCache::VerIterator const&) ()
   from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
#8 0x00007ffff23c73c5 in AptIntf::emitUpdateDetails(PkgList const&) ()
   from /usr/lib/x86_64-linux-gnu/packagekit-backend/libpk_backend_aptcc.so
#9 0x00007ffff23cbffd in ?? () from /usr/lib/...


Martin Pitt (pitti) wrote :

I confirmed that this is fixed in zesty.

Changed in packagekit (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

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

Changed in packagekit (Ubuntu Xenial):
status: New → Confirmed
Martin Pitt (pitti) wrote :

I found the fix and backported it to xenial. The SRU is complicated by the fact that packagekit is currently FTBFS due to recent firefox dropping NPAPI, thus the browser plugin cannot be built any more. I'll drop it.

Changed in packagekit (Ubuntu Xenial):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: Confirmed → In Progress
Martin Pitt (pitti) on 2017-08-08
description: updated
description: updated
description: updated

Hello errors.ubuntu.com, or anyone else affected,

Accepted packagekit into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/packagekit/0.8.17-4ubuntu6~gcc5.4ubuntu1.2 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!

Changed in packagekit (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Martin Pitt (pitti) wrote :

I ran the description's test case and confirm that the crash is now fixed. Furthermore, other operations like "pkcon refresh", "pkcon get-updates", "pkcon update", and "pkcon install bash-doc" all worked fine, as before.

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

This bug was fixed in the package packagekit - 0.8.17-4ubuntu6~gcc5.4ubuntu1.2

packagekit (0.8.17-4ubuntu6~gcc5.4ubuntu1.2) xenial; urgency=medium

  * Add fix-update-detail-crash.patch: Fix GetUpdateDetail() crashing
    immediately with aptcc. Backport fix from upstream commit 18c56fa520.
    (LP: #1689820)
  * Drop browser-plugin-packagekit binary package. It cannot be built any more
    as current firefox dropped NPAPI. Backported from Debian packaging git
    commit b98a97832275.

 -- Martin Pitt <email address hidden> Tue, 08 Aug 2017 13:00:44 +0000

Changed in packagekit (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for packagekit 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.

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

Other bug subscribers