-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 file descriptor limit applies to entire container not individual processes #2053
Comments
Non priv podman is not going to be allowed to create more processes then the user is allowed to create. If it was, I would describe this as a Problem in the Kernel, and a vulnerability. I don't see how we can satisfy this issue. As a side note, I wonder if the container is limited to 1024 per UID or total. Could you create 1024 open FDs for ROOT inside the container, and another 1024 for UID 1 inside the container? (User Namespace) |
FWIW the On my fedora system the default user has a soft limit of 1024 file descriptors, and hard limit of 4096:
So if I increase the FD limit before running
There is also the problem that ulimit inside the container becomes 1024, and it cannot be raised, not even to 4096, not even if you sudo. Couple of things that come to mind:
|
I've opened a PR for fuse-overlayfs to always bump the I don't think it is possible to use multiple processes to circumvent the rlimit. The fd to the file is handed to FUSE once opened. |
Is this a BUG REPORT or FEATURE REQUEST?:
[//]: kind bug
Description
I get EMFILE when running any command inside a rootless unprivileged podman container, whenever one process in the background has used up all its file descriptors.
Steps to reproduce the issue:
(You can also install strace and run
strace esy
and seeEMFILE
errors)You can ^Z to background esy, and then try to run some commands, e.g.
id
Describe the results you received:
(errno 24 is EMFILE)
Describe the results you expected:
esy
to run without EMFILE errors, try runningsudo podman
instead, setulimit -n 1024
, and there are no EMFILE errors then.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Additional environment details (AWS, VirtualBox, physical, etc.):
Fedora 29 Silverblue physical.
This seems to be related to fuse-overlayfs running out of FDs, if I strace fuse-overlayfs outside of the container:
When run with
sudo
there apparently is no fuse-overlayfs run, which is probably why it works.Should podman increase the
ulimit
before runningfuse-overlayfs
? (not sure if it can because the user by default has a hard limit of 1024 in Fedora 29 Silverblue, unless it would use a suid/setcap helper)The text was updated successfully, but these errors were encountered: