Received: from MAILRELAY-S18.hafenthal.de (gw2.hafenthal.de [212.185.86.83]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 10E51782B49 for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 17:52:11 +0000 (UTC) Received: from MAILRELAY-S18 (localhost [127.0.0.1]) by MAILRELAY-S18.hafenthal.de (Postfix) with ESMTP id 351E720293 for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 18:52:09 +0100 (CET) Received: from localhost (127.0.0.1) by MAILRELAY-S18 (F-Secure/fsigk_smtp/550/MAILRELAY-S18); Fri, 20 Nov 2020 18:52:09 +0100 (CET) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/MAILRELAY-S18) Received: from GROUPWARE-S18.hafenthal.de (GROUPWARE-S18.hafenthal.de [10.18.8.20]) by gw2.hafenthal.de (Postfix) with ESMTPS id 1F293200CF for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 18:52:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by GROUPWARE-S18.hafenthal.de (Postfix) with ESMTP id CFD3B2012F for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 18:52:08 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at GROUPWARE-S18.hafenthal.de Received: from GROUPWARE-S18.hafenthal.de ([IPv6:::1]) by localhost (groupware-s18.hafenthal.de [IPv6:::1]) (amavisd-new, port 10041) with ESMTP id X6pWwJtgdSy5 for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 18:52:07 +0100 (CET) Received: from [10.18.16.35] (DTR15.hafenthal.de [10.18.16.35]) by GROUPWARE-S18.hafenthal.de (Postfix) with ESMTPSA id 6BB8D20242 for <~alpine/users@lists.alpinelinux.org>; Fri, 20 Nov 2020 18:52:07 +0100 (CET) To: ~alpine/users@lists.alpinelinux.org From: Stefan Hartmann Subject: lxc-start ERROR and segfault Organization: =?UTF-8?Q?Ingenieurb=c3=bcro_Hartmann?= Message-ID: Date: Fri, 20 Nov 2020 18:52:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: 7bit Hi, I am trying to set up LXC on a Alpine Host 3.12.1 (for testing purposes on VMw Wokstation 15, vHw 11) The error apperars on Alpine >= 3.11, it works on alpine-extended-3.10.5-x86_64.iso! For narrowing the issue I did a fresh install from alpine-extended-3.11.0-x86_64.iso with setup-alpine and sys setup. Then apk add lxc lxc-doc lxc-download apk -v info | grep ... musl-1.1.24-r3 musl-utils-1.1.24-r3 lxc-libs-3.2.1-r2 lxc-3.2.1-r2 lxc-openrc-3.2.1-r2 lxc-doc-3.2.1-r2 lxc-download-3.2.1-r2 Then rc-update add cgroups && reboot Then /usr/share/lxc/templates/lxc-download --list and lxc-create -t /usr/share/lxc/templates/lxc-download -n CONTVM1 -- -d alpine -r 3.11 -a amd64 sucessfully created a container. But starting ... # lxc-start -n CONTVM1 lxc-start: CONTVM1: lxccontainer.c: wait_on_daemonized_start: 864 No such file or directory - Failed to receive the container state lxc-start: CONTVM1: tools/lxc_start.c: main: 329 The container failed to start lxc-start: CONTVM1: tools/lxc_start.c: main: 332 To get more details, run the container in foreground mode lxc-start: CONTVM1: tools/lxc_start.c: main: 334 Additional information can be obtained by setting the --logfile and --logpriority options # lxc-start -n CONTVM1 -F -l DEBUG -o /tmp/$$.log lxc-start: CONTVM1: cgroups/cgfsng.c: mkdir_eexist_on_last: 1279 File exists - Failed to create directory "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" lxc-start: CONTVM1: cgroups/cgfsng.c: monitor_create_path_for_hierarchy: 1300 Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" lxc-start: CONTVM1: cgroups/cgfsng.c: cgfsng_monitor_create: 1389 Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" Segmentation fault # in the logfile lxc-start CONTVM1 20201120171101.110 INFO start - start.c:lxc_init:932 - Container "CONTVM1" is initialized lxc-start CONTVM1 20201120171101.110 ERROR cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1279 - File exists - Failed to create directory "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" lxc-start CONTVM1 20201120171101.110 ERROR cgfsng - cgroups/cgfsng.c:monitor_create_path_for_hierarchy:1300 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" lxc-start CONTVM1 20201120171101.111 ERROR cgfsng - cgroups/cgfsng.c:cgfsng_monitor_create:1389 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1" lxc-start CONTVM1 20201120171101.111 ERROR cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1279 - File exists - Failed to create directory "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-1" lxc-start CONTVM1 20201120171101.111 ERROR cgfsng - cgroups/cgfsng.c:monitor_create_path_for_hierarchy:1300 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-1" lxc-start CONTVM1 20201120171101.112 ERROR cgfsng - cgroups/cgfsng.c:cgfsng_monitor_create:1389 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-1" lxc-start CONTVM1 20201120171101.112 ERROR cgfsng - cgroups/cgfsng.c:mkdir_eexist_on_last:1279 - File exists - Failed to create directory "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-2" lxc-start CONTVM1 20201120171101.112 ERROR cgfsng - cgroups/cgfsng.c:monitor_create_path_for_hierarchy:1300 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-2" lxc-start CONTVM1 20201120171101.112 ERROR cgfsng - cgroups/cgfsng.c:cgfsng_monitor_create:1389 - Failed to create cgroup "/sys/fs/cgroup/openrc//lxc.monitor/CONTVM1-2" # Debug with strace # strace /usr/bin/lxc-start -n CONTVM1 -F ... stat("/sys/devices/system/cpu/isolated", {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 open("/sys/devices/system/cpu/isolated", O_RDONLY) = 9 read(9, "\n", 1024) = 1 read(9, "", 1024) = 0 close(9) = 0 stat("/sys/devices/system/cpu/offline", {st_mode=S_IFREG|0444, st_size=4096, ...}) = 0 open("/sys/devices/system/cpu/offline", O_RDONLY) = 9 read(9, "1-127\n", 1024) = 6 read(9, "", 1024) = 0 close(9) = 0 open("/sys/fs/cgroup/cpuset//lxc.monitor/cpuset.cpus", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = 9 fcntl(9, F_SETFD, FD_CLOEXEC) = 0 write(9, "0\n", 2) = 2 close(9) = 0 --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} --- +++ killed by SIGSEGV +++ Segmentation fault #alpine3110:~# CONFIG=/boot/config-lts lxc-checkconfig --- Namespaces --- Namespaces: enabled Utsname namespace: enabled Ipc namespace: enabled Pid namespace: enabled User namespace: enabled newuidmap is not installed newgidmap is not installed Network namespace: enabled --- Control groups --- Cgroups: enabled Cgroup v1 mount points: /sys/fs/cgroup/openrc /sys/fs/cgroup/cpuset /sys/fs/cgroup/cpu /sys/fs/cgroup/cpuacct /sys/fs/cgroup/blkio /sys/fs/cgroup/memory /sys/fs/cgroup/devices /sys/fs/cgroup/freezer /sys/fs/cgroup/net_cls /sys/fs/cgroup/net_prio /sys/fs/cgroup/hugetlb /sys/fs/cgroup/pids Cgroup v2 mount points: /sys/fs/cgroup/unified Cgroup v1 systemd controller: missing Cgroup v1 clone_children flag: enabled 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, not loaded Advanced netfilter: enabled, not 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, not loaded CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled, not loaded FUSE (for use with lxcfs): enabled, not loaded --- Checkpoint/Restore --- checkpoint restore: missing 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 Nb: the output is the same as for a functional Alpine 3.10.5 installation. # Q? Is there some adjustment necessary? eg CPU? Or is this a know lib incompatibility? Interestingly it works without any problems with Alpine <= 3.10.5! Perhaps I will try a physical install. Nb I really enjoy Alpine Linux as a perfect small system for a low-level virtualization HOST, it works like a charm with qemu-kvm, but not yet with lxc withour downgrading :-( -- Stefan Hartmann