Comment 3 for bug 1630789

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Problem #1 is that the snaps are being mounted incorrectly when squashfuse is being used in place of squashfs:

root@yakkety:~# umount /snap/ubuntu-core/423/
root@yakkety:~# umount /snap/hello-world/27/
root@yakkety:~# squashfuse -o ro,allow_other /var/lib/snapd/snaps/ubuntu-core_423.snap /snap/ubuntu-core/423/
root@yakkety:~# squashfuse -o ro,allow_other /var/lib/snapd/snaps/hello-world_27.snap /snap/hello-world/27/
root@yakkety:~# grep /snap /proc/self/mountinfo
496 348 0:61 / /snap/hello-world/27 ro,nosuid,nodev,relatime - fuse.squashfuse squashfuse ro,user_id=0,group_id=0,allow_other
497 348 0:62 / /snap/ubuntu-core/423 ro,nosuid,nodev,relatime - fuse.squashfuse squashfuse ro,user_id=0,group_id=0,allow_other

This lets us get a little farther along:

root@yakkety:~# su - ubuntu -c '/snap/bin/hello-world.env'

There's no output because ubuntu-core-launcher (not snap-confine?) is segfaulting (possibly due to an AppArmor denial). Here is the relevant info from the logs:

[ 9087.695184] audit: type=1400 audit(1475710180.784:529): apparmor="DENIED" operation="open" namespace="root//lxd-yakkety_<var-lib-lxd>" profile="/usr/lib/snapd/snap-confine" name="/proc/644/mountinfo" pid=29474 comm="ubuntu-core-lau" requested_mask="r" denied_mask="r" fsuid=296608 ouid=0
[ 9087.695195] ubuntu-core-lau[29474]: segfault at 0 ip 00007f37440c1484 sp 00007ffcc6b2fa50 error 4 in libc-2.24.so[7f3744053000+1bd000]