Skip to content

fix(update): avoid update resource while the process is zombie #393

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

Merged
merged 1 commit into from
May 9, 2025

Conversation

jokemanfire
Copy link
Contributor

add a check in zombie init process.

If update task between the wait_pid call and init exit. The bug will occur, the cgroup maybe update the root's cgroup path.
Because the cgroup path has been recycled by system ,but the wait_pid haven't recycled the resource of the process. The update task is processing.

A easy way to reproduce this bug. Occasionally triggered in high concurrency scenarios.

  1. start a shim ,like cri
    crictl run --no-pull container-config.json pod.json
  2. gdb -p {target shim pod}
    (gdb) handle SIGCHLD ignore
    (gdb) continue
  3. kill the init process

the init process will become zombie , you can send update task to the shim ,but the cgroup path is not correct.

@jokemanfire
Copy link
Contributor Author

@mxpv @Mossaka Project CI may have some problems , could fix it ?

@mxpv
Copy link
Member

mxpv commented May 8, 2025

@jokemanfire can you rebase the PR? CI should be fixed #395

add a check in zombie init process

Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
@jokemanfire
Copy link
Contributor Author

@mxpv fixed

@mxpv mxpv added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@jokemanfire
Copy link
Contributor Author

@mxpv it looks like IT fail ,I checked the logs, but there's no clue. Can you take a look?

@mxpv mxpv added this pull request to the merge queue May 9, 2025
Merged via the queue into containerd:main with commit cea5523 May 9, 2025
15 checks passed
@jokemanfire jokemanfire deleted the dev branch May 9, 2025 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-runc-shim Runc shim
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants