snap and the amount loop back devices and duplicate snaps

Bug #1991475 reported by නයන හෙට්ටිආරච්චි
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd
New
Undecided
Unassigned

Bug Description

in the recent times my harddrive went into read only mode and the cluprit was always a checksum error in one of the snap cache directories.

today i investigated more about this issue and I was shocked to find that every snap application is some what chrooted using a bind with a local loop

```
\oop5 7:5 0 62M 1 loop /snap/core20/1611
loop7 7:7 0 70.4M 1 loop /snap/core22/188
loop8 7:8 0 70.4M 1 loop /snap/core22/275
loop9 7:9 0 6.3M 1 loop /snap/curl/1046
loop10 7:10 0 6.3M 1 loop /snap/curl/1093
loop11 7:11 0 118.4M 1 loop /snap/docker/1779
loop12 7:12 0 178.4M 1 loop /snap/firefox/1877
loop13 7:13 0 237.3M 1 loop /snap/firefox/1883
loop14 7:14 0 164.8M 1 loop /snap/gnome-3-28-1804/161
loop15 7:15 0 219M 1 loop /snap/gnome-3-34-1804/77
loop16 7:16 0 346.3M 1 loop /snap/gnome-3-38-2004/115
loop17 7:17 0 346.3M 1 loop /snap/gnome-3-38-2004/119
loop18 7:18 0 137M 1 loop /snap/golangci-lint/94
loop19 7:19 0 440.6M 1 loop /snap/gradle/134
loop20 7:20 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop21 7:21 0 37.1M 1 loop /snap/hunspell-dictionaries-1-7-2004/2
loop22 7:22 0 57.2M 1 loop /snap/kops/18
loop23 7:23 0 10.9M 1 loop /snap/kubectl/2591
loop24 7:24 0 6.9M 1 loop /snap/kubectx/17
loop25 7:25 0 10.9M 1 loop /snap/kubectl/2624
loop26 7:26 0 87.4M 1 loop /snap/moon-modeler/6
loop27 7:27 0 81.3M 1 loop /snap/gtk-common-themes/1534
loop28 7:28 0 187.6M 1 loop /snap/postman/183
loop29 7:29 0 188.3M 1 loop /snap/postman/184
loop30 7:30 0 112.4M 1 loop /snap/slack/65
loop31 7:31 0 112.4M 1 loop /snap/slack/66
loop32 7:32 0 45.9M 1 loop /snap/snap-store/592
loop33 7:33 0 45.9M 1 loop /snap/snap-store/599
loop34 7:34 0 48M 1 loop /snap/snapd/16778
loop35 7:35 0 48M 1 loop /snap/snapd/17029
loop36 7:36 0 20.5M 1 loop /snap/terraform/395
loop37 7:37 0 20.5M 1 loop /snap/terraform/400
loop38 7:38 0 123.8M 1 loop /snap/tusk/29
loop39 7:39 0 4.6M 1 loop /snap/yq/1805
```

and there is duplicates too, what is the reasoning behind this behaviour, I am quite sure the concurrent writes being made by snap on cache files at somepoint ends up with a invalid checksuym causing a panic in the file system.

