Installing nextcloud snap on Ubuntu Mate Raspberry Pi freezes

Bug #1596085 reported by Dennis Shimer
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Linux dennis-mate-pi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l armv7l armv7l GNU/Linux

$ sudo snap install nextcloud
2016-06-24T08:48:29-04:00 ERROR cannot setup apparmor for snap "nextcloud": cannot load apparmor profile "snap.nextcloud.apache": cannot load apparmor profile: exit status 1
apparmor_parser output:
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

2016-06-24T08:53:29-04:00 ERROR cannot setup apparmor for snap "nextcloud": cannot load apparmor profile "snap.nextcloud.apache": cannot load apparmor profile: exit status 1
apparmor_parser output:
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.

[|] Setup snap "nextcloud" security profiles

The indicator will go on spinning for at least an hour and never seems to complete.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

This bug is a different distro and different arch than the one duped. Both the MATE and Linode kernels need to be looked at, no? Why dupe?

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Hey Kyle, sorry for not dropping a comment here explaining the reasons for marking this a duplicate. In the other bug all the problem came from the kernel, not the distro or the arch, as the error message states. The default linode kernels are compiled without apparmor support, and that made snap install fail for every snap. Once I replaced that kernel with the distro one, which includes apparmor support, all went fine.

The error message and the behaviour in this case are the same (kernel needs apparmor 2.4 compatibility patch, unable to find suitable fs in /proc/mounts, and hanging forever after trying to install a snap), seems to me like the same problem but of course it can come from a different issue, please feel free to remove the dupe if you think it needs proper research.

Thanks!

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Thanks for the info Frederico. Indeed, the problem looks the same, but since it's a different distro the fix may be different. I've removed the dupe until we learn a little more.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Dennis, can we get a little more information from you? Please provide the output of the following commands:

$ cat /etc/os-release
$ apt-cache policy snapd
$ apt-cache policy snap-confine

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Note also that the mere fact that this spun for an hour without erroring out is a bug as well. zyga says he has a patch for it.

Revision history for this message
Dennis Shimer (dshimer) wrote :

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

$ apt-cache policy snapd
snapd:
  Installed: 2.0.9
  Candidate: 2.0.9
  Version table:
 *** 2.0.9 500
        500 http://ports.ubuntu.com xenial-updates/main armhf Packages
        100 /var/lib/dpkg/status
     2.0.2 500
        500 http://ports.ubuntu.com xenial/main armhf Packages

$ apt-cache policy snap-confine
N: Unable to locate package snap-confine

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

The error above seems to indicate that the kernel is lacking essential apparmor features.

Revision history for this message
Kyle Fazzari (kyrofa) wrote :

Dennis, thanks for the info. Indeed, it seems that MATE ships the rpi foundation kernel, which as zyga pointed out doesn't support the apparmor features required by snapd (https://github.com/raspberrypi/firmware/issues/468). Really the only fix here is to gracefully fail installation.

Revision history for this message
Dennis Shimer (dshimer) wrote :

Kyle, got it, I'll keep an eye out for changes. If there is anything else I can do just let me know. As a barely technical non-developer I would suggest there is a more graceful way than what was presented in this instance, if there were a way of trapping a particular class of errors and giving some leading.

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.