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 is unresponsive #7776

Closed
ocafebabe opened this issue Sep 25, 2020 · 9 comments · Fixed by #7784
Closed

podman is unresponsive #7776

ocafebabe opened this issue Sep 25, 2020 · 9 comments · Fixed by #7784
Assignees
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

@ocafebabe
Copy link

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

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Sep 25, 2020
@ocafebabe
Copy link
Author

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

@vrothberg
Copy link
Member

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
Copy link
Member

@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.

@vrothberg vrothberg self-assigned this Sep 25, 2020
@rhatdan
Copy link
Member

rhatdan commented Sep 25, 2020

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

@ocafebabe
Copy link
Author

@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 giuseppe reopened this Sep 25, 2020
@giuseppe
Copy link
Member

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

@vrothberg
Copy link
Member

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
Copy link
Member

I've opened a PR: #7784

@vrothberg
Copy link
Member

Awesome. thanks @giuseppe!

giuseppe added a commit to giuseppe/libpod that referenced this issue Sep 25, 2020
when newidmap is not installed the code would hit the
reexec_in_user_namespace_wait code and wait for the child process to
be terminated.  The child process is blocked waiting on the w pipe.

So make sure to unblock the child process first and then clean it up.

Closes: containers#7776

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
giuseppe added a commit to giuseppe/libpod that referenced this issue Oct 2, 2020
when newidmap is not installed the code would hit the
reexec_in_user_namespace_wait code and wait for the child process to
be terminated.  The child process is blocked waiting on the w pipe.

So make sure to unblock the child process first and then clean it up.

Closes: containers#7776

Signed-off-by: Giuseppe Scrivano <giuseppe@scrivano.org>
(cherry picked from commit 7147c93)
@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. 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.

5 participants