Skip to content
New issue

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

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

Already on GitHub? # to your account

Regression: zombie runc:[1:CHILD] processes #2022

Closed
LittleLightLittleFire opened this issue Mar 21, 2019 · 0 comments
Closed

Regression: zombie runc:[1:CHILD] processes #2022

LittleLightLittleFire opened this issue Mar 21, 2019 · 0 comments

Comments

@LittleLightLittleFire
Copy link
Contributor

LittleLightLittleFire commented Mar 21, 2019

Whenever we execute code in nsenter.c and read back the child pid, we always need to be aware that the code in nsenter will spawn a zombie runc:[1:CHILD] process that needs to be cleaned up by the parent.

The code in process_linux.go was updated to support cgroup namespaces and uses the nsenter.c to spawn another process.

if err := json.NewDecoder(p.parentPipe).Decode(&pid); err != nil {
p.cmd.Wait()
return -1, err
}
return pid.Pid, nil
}

This does not clean up runc:[1:CHILD] as done here:

if err := json.NewDecoder(p.parentPipe).Decode(&pid); err != nil {
p.cmd.Wait()
return newSystemErrorWithCause(err, "reading pid from init pipe")
}
// Clean up the zombie parent process
firstChildProcess, err := os.FindProcess(pid.PidFirstChild)
if err != nil {
return err
}
// Ignore the error in case the child has already been reaped for any reason
_, _ = firstChildProcess.Wait()

I've prepared a PR to address this.

@LittleLightLittleFire LittleLightLittleFire changed the title Regression: zombie runc:[1:child] processes Regression: zombie runc:[1:CHILD] processes Mar 21, 2019
a-palchikov added a commit to gravitational/planet that referenced this issue Jul 8, 2020
* Bump runc to 1.0.0-rc10 to fix the regression described here:
opencontainers/runc#2022

* Update dependencies to match the version of opecontainers/runc
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant