Crash installing packages using debconf

Bug #1722185 reported by errors.ubuntu.com bug bridge
220
This bug affects 36 people
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
High
Robert Ancell
Bionic
Fix Released
High
Robert Ancell

Bug Description

[Impact]
Installing .deb package via PackageKit (e.g. using GNOME Software) don't work reliably when the packages use debconf. This is due to a faulty implementation of debconf handling in PackageKit.

[Test Case]
1. Download opera deb file from opera.com
2. Run the file to launch gnome-software
3. Install it
4. Proceed with the debconf prompt

Expected result:
A debconf dialog appears asking if you want to "update Opera with the rest of the system?". The dialog closes when completed and the package is installed.

Actual result:
The dialog shows, but never closes and becomes unresponsive. Force closing the dialog causes a crash.

[Regression Potential]
The change is quite large, so there is a reasonable chance of introducing new bugs in debconf handling. However, the existing code has some obviously wrong codepaths, so the new code is probably a lower risk than the existing code.

Crash reports:
https://errors.ubuntu.com/problem/f111546905209e7288c7f8ba5f8f19eea4d97bad

Revision history for this message
Sebastien Bacher (seb128) wrote :

That's a bit similar to bug #1724248, doesn't have many reports at the moment so setting as low

Changed in gnome-software (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-software (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Robert, that's one of the top 17.10 errors, could you have a look?

Changed in gnome-software (Ubuntu):
importance: Low → High
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: gnome-software (11) g_io_channel_shutdown → pk_client_helper_copy_stdout_cb → g_main_dispatch → g_main_context_dispatch → g_main_context_iterate

Top gnome-software error on bionic.

summary: - /usr/bin/gnome-
- software:11:g_io_channel_shutdown:pk_client_helper_copy_stdout_cb:g_main_dispatch:g_main_context_dispatch:g_main_context_iterate
+ gnome-software (11) g_io_channel_shutdown →
+ pk_client_helper_copy_stdout_cb → g_main_dispatch →
+ g_main_context_dispatch → g_main_context_iterate
tags: added: bionic rls-bb-incoming
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

it's similar to bug 1724247 and 2 report mention that it happened during installation of opera and wireshark which both show debconf prompts during installation.

Changed in gnome-software (Ubuntu):
importance: High → Critical
Revision history for this message
Will Cooke (willcooke) wrote :
tags: removed: rls-bb-incoming
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in packagekit (Ubuntu Bionic):
status: New → Confirmed
Changed in packagekit (Ubuntu):
status: New → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Seems to be an issue in PackageKit - it doesn't unregister callbacks when the PkClientHelper object is finalized.

no longer affects: gnome-software (Ubuntu)
no longer affects: gnome-software (Ubuntu Bionic)
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Robert Ancell (robert-ancell) wrote :

I can still reproduce after the above change, but that does fix some possibly related errors.

I can reproduce reliably, as it seems to be due to the debconf-communicate window not closing for some reason. The shell prompts you to force quit, and clicking that is causing packagekit-glib (and thus gnome-software) to crash.

Changed in packagekit (Ubuntu):
importance: Undecided → High
Changed in packagekit (Ubuntu Bionic):
importance: Undecided → High
status: Confirmed → In Progress
Changed in packagekit (Ubuntu):
status: Confirmed → In Progress
Changed in packagekit (Ubuntu Bionic):
status: In Progress → Triaged
Changed in packagekit (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in packagekit (Ubuntu Bionic):
assignee: nobody → Robert Ancell (robert-ancell)
summary: - gnome-software (11) g_io_channel_shutdown →
- pk_client_helper_copy_stdout_cb → g_main_dispatch →
- g_main_context_dispatch → g_main_context_iterate
+ Crash installing packages using debconf
description: updated
Changed in packagekit (Ubuntu Bionic):
status: Triaged → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Since the proposed changes are quite big and seem a bit intrusive, I would appreciate a Regression Potential analysis as per our SRU guidelines. I would like to know where we could expect regressions after this change lands in the stable series.

Also, even though this does seem to be like a frequently-seen crash for both bionic and artful, I wouldn't want to jam it into the stable series too hastily. I see the second PackageKit pull request has not yet been approved by upstream - could we get someone reviewing it and merging before we proceed? Normally I'd also wait for cosmic to migrate, but I actually see we're only blocked on the armhf tests not being run - so it seems to be fine so far.

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

This bug was fixed in the package packagekit - 1.1.10-1ubuntu1

---------------
packagekit (1.1.10-1ubuntu1) cosmic; urgency=medium

  * debian/patches/0001-De-register-callbacks-on-PkClientHelper-finalize.patch:
  * debian/patches/0001-Fix-issues-with-debconf-helper-not-working.patch:
    - Fix debconf interaction (LP: #1722185)

 -- Robert Ancell <email address hidden> Mon, 21 May 2018 15:13:02 +1200

Changed in packagekit (Ubuntu):
status: In Progress → Fix Released
description: updated
Revision history for this message
Robie Basak (racb) wrote :

> I see the second PackageKit pull request has not yet been approved by upstream - could we get someone reviewing it and merging before we proceed?

I think the SRU remains blocked on this question?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Merged upstream

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

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

Accepted packagekit into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/packagekit/1.1.9-1ubuntu2.18.04.1 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in packagekit (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Bionic:
I have reproduced the problem with packagekit 1.1.9-1ubuntu2 in bionic and have verified that the version of packagekit 1.1.9-1ubuntu2.18.04.1 in -proposed fixes the issue.

Marking as verification-done

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Were packages other than opera and which use debconf tested to ensure there are no regressions?

Revision history for this message
Julian Andres Klode (juliank) wrote :

I think I played with some more, but essentially the current code is just severely broken, even if there are regressions somewhere, they'd be less severe than the current state.

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

This bug was fixed in the package packagekit - 1.1.9-1ubuntu2.18.04.1

---------------
packagekit (1.1.9-1ubuntu2.18.04.1) bionic; urgency=medium

  * debian/patches/0001-De-register-callbacks-on-PkClientHelper-finalize.patch:
  * debian/patches/0001-Fix-issues-with-debconf-helper-not-working.patch:
    - Fix debconf interaction (LP: #1722185)

 -- Robert Ancell <email address hidden> Mon, 21 May 2018 14:39:14 +1200

Changed in packagekit (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update 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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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