google / google/gvisor

Use pidfd in runsc process management

Open
#2,139 0 comments 0 reactions 0 assignees View on GitHub
priority: p3 type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

runsc uses gofer and sandbox PIDs to check whether the sandbox is still running and to kill it on destruction. There is a chance the PID belongs to another process and it ends up killing the wrong one. pidfd helps because it can be used to guarantee that the correct process is being killed. In case of vanilla runsc it can open pidfd, check if this the correct process, then send signal. In case we have moved to having a dedicated runsc client (#238), then pidfd can replace pid's everywhere.

We may also be able to use pidfd to check if the parent still exists in `runsc boot --attached` after setting parent death signal to ensure the parent hasn't died before the signal is set.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.