can you please explain your rational behind this (if its sandboxing is it worth the amount of block device thaat it keeps allocating? why arent the old versions being removed.

We trust the ubuntu apt system and it works, but i guess you thought it's slow and created a new system wuth less timeline to publish, but since you probably don;t go through recogorse testing you decided to sandbox the apps, causing different kind of issues for a high demand user.

Can you please give the user the option to decide when installking that they can be installed in the natural way other apps are installed,

I am going to go uninstall all these snaps and install them manually, because i don't want to suffer from another disk issue with what so ever bug in your snap application framework.

call it a bug or feature, i am the one at fault for not reading up more about how snap works, all

it just so happend as i was writing this bug report, all i did in the machine was trying to uninstall docker that was installed with snap

[ 3434.095271] EXT4-fs error (device sda2): ext4_lookup:1808: inode #1448099: comm tar: iget: checksum invalid
[ 3434.095276] Aborting journal on device sda2-8.
[ 3434.096720] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm rs:main Q:Reg: Detected aborted journal
[ 3434.096736] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm systemd-journal: Detected aborted journal
[ 3434.133216] EXT4-fs (sda2): Remounting filesystem read-only
[ 3902.863233] kauditd_printk_skb: 10 callbacks suppressed

here we go another waste of time for a reboot

Tags: stability
Revision history for this message
නයන හෙට්ටිආරච්චි (pituwaco) wrote :

and here we go, always problems in the snap .cache

Pass 2: Checking directory structure
Symlink /home/nayana/snap/slack/common/.cache/gio-modules/libgiognomeproxy.so (inode #6295303) is invalid.
Symlink /home/nayana/snap/slack/common/.cache/gio-modules/libgiognutls.so (inode #6295304) is invalid.
Symlink /home/nayana/snap/slack/common/.cache/immodules/im-cyrillic-translit.so (inode #6295320) is invalid.

summary: - snap and the amount of block devices and duplicagte snaps
+ snap and the amount loop back devices and duplicate snaps
Revision history for this message
නයන හෙට්ටිආරච්චි (pituwaco) wrote :

as i dig more i find more dirt

```
snap-bare-5.mount snapd.seeded.service snap-postman-184.mount
snap-core-13741.mount snapd.service snap-slack-65.mount
snap-core-13886.mount snapd.socket snap-slack-66.mount
snap-core18-2560.mount snap-firefox-1877.mount snap-snapd-16778.mount
snap-core20-1611.mount snap-firefox-1883.mount snap-snapd-17029.mount
snap-core22-188.mount snap-gradle-134.mount snap-terraform-395.mount
snap-core22-275.mount snap-kops-18.mount snap-terraform-400.mount
snap-curl-1046.mount snap-kubectl-2591.mount snap-tusk-29.mount
snap-curl-1093.mount snap-kubectl-2624.mount snap-yq-1805.mount
snapd.apparmor.service snap-kubectx-17.mount
snap-docker-1779.mount snap-postman-183.mount

```

do you not cleanup after updates and leave things hanging? seriously? I am going to take a hard look at your source code, very soon. I have a deadline to meet today, otherwise i would have been all over it by now.

I don't mind the idea of having a package manager, but leaving this behind and have so much dirt hanging,

and I could not uninstall snap docker by disk went into a bad checksum again,

no worries i will troubleshoot all that.

i am just frustrated with this

Revision history for this message
නයන හෙට්ටිආරච්චි (pituwaco) wrote :

as previously mentioned when trying to uninstall snap docker the system went to readonly mode now after the bootup why is snapd service is trying to create an archive of docker

Oct 02 14:18:47 nayana-295 systemd[1]: Started Snap Daemon.
Oct 02 14:40:11 nayana-295 snapd[1075]: taskrunner.go:271: [change 76 "Save data of snap \"docker\" in automatic snapshot set #1" task] failed: tar failed: signal: killed

i killed it because it was killing my IO

if i say remove it it means delete, i don't need you making copies and backups

Revision history for this message
නයන හෙට්ටිආරච්චි (pituwaco) wrote :

once again attempted to uninstall snap docker and again

```
[199536.168786] EXT4-fs error (device sda2): ext4_lookup:1808: inode #4723603: comm snapd: iget: checksum invalid
[199536.168792] Aborting journal on device sda2-8.
[199536.171763] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm rs:main Q:Reg: Detected aborted journal
[199536.171764] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm systemd-journal: Detected aborted journal
[199536.174692] EXT4-fs error (device sda2): ext4_journal_check_start:83: comm dpkg: Detected aborted journal
[199536.314534] EXT4-fs (sda2): Remounting filesystem read-only
[199536.820304] systemd-journald[410]: Failed to write entry (25 items, 7958 bytes), ignoring: Read-only file system

```

Revision history for this message
නයන හෙට්ටිආරච්චි (pituwaco) wrote :

this will be my last comment, even going to runlevel 3 and trying to remove ./var/snap/docker manually entended up in a currupted filesystem,

so i had enough with your nonsese software, i went to runlevel 1 disabled all systemd services, sockets mounts disabled them first and then removed all snap directories and every reference to snap from my entire system and i installed all the software i had installed via snap jusgt in genral terms and i no longer see 100s of loop mounts in my system.

If you are new to this SNAP and reading this, stay away from it, sepcially for sofware like docker which creates layer and layes of files their SNAP system cant handle it.

stick to APT or just install from source

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.