apparmor error while removing python3.7 in lxd

Bug #1862347 reported by Andreas Hasenack
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
binfmt-support (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In a focal LXD container, I was replacing python3.7 with python3.8. At the end, I ran autoremove to get rid of the last python3.7 pieces, and this happened:

$ sudo apt autoremove
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libfreetype6 libpython3.7 libpython3.7-dev libpython3.7-minimal libpython3.7-stdlib python3.7-minimal
0 upgraded, 0 newly installed, 6 to remove and 55 not upgraded.
After this operation, 46.9 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 60389 files and directories currently installed.)
Removing libfreetype6:amd64 (2.10.1-2) ...
Removing libpython3.7-dev:amd64 (3.7.6-1ubuntu2) ...
Removing libpython3.7:amd64 (3.7.6-1ubuntu2) ...
Removing libpython3.7-stdlib:amd64 (3.7.6-1ubuntu2) ...
Removing python3.7-minimal (3.7.6-1ubuntu2) ...
Unlinking and removing bytecode for runtime python3.7
update-binfmts: warning: unable to open /proc/sys/fs/binfmt_misc/python3.7 for writing: Permission denied
update-binfmts: warning: unable to disable binary format python3.7
update-binfmts: exiting due to previous errors
dpkg: error processing package python3.7-minimal (--remove):
 installed python3.7-minimal package pre-removal script subprocess returned error exit status 2
dpkg: too many errors, stopping
Errors were encountered while processing:
 python3.7-minimal
Processing was halted because there were too many errors.
sudo apt-get bE: Sub-process /usr/bin/dpkg returned an error code (1)

dmesg shows the apparmor DENIED messages:
[1960915.476179] audit: type=1400 audit(1581063070.923:4252): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-andreas-focal-isc-kea_</var/snap/lxd/common/lxd>" name="/run/systemd/unit-root/snap/" pid=513284 comm="(fwupdmgr)" flags="ro, remount, noatime, bind"
[1960915.514190] audit: type=1400 audit(1581063070.963:4253): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-andreas-focal-isc-kea_</var/snap/lxd/common/lxd>" name="/run/systemd/unit-root/boot/" pid=513294 comm="(fwupd)" flags="ro, remount, noatime, bind"
[1964558.405803] audit: type=1400 audit(1581066713.861:4254): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-paride-ff_</var/snap/lxd/common/lxd>" name="/run/systemd/unit-root/snap/" pid=525393 comm="(fwupdmgr)" flags="ro, remount, noatime, bind"
[1964558.440736] audit: type=1400 audit(1581066713.897:4255): apparmor="DENIED" operation="mount" info="failed flags match" error=-13 profile="lxd-paride-ff_</var/snap/lxd/common/lxd>" name="/run/systemd/unit-root/boot/" pid=525404 comm="(fwupd)" flags="ro, remount, noatime, bind"

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: binfmt-support 2.2.0-2
ProcVersionSignature: Ubuntu 5.4.0-9.12-generic 5.4.3
Uname: Linux 5.4.0-9-generic x86_64
ApportVersion: 2.20.11-0ubuntu16
Architecture: amd64
Date: Fri Feb 7 13:02:00 2020
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: binfmt-support
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in binfmt-support (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.