[lxc-devel] lxcfs cgroup IO error

shan.bharani at gmail.com shan.bharani at gmail.com
Thu Jan 21 05:31:47 UTC 2021


Hi,

The recent update of packages made lxc malfunction. Unable to start
containers.I have also noted that "Input/ouput Error" in /var/lib/lxcfs
directory. I dont think this is disk IO issue as this can reproduced. I
do have a VM with debian-bullseye-DI-alpha3-amd64-DVD-1.iso. I was able
create a lxc container there and it worked fine. However when I
upgraded to the latest packages I can see the same problem there.

Unable to find the package causing the problem. However I can see lxcfs
reporting IO error. I assume cgroupv2 is not getting mounting properly.
I also see /sys/fs/cgroup/unified doesnt get mounted.


Error
======

Output of lxc-start [ --logfile with --logpriority used ]
lxc-start $servername 20210110050338.110 ERROR cgfsng -
cgroups/cgfsng.c:__cgfsng_delegate_controllers:3091 - Device or
resource busy - Could not enable "+memory +pids" controllers in the
unified cgroup
"/sys/fs/cgroup/user.slice/user-1000.slice/user at 1000.service/app.slice/
app-org.gnome.Terminal.slice/vte-spawn-4a7e535f-f58e-44f0-a6dc-
9f85d15cd939.scope/cgroup.subtree_control"


$user:/var/lib/lxcfs$ ls -ltr
ls: cannot access 'cgroup': Input/output error
total 0
?????????? ? ? ? ? ? cgroup
dr-xr-xr-x 2 root root 0 Jan 11 10:59 proc
dr-xr-xr-x 2 root root 0 Jan 11 10:59 sys

System Information
==================
$uname -a
Linux $$$$$$ 5.10.0-1-amd64 #1 SMP Debian 5.10.4-1 (2020-12-31) x86_64
GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux bullseye/sid
Release: testing
Codename: bullseye


$ apt list lxc
Listing... Done
lxc/testing,now 1:4.0.5-2 amd64 [installed]

$apt list liblxc1
Listing... Done
liblxc1/testing,now 1:4.0.5-2 amd64 [installed,automatic]

$apt list lxcfs
Listing... Done
lxcfs/testing,now 4.0.5-1 amd64 [installed]

$apt list libpam-cgfs
Listing... Done
libpam-cgfs/testing,now 1:4.0.5-2 amd64 [installed]

apt list systemd
Listing... Done
systemd/testing,now 247.2-4 amd64 [installed]

$apt list libpam-systemd 
Listing... Done
libpam-systemd/testing,now 247.2-4 amd64 [installed]


$ lxc-checkconfig
LXC version 4.0.5
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-5.10.0-1-amd64
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: enabled
Network namespace: enabled

--- Control groups ---
Cgroups: enabled

Cgroup v1 mount points: 


Cgroup v2 mount points: 
/sys/fs/cgroup

Cgroup v1 systemd controller: missing
Cgroup v1 freezer controller: missing
Cgroup namespace: required
Cgroup device: enabled
Cgroup sched: enabled
Cgroup cpu account: enabled
Cgroup memory controller: enabled
Cgroup cpuset: enabled

--- Misc ---
Veth pair device: enabled, not loaded
Macvlan: enabled, not loaded
Vlan: enabled, not loaded
Bridges: enabled, loaded
Advanced netfilter: enabled, loaded
CONFIG_NF_NAT_IPV4: missing
CONFIG_NF_NAT_IPV6: missing
CONFIG_IP_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_IP6_NF_TARGET_MASQUERADE: enabled, not loaded
CONFIG_NETFILTER_XT_TARGET_CHECKSUM: enabled, loaded
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded
FUSE (for use with lxcfs): enabled, loaded

--- Checkpoint/Restore ---
checkpoint restore: enabled
CONFIG_FHANDLE: enabled
CONFIG_EVENTFD: enabled
CONFIG_EPOLL: enabled
CONFIG_UNIX_DIAG: enabled
CONFIG_INET_DIAG: enabled
CONFIG_PACKET_DIAG: enabled
CONFIG_NETLINK_DIAG: enabled
File capabilities: 

Note : Before booting a new kernel, you can check its configuration
usage : CONFIG=/path/to/config /usr/bin/lxc-checkconfig


$ mount | grep -i cgroup
cgroup2 on /sys/fs/cgroup type cgroup2
(rw,nosuid,nodev,noexec,relatime)







More information about the lxc-devel mailing list