Skip to content

Consider revert #3931 nsexec: cloned_binary: remove bindfd logic entirely #3973

@lifubang

Description

@lifubang

Description

With runc built from the main branch:
If I create 450 containers in a 8G memory node, all the memory will be eat by runc.
The node will be in stuck state.

With runc 1.1.8, it will success.

I think when using memfd_create, runc binary will be in memory, so if we batch create containers, it will eat node's memory before the container started.
In my head, maybe containerd uses runc create for the first step when run a container.

Steps to reproduce the issue

  1. make runc binary with main branch
  2. use a bash script to start 450 containers

the bash script:

#!/bin/bash
for((i=1; i<=450; i ++))
do
        /opt/runc create test"$i" &
done

Describe the results you received and expected

received:
The node is in stuck state, because there is no enough memory left in the node.

expected:
All containers should be created normally.

What version of runc are you using?

runc version 1.1.0+dev
commit: v1.1.0-688-g74c125d8
spec: 1.1.0
go: go1.18.4
libseccomp: 2.5.1

Host OS information

PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Host kernel information

Linux iZ2ze4a8qvjqt6lt7ommf8Z 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions