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:

I have got the same error imformation after an unexpected power loss.

lxc u18 20210719115945.794 ERROR utils - utils.c:lxc_can_use_pidfd:1772 - Kernel does not support pidfds
lxc u18 20210719115945.863 ERROR conf - conf.c:turn_into_dependent_mounts:3340 - No such file or directory - Failed to recursively turn old root mount tree into dependent mount. Continuing…
lxc u18 20210719115945.992 ERROR conf - conf.c:run_buffer:316 - Script exited with status 1
lxc u18 20210719115945.992 ERROR conf - conf.c:lxc_setup:3686 - Failed to run mount hooks
lxc u18 20210719115945.992 ERROR start - start.c:do_start:1265 - Failed to setup container “u18”
lxc u18 20210719115945.993 ERROR sync - sync.c:sync_wait:36 - An error occurred in another process (expected sequence number 5)
lxc u18 20210719115946.127 WARN network - network.c:lxc_delete_network_priv:3621 - Failed to rename interface with index 0 from “eth0” to its initial name “vethda7f0914”
lxc u18 20210719115946.140 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:868 - Received container state “ABORTING” instead of “RUNNING”
lxc u18 20210719115946.145 ERROR start - start.c:__lxc_start:2073 - Failed to spawn container “u18”
lxc u18 20210719115946.147 WARN start - start.c:lxc_abort:1022 - No such process - Failed to send SIGKILL to 16659
lxc 20210719115951.867 ERROR af_unix - af_unix.c:lxc_abstract_unix_recv_fds_iov:207 - Connection reset by peer - Failed to receive response
lxc 20210719115951.868 ERROR commands - commands.c:lxc_cmd_rsp_recv_fds:129 - Failed to receive file descriptors

I found that changing the setting of nvidia.runtime can repeatedly produce this issue.
I install the nvidia driver in the container, then it works for now.