Snap hangs when accessing a special /dev/file (/dev/vcio) [ubuntu-core 16 / RaspberryPi2]

Zygmunt Krynicki zygmunt.krynicki at canonical.com
Mon Nov 7 10:45:20 UTC 2016


> On 6 Nov 2016, at 11:50, Jacques Supcik <jacques at supcik.net> wrote:
> 
> Dear community.
> 
> I have a program, written in go, and running on a raspberry Pi 2, which displays messages on a LED panel. The panel is made of "neo pixels" and is connected to the GPIO of the raspberry Pi. Internally, it uses the DMA and PWM to generate and accurate signals.
> 
> The program currently runs well on a Raspbian system and I would like to move to ubuntu-core. I was able to build the snap and to deploy it on a raspberry Pi 2 running Core version 16. I installed the snap with "--dangerous", but as soon as the system configure the DMA/PWM/GPIO, it just freezes.
> 
> I installed snappy-debug to check the logs and this is what I get:
> 
> = AppArmor =
> Time: Nov  6 09:28:45
> Log: apparmor="DENIED" operation="open" profile="snap.telecom-tower.daemon" name="/dev/vcio" pid=4441 comm="tower" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
> File: /dev/vcio (read)
> 
> = Seccomp =
> Time: Nov  6 09:28:45
> Log: auid=4294967295 uid=0 gid=0 ses=4294967295 pid=4441 comm="tower" exe="/snap/telecom-tower/x1/bin/tower" sig=31 arch=40000028 14(mknod) compat=0 ip=0x76e3aaf6 code=0x0
> Syscall: mknod
> 
> Note that if I scp the binary file and run on ubuntu core as root, then the program runs fine. (I don't install the snap, I just run the binary from the home directory.) 
> 
> Does someone have an idea about what I can do to make my snap run?

You need an interface for accessing this specific hardware. In absence of one right now just get started with devmode. In your snapcraft.yam use “confinement: devmode”. I think there’s an ongoing work to support this interface but to be sure please report a bug on bugs.launchpad.net/snappy and tag it with the “snapd-interface” tag please.

Interfaces are added pretty quickly so you can even track daily development using the edge channel of the core snap.

Best regards
ZK



More information about the Snapcraft mailing list