package snapd 2.58+22.04.1 failed to install/upgrade: installed snapd package post-removal script subprocess returned error exit status 1

Bug #2059195 reported by Soumyadip Maiti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
High
Unassigned

Bug Description

when i restart or power on my laptop and do something this problem shows.

ProblemType: Package
DistroRelease: Ubuntu 22.04
Package: snapd 2.58+22.04.1
ProcVersionSignature: Ubuntu 6.5.0-26.26~22.04.1-generic 6.5.13
Uname: Linux 6.5.0-26-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu82.5
Architecture: amd64
CasperMD5CheckResult: pass
Date: Wed Mar 27 08:53:47 2024
ErrorMessage: installed snapd package post-removal script subprocess returned error exit status 1
InstallationDate: Installed on 2023-11-23 (124 days ago)
InstallationMedia: Ubuntu 22.04.3 LTS "Jammy Jellyfish" - Release amd64 (20230807.2)
Python3Details: /usr/bin/python3.10, Python 3.10.12, python3-minimal, 3.10.6-1~22.04
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.21.1ubuntu2.3
 apt 2.4.11
SourcePackage: snapd
Title: package snapd 2.58+22.04.1 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
Soumyadip Maiti (smaiti007) wrote :
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Dear reporter. Do you know if the snapd package on your system was customized in any way? Was "snap set ..." used to, for example, allow non-/home home directories? Was snapd and snap packages used for a while or was this a relatively fresh install that was just purged?

We're asking because the error that is reported seems to suggest a more serious problem that we would like to understand and fix.

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :
Download full text (6.1 KiB)

I was able to reproduce this with 22.04, snapd 2.61.1. This is what is reported by findmnt:

```
maciek@vm:~$ findmnt
TARGET SOURCE FSTYPE OPTIONS
/ /dev/vda2 ext4 rw,relatime,errors=remount-ro
├─/sys sysfs sysfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/security securityfs securityfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/cgroup cgroup2 cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot
│ ├─/sys/fs/pstore pstore pstore rw,nosuid,nodev,noexec,relatime
│ ├─/sys/firmware/efi/efivars efivarfs efivarfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/bpf bpf bpf rw,nosuid,nodev,noexec,relatime,mode=700
│ ├─/sys/kernel/debug debugfs debugfs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/kernel/tracing tracefs tracefs rw,nosuid,nodev,noexec,relatime
│ ├─/sys/fs/fuse/connections fusectl fusectl rw,nosuid,nodev,noexec,relatime
│ └─/sys/kernel/config configfs configfs rw,nosuid,nodev,noexec,relatime
├─/proc proc proc rw,nosuid,nodev,noexec,relatime
│ └─/proc/sys/fs/binfmt_misc systemd-1 autofs rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=41325
│ └─/proc/sys/fs/binfmt_misc binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime
├─/dev udev devtmpfs rw,nosuid,relatime,size=1949512k,nr_inodes=487378,mode=755,inode64
│ ├─/dev/pts devpts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000
│ ├─/dev/shm tmpfs tmpfs rw,nosuid,nodev,inode64
│ ├─/dev/hugepages hugetlbfs hugetlbfs rw,relatime,pagesize=2M
│ └─/dev/mqueue mqueue mqueue rw,nosuid,nodev,noexec,relatime
├─/run tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=397560k,mode=755,inode64
│ ├─/run/lock tmpfs tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k,inode64
│ ├─/run/credentials/systemd-sysusers.service ramfs ramfs ...

Read more...

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

We now believe this bug is understood and we are thinking about a way to address it. The root cause is that the per-distro purge script is unaware of the mounts that need to be stopped and has no way to enumerate them.

Changed in snapd (Ubuntu):
importance: Undecided → High
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

I've opened a related PR to the firefox snap which replaces the problematic interface with system-files https://github.com/canonical/firefox-snap/pull/53

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.