Cancelled installation of snap continues

Bug #1721762 reported by Jean-Baptiste Lallement
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-software (Ubuntu)
Zesty
Fix Released
Medium
Robert Ancell
snapd-glib (Ubuntu)
Fix Released
High
Robert Ancell
Artful
Won't Fix
High
Unassigned
Bionic
Fix Released
High
Robert Ancell

Bug Description

with core candidate: 16-2.28.1

Test Case
1. Install a snap package
2. When the installation is ongoing, press Cancel
3. Verify that installation stopped (snap changes then snap change ID)

Expected result
Installation is cancelled

Actual result
It continues in the background and gnome-software shows the wrong state

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: gnome-software 3.26.0-0ubuntu3
ProcVersionSignature: Ubuntu 4.13.0-12.13-generic 4.13.3
Uname: Linux 4.13.0-12-generic x86_64
ApportVersion: 2.20.7-0ubuntu2
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Fri Oct 6 13:38:01 2017
InstallationDate: Installed on 2014-07-23 (1170 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
InstalledPlugins:
 gnome-software-plugin-flatpak N/A
 gnome-software-plugin-limba N/A
 gnome-software-plugin-snap 3.26.0-0ubuntu3
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=fr_FR.UTF-8
 SHELL=/bin/bash
SourcePackage: gnome-software
UpgradeStatus: Upgraded to artful on 2017-06-13 (115 days ago)

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :
Will Cooke (willcooke)
Changed in gnome-software (Ubuntu Artful):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Can you confirm if this is an existing bug or something introduced with the new snapd/gnome-software?

Changed in gnome-software (Ubuntu Artful):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: [Bug 1721762] Re: Cancelled installation of snap continues

Le 10/10/2017 à 05:27, Robert Ancell a écrit :
> Can you confirm if this is an existing bug or something introduced with
> the new snapd/gnome-software?

This is an existing issue.

>
> ** Changed in: gnome-software (Ubuntu Artful)
> Status: New => Triaged
>
> ** Changed in: gnome-software (Ubuntu Artful)
> Importance: Undecided => High
>

--
Jean-Baptiste Lallement
irc: jibel

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

Turns out we cancel the request in snapd-glib, but don't actually send the cancel to snapd - this means that snapd never stops the install.

Changed in gnome-software (Ubuntu Artful):
status: Triaged → In Progress
Revision history for this message
Robert Ancell (robert-ancell) wrote :

snapd-glib 1.24 now sends the cancel to snapd, however if you are using a Polkit enabled snapd this method doesn't work through Polkit. This causes an Ubuntu One dialog to pop up if not logged in.

This should be fixed in snapd so that cancels can occur the same way as install/remove.

Changed in snapd-glib (Ubuntu Bionic):
status: New → Fix Committed
Changed in snapd-glib (Ubuntu Artful):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in snapd-glib (Ubuntu Bionic):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → High
Changed in snapd-glib (Ubuntu Artful):
importance: Undecided → High
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapd-glib - 1.24-0ubuntu1

---------------
snapd-glib (1.24-0ubuntu1) bionic; urgency=medium

  * New upstream release:
    - Fix QSnapd::install() not working async.
    - Move Qt enums to an enum class and rename to avoid collisions (API break).
    - Fix multiple async operations not working at the same time. (LP: #1722183)
    - When async requests are cancelled abort change in snapd. (LP: #1721762)
    - Connect to snapd on demand. (LP: #1723874)
    - Add ability to set snapd socket to connect to.
    - Add support for channels.
    - Fix runtime assertion when snapd socket is NULL.
    - Fix sudoer flag not being correctly set for create-user.
    - Make clients using provided sockets non-blocking.
    - Don't install snapd-qt.pc if not compiling snapd-qt.
  * debian/libsnapd-glib1.symbols:
  * debian/libsnapd-qt1.symbols:
    - Updated

 -- Robert Ancell <email address hidden> Thu, 26 Oct 2017 12:40:05 +1300

Changed in snapd-glib (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in snapd-glib (Ubuntu Artful):
status: New → Fix Committed
no longer affects: gnome-software (Ubuntu Bionic)
no longer affects: snapd-glib (Ubuntu Zesty)
no longer affects: snapd-glib (Ubuntu Xenial)
no longer affects: gnome-software (Ubuntu Artful)
Changed in gnome-software (Ubuntu Zesty):
status: New → Fix Committed
Changed in gnome-software (Ubuntu Xenial):
status: New → Fix Committed
no longer affects: gnome-software (Ubuntu)
Changed in gnome-software (Ubuntu Xenial):
importance: Undecided → Medium
Changed in gnome-software (Ubuntu Zesty):
importance: Undecided → Medium
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu Xenial):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Note the UI didn't support cancelling in Xenial.

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

This change requires snapd 2.29. I confirmed it works using ppa:snappy-dev/edge (snapd 2.29.3+git452.7da6b40~ubuntu17.10.1)

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Jean-Baptiste, or anyone else affected,

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

tags: added: verification-needed verification-needed-zesty
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Zesty:
I have reproduced the problem with gnome-software 3.22.7-0ubuntu3.17.04.7 in zesty-updates and have verified that the version of gnome-software 3.22.7-0ubuntu3.17.04.8 in -proposed fixes the issue. Although when several snaps are installed at the same time and the first snap being installed is cancelled it is the second snap that is cancelled.

Marking as verification-done

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

This bug was fixed in the package gnome-software - 3.22.7-0ubuntu3.17.04.8

---------------
gnome-software (3.22.7-0ubuntu3.17.04.8) zesty; urgency=medium

  * debian/patches/0001-snap-Protect-store-cache-with-a-lock.patch:
    - Fix crash due to multiple threads accessing a cache (LP: #1716633)
  * debian/patches/0001-snap-Don-t-attempt-to-refine-snaps-without-a-valid-n.patch:
    - Fix potential crash from invalid snaps
  * debian/patches/0001-snap-Fix-leak-of-GsApp.patch:
    - Fix small memory leak
  * debian/patches/0001-snap-Only-show-snaps-as-sandboxed-if-snapd-supports-.patch:
    - Simple patch added to make above patches apply cleanly
  * debian/patches/0001-snap-Cancel-snapd-transaction-when-install-remove-ca.patch:
  * debian/patches/0001-snap-Generate-correct-error-for-cancelled-operations.patch:
    - Abort change in snapd when install/remove cancelled (LP: #1721762)
  * debian/patches/0022-snap-Use-new-Polkit-API.patch:
    - Send Polkit interactive header (LP: #1736232)
  * debian/patches/0023-snap-Support-new-snapd-license-field.patch
    - Show license field (not yet supported by Ubuntu Store / snaps)
  * debian/patches/0024-Use-the-developer-name-if-set-in-preference-to-the-p.patch:
  * debian/patches/0025-snap-Use-developer-field.patch
    - Show snap developer (LP: #1715054)
  * debian/patches/0026-snap-Correct-the-app-origin.patch:
    - Set correct store name (LP: #1706500)

 -- Robert Ancell <email address hidden> Wed, 06 Dec 2017 10:37:25 +1300

Changed in gnome-software (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-software 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 snapd-glib (Ubuntu Artful):
assignee: Robert Ancell (robert-ancell) → nobody
Revision history for this message
Brian Murray (brian-murray) wrote :

Ubuntu 17.10 (Artful Aardvark) has reached end of life, so this bug will not be fixed for that specific release.

Changed in snapd-glib (Ubuntu Artful):
status: Fix Committed → Won't Fix
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.