removing snapd causes "crash" (report)

Bug #2015646 reported by Walter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi!

I just did this on my pristine fresh Jammy install:

----

# apt-get remove --purge snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  snapd*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
After this operation, 102 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 179270 files and directories currently installed.)
Removing snapd (2.58+22.04) ...
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
dpkg: warning: while removing snapd, unable to remove directory '/var/snap': Device or resource busy - directory may be a mount point?
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
(Reading database ... 179177 files and directories currently installed.)
Purging configuration files for snapd (2.58+22.04) ...
Stopping snap-bare-5.mount
Stopping unit snap-bare-5.mount
Waiting until unit snap-bare-5.mount is stopped [attempt 1]
snap-bare-5.mount is stopped.
Removing snap bare and revision 5
Removing snap-bare-5.mount
Stopping snap-core20-1822.mount
Stopping unit snap-core20-1822.mount
Waiting until unit snap-core20-1822.mount is stopped [attempt 1]
snap-core20-1822.mount is stopped.
Removing snap core20 and revision 1822
Removing snap-core20-1822.mount
Stopping snap-firefox-2356.mount
Stopping unit snap-firefox-2356.mount
Waiting until unit snap-firefox-2356.mount is stopped [attempt 1]
snap-firefox-2356.mount is stopped.
Removing snap firefox and revision 2356
rm: skipping '/var/snap/firefox/common/host-hunspell', since it's on a different device
dpkg: error processing package snapd (--purge):
 installed snapd package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 snapd
E: Sub-process /usr/bin/dpkg returned an error code (1)

----

This triggered apport. And now I'm here.

I can work around this.

----

# dpkg -l | grep -v ^ii | grep ^[a-z]
ic snapd

# umount $(mount | grep snap | awk '{print $3}')
umount: /var/snap: target is busy.
umount: /snap/snapd/18357: target is busy.
umount: /run/snapd/ns: target is busy.

# umount $(mount | grep snap | awk '{print $3}')
umount: /snap/snapd/18357: target is busy.

# apt-get remove --purge snapd
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  snapd*
...
Removing snapd cache
Removing snapd state

----

All good.

Cheers,
Walter

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: snapd (not installed)
ProcVersionSignature: Ubuntu 5.19.0-38.39~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-38-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu82.3
AptOrdering:
 snapd:amd64: Purge
 NULL: ConfigurePending
 NULL: PurgePending
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: pass
Date: Sat Apr 8 20:39:43 2023
ErrorMessage: installed snapd package post-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2023-04-08 (0 days ago)
InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223)
Python3Details: /usr/bin/python3.10, Python 3.10.6, python3-minimal, 3.10.6-1~22.04
PythonDetails: /usr/bin/python3.10, Python 3.10.6, python-is-python3, 3.9.2-2
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.1
 apt 2.4.8
SourcePackage: snapd
Title: package snapd (not installed) failed to install/upgrade: installed snapd package post-removal script subprocess returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Walter (wdoekes) wrote :
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.