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

nerdctl update cause pids-limit =0 #3784

Open
ningmingxiao opened this issue Dec 20, 2024 · 1 comment
Open

nerdctl update cause pids-limit =0 #3784

ningmingxiao opened this issue Dec 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ningmingxiao
Copy link
Contributor

ningmingxiao commented Dec 20, 2024

Description

goshim will call runc update to update pidmax it will ignore PidsLimit=0
https://github.com/opencontainers/runc/blob/ef5d2d4e354d8863e5d459bfbe37ca40f97037d5/libcontainer/cgroups/fs/pids.go#L22
rust shim write cgroup directly will wirte pidmax=0

Steps to reproduce the issue

when try nerdctl -n k8s.io update --cpuset-cpus 0-2 ffe
this code

if spec.Linux.Resources.Pids == nil {
spec.Linux.Resources.Pids = &runtimespec.LinuxPids{}
}

will make spec.Linux.Resources.Pids =0 it will not work on rust-shim(will cause rshim set pidlimit=0 goshim works well.).
https://github.com/containerd/rust-extensions
will cause

./nerdctl  -n k8s.io  exec  ffe  date
FATA[0000] Others("Other: OCI runtime exec failed: exec failed: unable to start container process: read init-p: connection reset by peer"): unknown

runc log 
runtime/cgo: pthread_create failed: Resource temporarily unavailable

SIGABRT: abort

PC=0x7f128ec969cf m=0 sigcode=18446744073709551610


### Describe the results you received and expected

nerdctl doesn't update pids-limit to 0

### What version of nerdctl are you using?

any

### Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

### Host information

_No response_
@ningmingxiao
Copy link
Contributor Author

@AkihiroSuda can you review this pr ,thank you?

@AkihiroSuda AkihiroSuda added bug Something isn't working and removed kind/unconfirmed-bug-claim Unconfirmed bug claim labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants