Bug running mir-kiosk-apps

Hi,

It looks like there is a bug in the core snap on the rPi3 when using the Edge build and also now the beta build. It has stopped serving up the mir-kiosk-apps snap. No Denials in journalctl just the error message

[QPA] QMirClientClientIntegration: connection to Mir server failed.
Mir returned: “”

Happy to help debug by providing files/logs or anything else needed

Thanks

Adam

does it work if you roll back the mir-kiosk or mir-libs snaps ? this sounds like a bug in mir more than something with core.

I don’t think the version for mir-libs or mir-kiosk have changed?

mir-kiosk 1.2.0 33 canonical devmode
mir-libs 0.26.1 28 canonical devmode

How do I roll it back to an older version?

Thanks

Adam

snap refresh --revision=<$desired_revision> <$snap_name>

Thanks, will try an earlier version

This sounds more like an incompatibility between the way the server (mir-kiosk) and client (mir-kiosk-apps) are configured. I’m not aware of any updates to either of these recently.

Does anything suggestive appear here?

$ sudo tail -n 100 /var/log/syslog

Nothing in jounelctl to note as far as I can see. Just that it has failed.

rsyslog removed in this build

Cheers

Adam

OK, I don’t have an rpi to test with, but refreshing a dragonboard left it in a state where the apps are not working.

If I can figure that out, then maybe it will help you too…

Thank you, Happy to test a fix on the rPi3

Still trying to debug this end as well

Thanks

Adam

Here’s what worked for me:

snap remove mir-kiosk-apps mircade mir-kiosk mir-libs
snap install mir-libs --channel=edge
snap install mir-kiosk --channel=edge
snap install mir-kiosk-apps --channel=edge

Thanks, had already done that. But just completed again and it doesn’t work on the rPi3 unfortunately

I am seeing some denied fin the log following the re-installation

May 15 08:38:24 localhost.localdomain audit[1416]: AVC apparmor=“DENIED” operation=“mknod” profile=“snap.mir-kiosk-apps.mir-kiosk-app-daemon” name="/dev/shm/lttng-ust-wait-6-0" pid=1416 comm=“photoview
May 15 08:38:24 localhost.localdomain audit[1417]: AVC apparmor=“DENIED” operation=“mknod” profile=“snap.mir-kiosk-apps.mir-kiosk-app-daemon” name=”/dev/shm/lttng-ust-wait-6" pid=1417 comm=“photoviewer
May 15 08:38:24 localhost.localdomain audit[1418]: AVC apparmor=“DENIED” operation=“mknod” profile=“snap.mir-kiosk-apps.mir-kiosk-app-daemon” name=”/dev/shm/lttng-ust-wait-6-0" pid=1418 comm=“photoview
May 15 08:38:24 localhost.localdomain audit[1419]: AVC apparmor=“DENIED” operation=“mknod” profile=“snap.mir-kiosk-apps.mir-kiosk-app-daemon” name=”/dev/shm/lttng-ust-wait-6" pid=1419 comm="photoviewer
May 15 08:38:24 localhost.localdomain snap[1397]: Loading module: ‘libubuntu_application_api_desktop_mirclient.so.3.0.0’
May 15 08:38:24 localhost.localdomain snap[1397]: Unable to load selected module, using dummy.
May 15 08:38:24 localhost.localdomain snap[1397]: Loading module: ‘libubuntu_application_api_test.so.3.0.0’
May 15 08:38:24 localhost.localdomain snap[1397]: [QPA] QMirClientClientIntegration: connection to Mir server failed.
May 15 08:38:24 localhost.localdomain snap[1397]: Mir returned: “”

Trying to install the three snaps i get a properly starting mir-kiosk (got a black screen and movable cursor on screen) which indicates that on the image level (core snap, GLES setup etc) everything is ok.

That said … i can actually confirm that the mir-kiosk-apps snap does not start and that i see the same errors in journalctl here …

http://paste.ubuntu.com/24592960/ has the full log output …
something seems out of sync between the apps and the lib/server snap (since the server works fine standalone).

These apparmor denials are usually harmless denials. I’ll take a TODO to adjust the mir ConnectedPlug policy accordingly.

You can confirm they are harmless by adding to /var/lib/snapd/apparmor/profiles/snap.mir-kiosk-apps.mir-kiosk-app-daemon (before the final ‘}’):

  /{dev,run,var/run}/shm/lttng-ust-* rw,

Then running:

$ sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.mir-kiosk-apps.mir-kiosk-app-daemon

and trying starting the application again (note if you refresh, remove/install, reboot or restart snapd, this policy will be updated and that change will be gone). I suspect your snap will still fail.

Agreed, i think the issue is in the next lines in the logs where it can not find its lib:

May 17 14:22:02 pi3 snap[12051]: Loading module: 'libubuntu_application_api_desktop_mirclient.so.3.0.0' May 17 14:22:02 pi3 snap[12051]: Unable to load selected module, using dummy. May 17 14:22:02 pi3 snap[12051]: Loading module: 'libubuntu_application_api_test.so.3.0.0' May 17 14:22:02 pi3 snap[12051]: [QPA] QMirClientClientIntegration: connection to Mir server failed. May 17 14:22:02 pi3 snap[12051]: Mir returned: "" May 17 14:22:02 pi3 snap[12051]: /snap/mir-kiosk-apps/16/bin/mir-kiosk-app-daemon: line 93: 12066 Terminated

If it doesn’t fail, it still may be the timing issue @ogra mentioned and nothing to do with the apparmor denials (we could determine if that is the case by removing the rules, reloading the profile and then restarting and seeing if it starts to fail again).

As you thought the snap still fails even with the adjusted profile

In the past when I was looking at mir-kiosk, I needed to do this:

  1. make sure your snap plugs mir and the mir-libs content
  2. install mir kiosk snap
  3. install mir-libs
  4. install the application
  5. make sure that ‘snap interfaces’ shows that the application is connected to both mir and the mir-libs content. If not, connect the interfaces with snap connect
  6. start the application

An additional thing that may be in play is the persistent mount namespace that may not have the mir-libs mounted in your snap’s are like it is supposed to. You can stop your application, run sudo /usr/lib/snapd/snap-discard-ns mir-kiosk-apps and then try again (or make this step ‘4.5’, above).

If this works, please give the output of snap version. I know @zyga-snapd was working on this issue and he may be able to comment further.

Thanks, yes I can confirm the snap is connected to mir and mir-libs. I have just tried your steps just in case but still get the same results.

We have had this working for a couple of months as we use the app as a testing app to confirm the environment when our own app which has a similar framework does not work.

We saw this issue in Edge a day or two ago and it was fixed by updating the core snap to beta. But as of this morning this no longer works ether.

Is this something I can try on my host? Can I reproduce this in qemu?