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

Non-root podman hangs on Ubuntu 20.04 without uidmap package #7890

Closed
positron96 opened this issue Oct 2, 2020 · 5 comments · Fixed by #7892
Closed

Non-root podman hangs on Ubuntu 20.04 without uidmap package #7890

positron96 opened this issue Oct 2, 2020 · 5 comments · Fixed by #7892
Labels
kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@positron96
Copy link

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

/kind bug AND feature

Description

I've installed podman into a fresh Ubuntu 20.04 Minimal on Oracle Cloud, using instrctions from https://podman.io/getting-started/installation. Now if I run podman with sudo, everything works. If I run non-root, most podman commands hang without any output.

strace shows that podman is looping in some futex.

After checking Podman Troubleshooting Guide, I noticed that my system is missing newuidmap and newgidmap programs from uidmap package. After installing the package, all went well. However, this was very difficult to diagnose, because the guide says that in the case of missing programs, podman should complain about it. In my case, it just hanged.

So, my problem is fixed after a lot of googling and trying.

So, can the guide be updated to include information for ubuntu? Or can podman on ubuntu be made to behave same as on RHEL (complain about files missing)?

Steps to reproduce the issue:

  1. sudo podman ps (works fine)

  2. podman ps (hangs)

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.16.1
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.20, commit: '
  cpus: 2
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: journald
  hostname: master
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 5.4.0-1025-oracle
  linkmode: dynamic
  memFree: 143269888
  memTotal: 1024393216
  ociRuntime:
    name: runc
    package: 'runc: /usr/sbin/runc'
    path: /usr/sbin/runc
    version: 'runc version spec: 1.0.1-dev'
  os: linux
  remoteSocket:
    path: /run/podman/podman.sock
  rootless: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 18m 34.42s
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /var/lib/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "true"
  imageStore:
    number: 0
  runRoot: /var/run/containers/storage
  volumePath: /var/lib/containers/storage/volumes
version:
  APIVersion: 2.0.0
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.15.2
  OsArch: linux/amd64
  Version: 2.1.1

Package info (e.g. output of rpm -q podman or apt list podman):

apt list podman
Listing... Done
podman/unknown,now 2.1.1~1 amd64 [installed]
podman/unknown 2.1.1~1 arm64
podman/unknown 2.1.1~1 armhf
podman/unknown 2.1.1~1 s390x

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Oracle Cloud, Ubuntu 20.04 Minimal

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 2, 2020
@openshift-ci-robot
Copy link
Collaborator

@positron96: The label(s) kind/and cannot be applied, because the repository doesn't have them

In response to this:

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

/kind bug AND feature

Description

I've installed podman into a fresh Ubuntu 20.04 Minimal on Oracle Cloud, using instrctions from https://podman.io/getting-started/installation. Now if I run podman with sudo, everything works. If I run non-root, most podman commands hang without any output.

strace shows that podman is looping in some futex.

After checking Podman Troubleshooting Guide, I noticed that my system is missing newuidmap and newgidmap programs from uidmap package. After installing the package, all went well. However, this was very difficult to diagnose, because the guide says that in the case of missing programs, podman should complain about it. In my case, it just hanged.

So, my problem is fixed after a lot of googling and trying.

So, can the guide be updated to include information for ubuntu? Or can podman on ubuntu be made to behave same as on RHEL (complain about files missing)?

Steps to reproduce the issue:

  1. sudo podman ps (works fine)

  2. podman ps (hangs)

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      2.1.1
API Version:  2.0.0
Go Version:   go1.15.2
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
 arch: amd64
 buildahVersion: 1.16.1
 cgroupManager: systemd
 cgroupVersion: v1
 conmon:
   package: 'conmon: /usr/libexec/podman/conmon'
   path: /usr/libexec/podman/conmon
   version: 'conmon version 2.0.20, commit: '
 cpus: 2
 distribution:
   distribution: ubuntu
   version: "20.04"
 eventLogger: journald
 hostname: master
 idMappings:
   gidmap: null
   uidmap: null
 kernel: 5.4.0-1025-oracle
 linkmode: dynamic
 memFree: 143269888
 memTotal: 1024393216
 ociRuntime:
   name: runc
   package: 'runc: /usr/sbin/runc'
   path: /usr/sbin/runc
   version: 'runc version spec: 1.0.1-dev'
 os: linux
 remoteSocket:
   path: /run/podman/podman.sock
 rootless: false
 slirp4netns:
   executable: ""
   package: ""
   version: ""
 swapFree: 0
 swapTotal: 0
 uptime: 18m 34.42s
registries:
 search:
 - docker.io
 - quay.io
store:
 configFile: /etc/containers/storage.conf
 containerStore:
   number: 0
   paused: 0
   running: 0
   stopped: 0
 graphDriverName: overlay
 graphOptions: {}
 graphRoot: /var/lib/containers/storage
 graphStatus:
   Backing Filesystem: extfs
   Native Overlay Diff: "false"
   Supports d_type: "true"
   Using metacopy: "true"
 imageStore:
   number: 0
 runRoot: /var/run/containers/storage
 volumePath: /var/lib/containers/storage/volumes
version:
 APIVersion: 2.0.0
 Built: 0
 BuiltTime: Thu Jan  1 00:00:00 1970
 GitCommit: ""
 GoVersion: go1.15.2
 OsArch: linux/amd64
 Version: 2.1.1

Package info (e.g. output of rpm -q podman or apt list podman):

apt list podman
Listing... Done
podman/unknown,now 2.1.1~1 amd64 [installed]
podman/unknown 2.1.1~1 arm64
podman/unknown 2.1.1~1 armhf
podman/unknown 2.1.1~1 s390x

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Oracle Cloud, Ubuntu 20.04 Minimal

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 2, 2020
@vrothberg
Copy link
Member

Thanks for opening the issue, @positron96!

I believe @giuseppe fixed that already in our main branch but I am not sure if we backported it to v2.1. @giuseppe can you have a look?

@giuseppe giuseppe linked a pull request Oct 2, 2020 that will close this issue
@giuseppe
Copy link
Member

giuseppe commented Oct 2, 2020

backport here: #7892

@positron96
Copy link
Author

Amazing! Thank you guys, looking forward to using podman extensively.

@vrothberg
Copy link
Member

backport here: #7892

That was super quick. Thanks a ton, @giuseppe !

@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 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 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. kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants