-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Undefined (and potentially incorrect) behavior when pids limit is set to 0 #4014
Comments
For opencontainers#4014. Signed-off-by: Kir Kolyshkin <[email protected]>
OK, this only happens when systemd cgroup manager is used; when |
OK, I think the spec is not really written well in this part. The current doc (since opencontainers/runtime-spec@488f174) says is "default is no limit". Here "default" means the default Go value (of 0), and "no limit" can be interpreted as "do not set the limit" (i.e. ignore) or "set the limit to unlimited". Older version of doc (since opencontainers/runtime-spec#234), which @haircommander refers to, says "A value <= 0 indicates no limit". There were some other changes in the runtime spec, in particular moving from Overall, this resulted in spec being vague, as a result, runc actually treats I think what we should do is
|
IMHO libcontainer API changes are not a big deal. We do not technically support that anyway. I have a spec PR, I will push when I get back from teaching students. |
Description
CRI-O sets its internal pids limit to 0, attempting to "unset" it. I can't find concrete language in the current spec, but seeing opencontainers/runtime-spec#234 implies this should set the pids.max to "max".
However, since the pids limit has been supported in runc, it ignores when PidsLimit is set to 0, which causes values to populate that are unexpected, and potentially are incorrect.
For reference, crun sets the value to max when PidsLimit is set to 0
Steps to reproduce the issue
Describe the results you received and expected
the value seems to not be deterministic, and is not max
What version of runc are you using?
1.1.7, but poking through the code it seems to always have been the case
Host OS information
No response
Host kernel information
No response
The text was updated successfully, but these errors were encountered: