snapd squashfs issue on fresh Fedora 30

Bug #1859703 reported by Jesus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Expired
Undecided
Unassigned

Bug Description

I've been using snap successfully on multiple computers, even this same one (a Razer).
But now after reimaging the Razer from scratch with Fedora 30 I'm hitting some unknown issue.
E.g. `sudo snap install hello-world` returns:
> error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
> /tmp/sanity-mountpoint-785982462: wrong fs type, bad option, bad superblock on /dev/loop1,
> missing codepage or helper program, or other error.

I checked around for similar errors but nothing I found seemed relevant to my case.

I tried:
```
mkdir /tmp/foo && echo bar > /tmp/foo/bar
mksquashfs /tmp/foo /tmp/foo.img -all-root
mkdir /tmp/foo-mount-point
sudo mount -t squashfs /tmp/foo.img /tmp/foo-mount-point
```
and that works resulting in something like
```
Filesystem Size Used Avail Use% Mounted on
devtmpfs 16G 0 16G 0% /dev
tmpfs 16G 93M 16G 1% /dev/shm
tmpfs 16G 2.1M 16G 1% /run
tmpfs 16G 0 16G 0% /sys/fs/cgroup
/dev/mapper/fedora-root 421G 44G 356G 11% /
tmpfs 16G 192M 16G 2% /tmp
/dev/nvme0n1p2 976M 123M 787M 14% /boot
/dev/nvme0n1p1 1022M 7.8M 1015M 1% /boot/efi
tmpfs 3.2G 48K 3.2G 1% /run/user/1001
tmpfs 3.2G 36K 3.2G 1% /run/user/42
/dev/loop0 128K 128K 0 100% /tmp/foo-mount-point
```
I.e. squashfs seems to work.

Also based on some comments somewhere, I double-checked kernel versions:
`snap version`:
```
snap 2.42.2-1.fc30
snapd 2.42.2-1.fc30
series 16
fedora 30
kernel 5.3.6-200.fc30.x86_64
```
`uname -r`: `5.3.6-200.fc30.x86_64`

The output of `journalctl -u snapd` looks like this:
```
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 systemd[1]: Starting Snappy daemon...
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 snapd[3990]: AppArmor status: apparmor not enabled
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 snapd[3990]: daemon.go:346: started snapd/2.42.2-1.fc30 (series 16; classic; devmode) fedora/30 (amd64) linux/5.3.6-200.fc30.x86_64.
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 snapd[3990]: main.go:123: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount: /tmp/sanity-mountpoint-384310004: wrong fs >
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 snapd[3990]: daemon.go:439: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Jan 10 08:49:24 jesusbriales-fedora-BY1840A49301584 systemd[1]: Started Snappy daemon.
Jan 10 08:49:29 jesusbriales-fedora-BY1840A49301584 snapd[3990]: daemon.go:540: gracefully waiting for running hooks
Jan 10 08:49:29 jesusbriales-fedora-BY1840A49301584 snapd[3990]: daemon.go:542: done waiting for running hooks
Jan 10 08:49:29 jesusbriales-fedora-BY1840A49301584 snapd[3990]: daemon stop requested to wait for socket activation
Jan 10 08:49:29 jesusbriales-fedora-BY1840A49301584 systemd[1]: snapd.service: Succeeded.
Jan 10 08:49:30 jesusbriales-fedora-BY1840A49301584 systemd[1]: Starting Snappy daemon...
Jan 10 08:49:30 jesusbriales-fedora-BY1840A49301584 snapd[4137]: AppArmor status: apparmor not enabled
Jan 10 08:49:30 jesusbriales-fedora-BY1840A49301584 snapd[4137]: daemon.go:346: started snapd/2.42.2-1.fc30 (series 16; classic; devmode) fedora/30 (amd64) linux/5.3.6-200.fc30.x86_64.
```

Revision history for this message
Ian Johnson (anonymouse67) wrote :

Hi,

Can you try downloading a snap and mounting that? For example:

```

$ snap download hello-world
$ mkdir test-squash
$ sudo mount hello-world*.snap test-squash
```

Changed in snapd:
status: New → Incomplete
Revision history for this message
Jesus (jesusbriales) wrote :

Those steps went through successfully, but the `hello-world` app is not yet available (I guess it wasn't supposed to be?).
With the approach above, is there any workaround I can use to "manually install" the downloaded and mounted app?

John Lenton (chipaca)
Changed in snapd:
status: Incomplete → New
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

On my Fedora 31 system I can perform snap download successfully:

[zyga@fedora tmp]$ snap download hello-world
Fetching snap "hello-world"
Fetching assertions for "hello-world"
Install the snap with:
   snap ack hello-world_29.assert
   snap install hello-world_29.snap

It also shows how to use the files that were created.

Changed in snapd:
status: New → Incomplete
Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Just for the record, are there any denials logged when snapd sanity check fails? Running `ausearch -m AVC` should list the logged denials.

Revision history for this message
Jesus (jesusbriales) wrote :

I tried
```
snap ack hello-world_29.assert
snap install hello-world_29.snap
```
after the download.
Both failed with:
> error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/sanity-mountpoint-991503176: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error.

Revision history for this message
Jesus (jesusbriales) wrote :

Also I tried `sudo ausearch -m AVC | grep snapd` and got nothing.
I'm blocked because of this in this computer. Any other ideas to work around the failing `sudo snap install hello-world_29.snap`?
I can mount successfully with `sudo mount hello-world*.snap ...` and execute the binaries there, but this doesn't complete the installation and symlinks for the snap app.
Is it possible to somehow redo symlinking logic once an app has been mounted?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd because there has been no activity for 60 days.]

Changed in snapd:
status: Incomplete → Expired
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.