LXC 4.0.9 : Kernel does not support pidfds

Hi All,
Please, could you tell me what it means this error ?
FYI, my squashfs file has been built with the command below
/usr/sbin/debootstrap --verbose --include=sysvinit-core,locales --variant=minbase --arch=amd64 --for
eign buster “$DEBIAN_ROOT”
Thanks & regards,
Kim

Extract from logfile
lxc-start JIZOM_DB.CT 20210608130601.888 ERROR utils - utils.c:lxc_can_use_pidfd:1772 - Kernel does not support pidfds
lxc-start JIZOM_DB.CT 20210608130601.890 INFO start - start.c:lxc_spawn:1757 - Cloned CLONE_NEWNS
lxc-start JIZOM_DB.CT 20210608130601.890 INFO start - start.c:lxc_spawn:1757 - Cloned CLONE_NEWPID
lxc-start JIZOM_DB.CT 20210608130601.890 INFO start - start.c:lxc_spawn:1757 - Cloned CLONE_NEWUTS
lxc-start JIZOM_DB.CT 20210608130601.890 INFO start - start.c:lxc_spawn:1757 - Cloned CLONE_NEWIPC
lxc-start JIZOM_DB.CT 20210608130601.890 INFO start - start.c:lxc_spawn:1757 - Cloned CLONE_NEWNET
lxc-start JIZOM_DB.CT 20210608130601.890 DEBUG start - start.c:lxc_try_preserve_namespace:140 - Preserved mnt namespace via fd 53 and stashed path as mnt:/proc/1345/fd/53
lxc-start JIZOM_DB.CT 20210608130601.890 DEBUG start - start.c:lxc_try_preserve_namespace:140 - Preserved pid namespace via fd 54 and stashed path as pid:/proc/1345/fd/54
lxc-start JIZOM_DB.CT 20210608130601.890 DEBUG start - start.c:lxc_try_preserve_namespace:140 - Preserved uts namespace via fd 55 and stashed path as uts:/proc/1345/fd/55
lxc-start JIZOM_DB.CT 20210608130601.890 DEBUG start - start.c:lxc_try_preserve_namespace:140 - Preserved ipc namespace via fd 56 and stashed path as ipc:/proc/1345/fd/56
lxc-start JIZOM_DB.CT 20210608130601.890 DEBUG start - start.c:lxc_try_preserve_namespace:140 - Preserved net namespace via fd 57 and stashed path as net:/proc/1345/fd/57

It means your kernel doesn’t have support for pidfds :slight_smile:

pidfd is a kernel feature which LXC uses when available for faster and safer process and attach handling.

Hi,
We didn’t get this error with LXC 2.0.7.
I tried with my squashfs file which has been built with the kernel of debian 9 (Stretch).
And i got the same erreur.
Have you some more clarifications ?
Thanks & regards,
Kim

Is it actually preventing your container from starting up? (it shouldn’t)

My container stopped after some errors below
(I got the same erreur with the config debian 9 which has been running with v2.0.7)

lxc-start JIZOM_DB.CT 20210608152834.769 NOTICE start - start.c:start:2159 - Exec’ing “/sbin/init”
lxc-start JIZOM_DB.CT 20210608152834.770 ERROR start - start.c:start:2162 - No such file or directory

  • Failed to exec “/sbin/init”
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE sync - sync.c:lxc_sync_wake_parent:106 - Child waking parent with sequence error
    lxc-start JIZOM_DB.CT 20210608152834.770 ERROR sync - sync.c:sync_wait:36 - An error occurred in another process (expected sequence number 7)
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_MNT_NS=/proc/1991/fd/53
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_PID_NS=/proc/1991/fd/54
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_UTS_NS=/proc/1991/fd/55
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_IPC_NS=/proc/1991/fd/56
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_NET_NS=/proc/1991/fd/57
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_CGROUP_NS=/proc/1991/fd/5
    lxc-start JIZOM_DB.CT 20210608152834.770 DEBUG network - network.c:lxc_delete_network:4180 - Deleted network devices
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_serve_state_clients:448 - Set container state to ABORTING

This trace is better

lxc-start JIZOM_DB.CT 20210608152834.769 NOTICE start - start.c:start:2159 - Exec’ing “/sbin/init”
lxc-start JIZOM_DB.CT 20210608152834.770 ERROR start - start.c:start:2162 - No such file or directory

  • Failed to exec “/sbin/init”
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE sync - sync.c:lxc_sync_wake_parent:106 - Child waking parent with sequence error
    lxc-start JIZOM_DB.CT 20210608152834.770 ERROR sync - sync.c:sync_wait:36 - An error occurred in another process (expected sequence number 7)
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_MNT_NS=/proc/1991/fd/53
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_PID_NS=/proc/1991/fd/54
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_UTS_NS=/proc/1991/fd/55
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_IPC_NS=/proc/1991/fd/56
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_NET_NS=/proc/1991/fd/57
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_expose_namespace_environment:884 -
    Set environment variable LXC_CGROUP_NS=/proc/1991/fd/5
    lxc-start JIZOM_DB.CT 20210608152834.770 DEBUG network - network.c:lxc_delete_network:4180 - Deleted network devices
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_serve_state_clients:448 - Set container state to ABORTING
    lxc-start JIZOM_DB.CT 20210608152834.770 TRACE start - start.c:lxc_serve_state_clients:451 - No state

@brauner

Hi Stephane,
I got this comment from you (25 June 2016)
https://github.com/lxc/lxc/issues/1057
(
debootstrap in debian no longer installs an init system. This seems wrong to me but it’s intentional. A recent template change in LXC now has lxc-debian always install an init system, fixing this issue.
)
Is it related to my issue ?
Thanks & regards,
Kim

Yes, it means that you don’t have /sbin/init in your image and so LXC can’t boot the container. :slight_smile: