snapd doesn't upgrade on bionic when a local installed snap mount is failing

Bug #1758465 reported by Marco Trevisan (Treviño)
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Triaged
Medium
Unassigned

Bug Description

I installed a snap with 'try' some time ago when generating it, and then I never removed it.

However the actual snap doesn't exist anymore:
ls /var/lib/snapd/snaps/cool-retro-term* -l
lrwxrwxrwx 1 root root 36 feb 23 2017 /var/lib/snapd/snaps/cool-retro-term_x1.snap -> /tmp/cool-retro-term/packaging/prime
lrwxrwxrwx 1 root root 36 feb 23 2017 /var/lib/snapd/snaps/cool-retro-term_x2.snap -> /tmp/cool-retro-term/packaging/prime
lrwxrwxrwx 1 root root 36 feb 23 2017 /var/lib/snapd/snaps/cool-retro-term_x3.snap -> /tmp/cool-retro-term/packaging/prime

But now, snapd is failing when upgrading because it still tries to mount it.
I recognize this is a broken setup, but snapd installation should not hang because of this, but instead skip the mount.

Here's the log I've on apt:

Setting up snapd (2.32+18.04~pre6) ...
Starting snap-bucklespring-18.mount
Starting snap-bucklespring-23.mount
Starting snap-bucklespring-31.mount
Starting snap-cool\x2dretro\x2dterm-x1.mount
Job for snap-cool\x2dretro\x2dterm-x1.mount failed.
See "systemctl status "snap-cool\\x2dretro\\x2dterm-x1.mount"" and "journalctl -xe" for details.
dpkg: error processing package snapd (--configure):
 installed snapd package post-installation script subprocess returned error exit status 1
Processing triggers for libc-bin (2.27-0ubuntu2) ...
dpkg: dependency problems prevent configuration of ubuntu-core-launcher:
 ubuntu-core-launcher depends on snapd (= 2.32+18.04~pre6); however:
  Package snapd is not configured yet.

dpkg: error processing package ubuntu-core-launcher (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-snappy:No apport report written because the error message indicates its a followup error from a previous failure.
                   No apport report written because the error message indicates its a followup error from a previous failure.

 ubuntu-snappy depends on snapd; however:
  Package snapd is not configured yet.

dpkg: error processing package ubuntu-snappy (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of snapd-xdg-open:
 snapd-xdg-open depends on snapd (= 2.32+18.04~pre6); however:
  Package snapd is not configured yet.

dpkg: error processing package snapd-xdg-open (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-software-plugin-snap:
 gnome-software-plugin-snap depends on snapd; however:
  Package snapd is not configured yet.

dpkg: error processing package gnome-software-plugin-snap (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            Errors were encountered while processing:
 snapd
 ubuntu-core-launcher
 ubuntu-snappy
 snapd-xdg-open
 gnome-software-plugin-snap
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

of course removing the broken symlinks fixed the issue.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

There's some related work for better resiliency against unknown unknowns but it's not close to landing: https://github.com/snapcore/snapd/pull/7205

affects: snappy → snapd
Changed in snapd:
status: New → Triaged
importance: Undecided → Medium
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.