Dmesg error message

Hi

I just installed Ubuntu 20.04 (fresh install not updating).
Here is the command:

Blockquote
snap version
snap 2.44.3+20.04
snapd 2.44.3+20.04
series 16
ubuntu 20.04
kernel 5.4.0-28-generic

I discovered in dmesg a lot of audit message just like this:

Blockquote[ 34.817115] kauditd_printk_skb: 2947 callbacks suppressed
[ 34.817120] audit: type=1400 audit(1588491698.827:3012): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817132] audit: type=1400 audit(1588491698.827:3013): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817169] audit: type=1400 audit(1588491698.827:3014): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817197] audit: type=1400 audit(1588491698.827:3015): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817224] audit: type=1400 audit(1588491698.827:3016): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817251] audit: type=1400 audit(1588491698.827:3017): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0
[ 34.817277] audit: type=1400 audit(1588491698.827:3018): apparmor=“DENIED” operation=“open” profile=“snap.snap-store.ubuntu-software” name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2046 comm=“pool-org.gnome.” requested_mask=“r” denied_mask=“r” fsuid=1000 ouid=0

I did some googling but did not really find a lot of explanations.

I understand you have installed Ubuntu 20.04 (with kernel 5.4.0-28 so you must have updated). I don’t understand what you mean by “series 16”.

Apart from the DENIED messages, have you noticed anything wrong when using your machine?

I don’t see any of these messages on my own Ubuntu 20.04 workstation. Also directory /var/lib/snapd/hostfs is empty here. Have you run any specific command to get those error messages?

Hi

No idea about series 16 but it is just the result of command line “snap version”.
What I mean is that I downloaded the iso of Ubuntu 20.04 , boot on live USB and then installed on a “new SSD device” …

No I notice nothing wrong by using it (except that I did install 3 days ago so not a lot of return). I went to dmesg because I wanted to check something else about an USB device and notice that there was a lot of text compared to usually ( I think my previous Ubuntu installation was 19.10).

/var/lib/snapd/hostfs is also empty on my computer.

Ah, it wasn’t clear this was the output of snap version, looked like a random series of version strings. I have the same versions here, as expected on an Ubuntu 20.04 machine:

$ snap version 
snap    2.44.3+20.04
snapd   2.44.3+20.04
series  16
ubuntu  20.04
kernel  5.4.0-28-generic
$ 

Here are the installed snaps:

$ snap list 
Nom                  Version                     Révision  Suivi          Éditeur     Notes
canonical-livepatch  9.5.5                       95        latest/stable  canonical✓  -
core                 16-2.44.3                   9066      latest/stable  canonical✓  core
core18               20200427                    1754      latest/stable  canonical✓  base
gnome-3-28-1804      3.28.0-16-g27c9498.27c9498  116       latest/stable  canonical✓  -
gtk-common-themes    0.1-36-gc75f853             1506      latest/stable  canonical✓  -
multipass            1.2.0                       2006      latest/stable  canonical✓  classic
slack                4.4.2                       23        latest/stable  slack✓      classic
snap-store           3.31.1+git187.84b64e0b      415       latest/stable  canonical✓  -
snapcraft            3.11                        4282      latest/stable  canonical✓  classic
$ 

Why do you care about these DENIED messages? Just out of curiosity? Or is something malfunctioning?

I also got very similar logs in my system kernel. I care because Ubuntu started freezing, and I’m trying to diagnose what’s wrong by fixing anything that’s broken.

I even found someone else complaining about freezing, with the same exact logs from app armor and snap. link.

Here’s an older link to a snapd forum that I followed as well, which did not help in solving the issue: [Solved] "Permission denied" in general | Ubuntu 19.10 | snap 2.42.5

On my system:

$ snap version
snap    2.44.3+20.04
snapd   2.44.3+20.04
series  16
ubuntu  20.04
kernel  5.4.0-29-generic
$ uname -a
Linux trololubuntu 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ journalctl -k
May 12 09:51:41 trololubuntu kernel: audit: type=1400 audit(1589291501.013:53): apparmor="DENIED" operation="capable" profile="/usr/lib/snapd/snap-confine" pid=2301 comm="snap-confine" capability=4  capname="fsetid"
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:54): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:55): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:56): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:57): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:58): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:59): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:60): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.193:61): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/etc/gnome/defaults.list" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:42 trololubuntu kernel: audit: type=1400 audit(1589291502.469:62): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/glib-2.0/schemas/gschemas.compiled" pid=2301 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: kauditd_printk_skb: 9 callbacks suppressed
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:72): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:73): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:74): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:75): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:76): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:77): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:47 trololubuntu kernel: audit: type=1400 audit(1589291507.753:78): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:49 trololubuntu kernel: audit: type=1400 audit(1589291509.589:79): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/gdm/greeter/applications/gnome-initial-setup.desktop" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:50 trololubuntu kernel: audit: type=1326 audit(1589291510.041:80): auid=1000 uid=1000 gid=1000 ses=3 pid=2301 comm="pool-org.gnome." exe="/snap/snap-store/433/usr/bin/snap-store" sig=0 arch=c000003e syscall=93 compat=0 ip=0x7f8cff561417 code=0x50000
May 12 09:51:50 trololubuntu kernel: TCP: request_sock_TCP: Possible SYN flooding on port 16587. Sending cookies.  Check SNMP counters.
May 12 09:51:51 trololubuntu kernel: audit: type=1400 audit(1589291511.225:81): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/icon-theme.cache" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: kauditd_printk_skb: 2947 callbacks suppressed
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3029): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/mime.cache" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3030): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/globs2" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3031): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/magic" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3032): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/aliases" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3033): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/subclasses" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3034): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/icons" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:54 trololubuntu kernel: audit: type=1400 audit(1589291514.509:3035): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/mime/generic-icons" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:57 trololubuntu kernel: audit: type=1400 audit(1589291517.805:3036): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/icon-theme.cache" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:57 trololubuntu kernel: audit: type=1400 audit(1589291517.805:3037): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/8x8/emblems/" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 12 09:51:57 trololubuntu kernel: audit: type=1400 audit(1589291517.805:3038): apparmor="DENIED" operation="open" profile="snap.snap-store.ubuntu-software" name="/var/lib/snapd/hostfs/usr/share/icons/Yaru/icon-theme.cache" pid=2301 comm="pool-org.gnome." requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
$ ls /etc/apparmor.d/
abstractions
disable
force-complain
local
lsb_release
nvidia_modprobe
sbin.dhclient
tunables
usr.bin.evince
usr.bin.firefox
usr.bin.man
usr.lib.libreoffice.program.oosplash
usr.lib.libreoffice.program.senddoc
usr.lib.libreoffice.program.soffice.bin
usr.lib.libreoffice.program.xpdfimport
usr.lib.snapd.snap-confine.real
usr.sbin.cups-browsed
usr.sbin.cupsd
usr.sbin.ippusbxd
usr.sbin.rsyslogd
usr.sbin.tcpdump

And finally, one last command to figure out where the usr.lib.snapd.snap-confine.real file came from:

$ dpkg -S /etc/apparmor.d/usr.lib.snapd.snap-confine.real 
snapd: /etc/apparmor.d/usr.lib.snapd.snap-confine.real

I have next to no clue what’s going on besides some basic intuition/assumptions about the words I’m seeing - (beyond knowing snap is an app packaging platform, and app armor clearly looks like some kind of security suite thingy); My situation is basically that I looked at my system logs, saw errors coming from app armor and snap, googled the errors, and found threads on this forum that didn’t help.

Maybe someone could explain at an ELI5 level what’s going on, for the interests of anyone else who ever runs into the problem, and because I really don’t feel like learning a whole new technology to solve what’s probably a really simple fix.

I get the same DENIED messages in dmesg, but with me there is impact.

When I open the Software window (/snap/bin/snap-store), the messages appear in the log.
At this point everything seems fine, but when I click on a random app or do a search for anything, I get the loading icon and the application gets stuck loading.

The issue seems to be with the AppArmor profile not allowing read access to the files in /var/lib/snapd/hostfs/usr/share/mime/* .
I’ve tried to manually grant access by editing the profile file /etc/apparmor.d/usr.lib.snapd.snap-confine.realand reloading apparmor, but that doesn’t change anything.

I’ve restored the profile file from the repository package, but still no change.

In essence this error seems to be blocking most functionality of the Ubuntu Software application.

Here’s some info about using AppArmor: https://ubuntu.com/server/docs/security-apparmor