containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.16k stars 2.36k forks source link

podman is unresponsive #7776

Closed ocafebabe closed 3 years ago

ocafebabe commented 3 years ago

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

/kind bug

Description

podman isn't working as expected after installing it on a system with a previous docker installation

Steps to reproduce the issue:

  1. Install docker.io

  2. Uninstall docker.io

  3. Install podman using Ubuntu 20.04 Kubic repository

Describe the results you received: freeze

Describe the results you expected: working condition

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

Linux Mint 20 (Ubuntu 20.04)

Output of podman version:

podman version 2.1.0

Output of podman info --debug:

N/A (doesn't work)

Output of: strace podman info --debug

newfstatat(AT_FDCWD, "/home/cbourque/.local/bin/newuidmap", 0xc00065b968, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/home/cbourque/bin/newuidmap", 0xc00065ba38, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/sbin/newuidmap", 0xc00065bb08, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/bin/newuidmap", 0xc00065bbd8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/sbin/newuidmap", 0xc00065bca8, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/bin/newuidmap", 0xc00065bd78, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/sbin/newuidmap", 0xc00065be48, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/bin/newuidmap", 0xc00065bf18, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/games/newuidmap", 0xc00065e038, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/local/games/newuidmap", 0xc00065e108, 0) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/snap/bin/newuidmap", 0xc00065e1d8, 0) = -1 ENOENT (No such file or directory)
wait4(10112, 

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

podman/unknown,now 2.1.0~1 amd64 [installed]
podman/unknown 2.1.0~1 arm64
podman/unknown 2.1.0~1 armhf
podman/unknown 2.1.0~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.):

physical

ocafebabe commented 3 years ago

It seems to be a permission issue because: sudo podman info works as expected...

vrothberg commented 3 years ago

I ran into a similar issues yesterday on Amazon Linux 2. Can you run which newuidmap and see if that's installed?

It's part of the shadowutils package. @lsm5 PTAL

vrothberg commented 3 years ago

@giuseppe @mheon @rhatdan ... it seems that rootless podman can hang when new{u,g}idmap is absent. I ran into the same symptom yesterday preparing the HPC workshop. It didn't occur on all systems (even without the binaries) so I am under the impression there's a race condition.

rhatdan commented 3 years ago

@ocafebabe Can you confirm that newuidmap was missing from your machine?

ocafebabe commented 3 years ago

@ocafebabe Can you confirm that newuidmap was missing from your machine?

@rhatdan yes it was, I had to install this package: uidmap

This problem seems to be a regression: 2211

IMHO this package should be added as a mandatory dependency...

Thanks

giuseppe commented 3 years ago

reopened the issue. We should not hang also when newuidmap/newgidmap is not installed

vrothberg commented 3 years ago

I had a look at the code but couldn't spot a race: afaics, we're doing a cmd.Exec("newuidmap", ....) which should fail during path look up.

giuseppe commented 3 years ago

I've opened a PR: https://github.com/containers/podman/pull/7784

vrothberg commented 3 years ago

Awesome. thanks @giuseppe!