Unexplained mount failure, protocol error, what we know so far

Repeat the failed operation doesn’t work at my end… I end up installing another distro(ezgo 14, based on Kubuntu 18.04) and not encounter the issue since :-/

What was the specific operation that was failing for you? Was it refresh? Installation of snaps? Something else perhaps?

Installation of snaps, unfortunately I rm -rf'ed the entire system and can’t provide more info now.

Which distribution release were you using when this issue was occurring?

It was KDE neon Developer Edition (based on Ubuntu 18.04), not sure the exact release though(might be on the unstable branch) but it’s up-to-date.

We have merged a workaround for this issue into master now (PR was https://github.com/snapcore/snapd/pull/6331) - this will be part of the 2.37 release.

2 Likes

@zyga-snapd I’ve kinda reproduced the issue again, let’s see if we can dig it deeper.

Currently installed snap count: 34

The problem kinda emerged after I installed the core18 base snap, but who knows?

I now reproduced a similar issue again, but it seems to be another cause.

The snap install and snap try command fails with protocol error when the LXD container with disk device is started:

$ lxc start snapcraft-gallery-dl

$ sudo snap install hello
error: cannot perform the following tasks:
- Mount snap "hello" (20) ([start snap-hello-20.mount] failed with exit status 1: Job for snap-hello-20.mount failed.
See "systemctl status snap-hello-20.mount" and "journalctl -xe" for details.
)

$ snap changes | tail -n2
28   Error   today at 13:11 CST      today at 13:11 CST      Install "hello" snap

$ snap tasks 28
Status  Spawn               Ready               Summary
Done    today at 13:11 CST  today at 13:11 CST  Ensure prerequisites for "hello" are available
Undone  today at 13:11 CST  today at 13:11 CST  Download snap "hello" (20) from channel "stable"
Done    today at 13:11 CST  today at 13:11 CST  Fetch and check assertions for snap "hello" (20)
Error   today at 13:11 CST  today at 13:11 CST  Mount snap "hello" (20)
Hold    today at 13:11 CST  today at 13:11 CST  Copy snap "hello" data
Hold    today at 13:11 CST  today at 13:11 CST  Setup snap "hello" (20) security profiles
Hold    today at 13:11 CST  today at 13:11 CST  Make snap "hello" (20) available to the system
Hold    today at 13:11 CST  today at 13:11 CST  Automatically connect eligible plugs and slots of snap "hello"
Hold    today at 13:11 CST  today at 13:11 CST  Set automatic aliases for snap "hello"
Hold    today at 13:11 CST  today at 13:11 CST  Setup snap "hello" aliases
Hold    today at 13:11 CST  today at 13:11 CST  Run install hook of "hello" snap if present
Hold    today at 13:11 CST  today at 13:11 CST  Start snap "hello" (20) services
Hold    today at 13:11 CST  today at 13:11 CST  Run configure hook of "hello" snap if present

......................................................................
Mount snap "hello" (20)

2019-02-22T13:11:07+08:00 ERROR [start snap-hello-20.mount] failed with exit status 1: Job for snap-hello-20.mount failed.
See "systemctl status snap-hello-20.mount" and "journalctl -xe" for details.

$ systemctl status snap-hello-20.mount
● snap-hello-20.mount
   Loaded: not-found (Reason: No such file or directory)
   Active: failed (Result: protocol) since Fri 2019-02-22 13:11:06 CST; 2min 6s ago

 2月 22 13:11:06 brlin-main systemd[1]: Mounting Mount unit for hello, revision 20...
 2月 22 13:11:06 brlin-main systemd[1]: snap-hello-20.mount: Mount process finished, but there is no mount.
 2月 22 13:11:06 brlin-main systemd[1]: snap-hello-20.mount: Failed with result 'protocol'.
 2月 22 13:11:06 brlin-main systemd[1]: Failed to mount Mount unit for hello, revision 20.

$ lxc stop snapcraft-gallery-dl

$ sudo snap install hello
hello 2.10 from Canonical✓ installed

The LXD container is somehow interfering with the mounting of the snaps:

$ mount | grep gallerynsfs on /run/snapd/ns/gallery-dl.mnt type nsfs (rw)
/dev/sdb4 on /snap/gallery-dl/x4 type ext4 (ro,relatime,errors=remount-ro,data=ordered,x-gdu.hide)
/dev/sdb4 on /snap/gallery-dl/x5 type ext4 (ro,relatime,errors=remount-ro,data=ordered,x-gdu.hide)
/dev/sdb4 on /snap/gallery-dl/x6 type ext4 (ro,relatime,errors=remount-ro,data=ordered,x-gdu.hide)
/dev/sdb4 on /var/lib/lxd/devices/snapcraft-gallery-dl/disk.Snapcraft config.home-ubuntu-.config-snapcraft type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdb4 on /var/lib/lxd/devices/snapcraft-gallery-dl/disk.Source Tree of "gallery-dl - Command-line program to download image-galleries and -collections from several image hosting sites".home-ubuntu-gallery-dl type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sdb4 on /var/lib/lxd/devices/snapcraft-gallery-dl/disk.Source Tree of "Unofficial Snap Packaging for gallery-dl".home-ubuntu-gallery-dl-snap type ext4 (rw,relatime,errors=remount-ro,data=ordered)
$ snap version
snap    2.37.2                                                             
snapd   2.37.2
series  16
ubuntu  18.04
kernel  4.15.0-45-generic
1 Like

This is fixed upstream with https://github.com/systemd/systemd/pull/13097

1 Like