Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'runc delete --force' command can't delete container if runc receives a SIGKILL before it can generate the state.json file. #4534

Open
jianghao65536 opened this issue Nov 18, 2024 · 0 comments · May be fixed by #4535

Comments

@jianghao65536
Copy link

jianghao65536 commented Nov 18, 2024

Description

This issue will occur if the following conditions are met simultaneously:

  1. The container engine has a set timeout. (runc will receive a SIGKILL if it times out)
  2. runc receives a SIGKILL before procReady

This issue has the following effects:

  1. It leaves residuals in the cgroup.
  2. If runc gets terminated before it can write 'THAWED' into the freezer.state while setting up the cgroup, then the runc init will hang. 4481 4228
  3. The 'runc delete --force' command will fail because the state.json file isn't generated.

Steps to reproduce the issue

  1. add time.Sleep(20 * time.Sleep) before this line.
  2. runc --systemd-cgroup run test_container &
  3. kill -9 $!
  4. runc delete test_container --force
{B4F6E40E-1F72-46F5-9320-3E896DCA7D2F}

Describe the results you received and expected

We're hoping that the 'runc delete --force' command will run as expected.

What version of runc are you using?

v1.1.15

Host OS information

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

Host kernel information

4.18

@jianghao65536 jianghao65536 changed the title The 'runc delete --force' command will fail if runc receives a SIGKILL before it can generate the state.json file. The 'runc delete --force' command can't delete container if runc receives a SIGKILL before it can generate the state.json file. Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant