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

Didier Roche didrocks at ubuntu.com
Mon Nov 7 10:23:36 UTC 2016


Le 07/11/2016 à 11:18, Simon Fels a écrit :
> On 07.11.2016 08:53, Didier Roche wrote:
>> Le 06/11/2016 à 11:50, Jacques Supcik a écrit :
>>> Dear community.
>>>
>>> I have a program <https://gitlab.com/telecom-tower/tower>, written in
>>> go, and running on a raspberry Pi 2, which displays messages on a LED
>>> panel. The panel <https://www.adafruit.com/product/2294> 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?
>>>
>>> Thank you very much in advance for your support.
>> Hey Jacques,
>>
>> I think we did discuss about GPIO support in confined mode, but there is
>> no interface for this today AFAIK (CCing Jamie who can confirm and maybe
>> give a path/ETA forward).
>
> There is a GPIO interface. The downside of it is that you need a slot
> defined on the gadget snap. As long as this isn't done for the official
> gadget snaps for Pi 2/3 you can only build your own. See
> https://github.com/snapcore/snapd/blob/master/interfaces/builtin/gpio.go
> for details about the interface itself.

Ah nice, I didn't find any documentation on it nor in the official doc
(which was imported from the snapd repo before its removal) or in
https://github.com/snapcore/snapd/wiki/Interfaces. Any plan on
documenting it?

Is there a bug report for ogra to enable it in the official gadget snaps
for Pi 2/3?
Cheers,
Didier




More information about the Snapcraft mailing list