apparmor: missing stub hardware directories

Bug #1554803 reported by Mason Loring Bliss on 2016-03-09
62
This bug affects 13 people
Affects Status Importance Assigned to Milestone
apparmor (Ubuntu)
Medium
Unassigned

Bug Description

● apparmor.service - LSB: AppArmor initialization
   Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2016-03-08 14:34:04 EST; 4h 23min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2909 ExecStart=/etc/init.d/apparmor start (code=exited, status=123)

Mar 08 14:34:04 ogre apparmor[2909]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Mar 08 14:34:04 ogre apparmor[2909]: AppArmor parser error for /etc/apparmor.d/usr.bin.webbrowser-app in /etc/apparmor.d/usr.bin.webbrowser-app at line 26: Could not open '/usr/share/apparmor/hardware/graphics.d'
Mar 08 14:34:04 ogre apparmor[2909]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Mar 08 14:34:04 ogre apparmor[2909]: AppArmor parser error for /etc/apparmor.d/usr.bin.webbrowser-app in /etc/apparmor.d/usr.bin.webbrowser-app at line 26: Could not open '/usr/share/apparmor/hardware/graphics.d'
Mar 08 14:34:04 ogre apparmor[2909]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Mar 08 14:34:04 ogre apparmor[2909]: ...fail!
Mar 08 14:34:04 ogre systemd[1]: apparmor.service: Control process exited, code=exited status=123
Mar 08 14:34:04 ogre systemd[1]: Failed to start LSB: AppArmor initialization.
Mar 08 14:34:04 ogre systemd[1]: apparmor.service: Unit entered failed state.
Mar 08 14:34:04 ogre systemd[1]: apparmor.service: Failed with result 'exit-code'.

/usr/share/apparmor/hardware/graphics.d doesn't in fact exist on my system. I'm not sure what package would provide it, but it seems curious to me that the package doesn't supply its relevant apparmor bits. I'd have expected the apparmor package to not complain about bits belonging to packages that aren't installed.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: apparmor 2.10-3ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-11.26-generic 4.4.4
Uname: Linux 4.4.0-11-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
Date: Tue Mar 8 18:53:31 2016
InstallationDate: Installed on 2016-02-24 (13 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160219)
ProcEnviron:
 TERM=xterm-color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcKernelCmdline: BOOT_IMAGE=/vmlinuz-4.4.0-11-generic.efi.signed root=/dev/mapper/hostname-root ro net.ifnames=0 biosdevname=0
SourcePackage: apparmor
Syslog: Mar 8 14:34:05 ogre dbus[3062]: [system] AppArmor D-Bus mediation is enabled
UpgradeStatus: No upgrade log present (probably fresh install)

Mason Loring Bliss (y-mason) wrote :
Steve Beattie (sbeattie) wrote :

Thanks for taking the time to report this issue and help improve Ubuntu. This specific issue is a duplicate of https://bugs.launchpad.net/ubuntu/+source/webbrowser-app/+bug/1511439 which I believe has been addressed by the webbrowser-app package in 16.04.

However, I'm not marking it as such as it seems to me that making each desktop package that wants to ship "converged" policies have to include stub apparmor directories seems... inefficient at best, and that perhaps the apparmor packaging should provide these directories, that can be populated by apparmor-easyprof-ubuntu as needed (or not).

Changed in apparmor (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
summary: - apparmor throwing inexplicable errors
+ apparmor: missing stub hardware directories
Mason Loring Bliss (y-mason) wrote :

That seems like a reasonable approach.

xtrchessreal (xtrchessreal) wrote :

I have the exact output (I'm also running 16.04 upgraded from 15.10) the originator published. If it was fixed in webbrowser-app package 16.04 then this would not be seen in 16.04. I agree this bug should be left open. I looked everywhere on AskUbuntu etc before finally asking and was referred to this bug. Thanks for your time and effort. :)

How do I apply the apparmor-easyprof-ubuntu package?
Is this a workaround or the fix?
Should I remove and purge the current apparmor etc packages then reinstall?
I also invite any here to post the proper steps to the answer to my question on AskUbuntu: http://askubuntu.com/questions/767272/apparmor-init-failed-exit-code-123/767686#767686

Once again thank you for your effort and time please let me know if there is anything I can provide to help. :)

Seth Arnold (seth-arnold) wrote :

xtrchessreal,l I think the easiest way forward for you is:
apt-get install apparmor-easyprof-ubuntu

I'm surprised this is still happening though. Can you paste the output of:
dpkg -l webbrowser-app | cat
and
dpkg -S /usr/share/apparmor/hardware/video.d

Thanks

xtrchessreal (xtrchessreal) wrote :

Seth, Thanks for your effort and input to my question. Here is the output you requested :)

x@x-NICEPUTER:~$ dpkg -l webbrowser-app | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============================-============-=================================
rc webbrowser-app 0.23+16.04.20160413-0ubuntu1 amd64 Ubuntu web browser
x@x-NICEPUTER:~$ dpkg -S /usr/share/apparmor/hardware/video.d
dpkg-query: no path found matching pattern /usr/share/apparmor/hardware/video.d
x@x-NICEPUTER:~$

Lemme know if there is anything else I can do
Thanks

xtrchessreal (xtrchessreal) wrote :

fyi after install of apparmor-easyprof-ubuntu:

x@x-NICEPUTER:~$ dpkg -l webbrowser-app | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============================-============-=================================
rc webbrowser-app 0.23+16.04.20160413-0ubuntu1 amd64 Ubuntu web browser

x@x-NICEPUTER:~$ dpkg -S /usr/share/apparmor/hardware/audio.d
apparmor-easyprof-ubuntu: /usr/share/apparmor/hardware/audio.d
x@x-NICEPUTER:~$ dpkg -S /usr/share/apparmor/hardware/graphics.d
apparmor-easyprof-ubuntu: /usr/share/apparmor/hardware/graphics.d
x@x-NICEPUTER:~$ dpkg -S /usr/share/apparmor/hardware/video.d
apparmor-easyprof-ubuntu: /usr/share/apparmor/hardware/video.d

Thanks again and lemme know :)

Jeferson Nogueira (jefnog) wrote :

I was install apparmor-easyprof-ubuntu in 17.10 artfull. Solved . Thank you for your effort and time to report this issue.

Ubuntu 16.04
Same issue happened to me after updates. Apparmor failure with code 123 prevents system from booting.
These directories were created manually in recovery single mode:
mkdir -p /usr/share/apparmor/hardware/graphics.d
mkdir -p /usr/share/apparmor/hardware/audio.d
mkdir -p /usr/share/apparmor/hardware/video.d

but it made no effect.

After that:
apt-get install apparmor-easyprof-ubuntu

System booted up successfully.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers