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

podman-2.0.2: --pids-limit value out of range #6908

Closed
srcshelton opened this issue Jul 8, 2020 · 5 comments
Closed

podman-2.0.2: --pids-limit value out of range #6908

srcshelton opened this issue Jul 8, 2020 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@srcshelton
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

I added --pids-limit 1024 to my default launch scripts for running podman (after nearly accidentally fork-bombing my host!) at about podman-1.9.3, and this has been accepted (... and, I assume, applied?) ever since...

However, with podman-2.0.2 suddenly I'm getting:

Error: strconv.ParseInt: parsing "1024": value out of range

... as podman's sole output.

I've tried various different values, and it turns out that values from 0 to 511 are accepted, but values 512 and above result in the above error. I've confirmed that this is the --pids-limit parameter causing this issue.

A value of 1024 seems sane for a root-run container, and has always been accepted up to and including podman-2.0.1 - has this always been silently ignored, or is there a problem introduced with podman-2.0.2?

(Is there some sysctl tunable or otherwise which limits the default number of available PIDs which wasn't previously being checked?)

Output of podman version:

Version:      2.0.2
API Version:  1
Go Version:   go1.14.2
Git Commit:   201c9505b88f451ca877d29a73ed0f1836bb96c7
Built:        Wed Jul  8 13:06:00 2020
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.15.0
  cgroupVersion: v1
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.17, commit: 41877362fc4685d55e0473d2e4a1cbe5e1debee0'
  cpus: 8
  distribution:
    distribution: gentoo
    version: unknown
  eventLogger: file
  hostname: dellr330
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.38-gentoo
  linkmode: dynamic
  memFree: 2792194048
  memTotal: 8132182016
  ociRuntime:
    name: runc
    package: Unknown
    path: /usr/bin/runc
    version: |-
      runc version 1.0.0-rc10
      commit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
      spec: 1.0.1-dev
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 25111392256
  swapTotal: 25769787392
  uptime: 797h 38m 40.69s (Approximately 33.21 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 2
    paused: 0
    running: 1
    stopped: 1
  graphDriverName: overlay
  graphOptions:
    overlay.ignore_chown_errors: "false"
  graphRoot: /space/podman/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 836
  runRoot: /space/podman/run
  volumePath: /space/podman/volumes
version:
  APIVersion: 1
  Built: 1594213560
  BuiltTime: Wed Jul  8 13:06:00 2020
  GitCommit: 201c9505b88f451ca877d29a73ed0f1836bb96c7
  GoVersion: go1.14.2
  OsArch: linux/amd64
  Version: 2.0.2
@srcshelton
Copy link
Contributor Author

Something related to c4023a9?

@mheon
Copy link
Member

mheon commented Jul 8, 2020

Confirmed. Only happens on the v2.0 branch, not master.

@mheon mheon added the kind/bug Categorizes issue or PR as related to a bug. label Jul 8, 2020
@mheon
Copy link
Member

mheon commented Jul 8, 2020

Fix in #6910

mheon added a commit to mheon/libpod that referenced this issue Jul 15, 2020
The --pids-limit flag was using strconv.ParseInt with bad
arguments, resulting in it being unable to parse standard
integers (1024, for example, would produce an 'out of range'
error).

Change the arguments to make sense (base 10, max 32-bit) and
add a test to ensure we don't regress again.

Fixes containers#6908

Signed-off-by: Matthew Heon <[email protected]>
@zhangguanzhang
Copy link
Collaborator

@rhatdan please close this issue

@TomSweeneyRedHat
Copy link
Member

Closing as the PR addressing this has merged: #6910

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

4 participants