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

Failed to set RLIMITS_NOFILE: setting new RLIMITS_NOFILE: invalid argument #21589

Closed
theurgi opened this issue Feb 9, 2024 · 17 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related stale-issue

Comments

@theurgi
Copy link

theurgi commented Feb 9, 2024

Issue Description

Every podman command's output includes:

Failed to set RLIMITS_NOFILE: setting new RLIMITS_NOFILE: invalid argument

I was not experiencing this before upgrading to 4.9.2 from ~4.7

Steps to reproduce the issue

Steps to reproduce the issue

  1. Download and install v4.9.2/podman-installer-macos-amd64.pkg on macOS 10.15.7
  2. Run podman machine init or any podman [options] [command]
  3. See the Failed to set RLIMITS_NOFILE: setting new RLIMITS_NOFILE: invalid argument message

Describe the results you received

.

Describe the results you expected

.

podman info output

OS: darwin/amd64
provider: qemu
version: 4.9.2

Podman in a container

Yes

Privileged Or Rootless

Rootless

Upstream Latest Release

Yes

Additional environment details

No response

Additional information

No response

@theurgi theurgi added the kind/bug Categorizes issue or PR as related to a bug. label Feb 9, 2024
@Luap99
Copy link
Member

Luap99 commented Feb 9, 2024

What are your limits (ulimit -S -n and ulimit -H -n assuming macos uses the same command to check these as linux)?

Most likely this is the change which is causing that for you 5e0471b, however it is not clear why that would fail for you and not others.

@Luap99 Luap99 added the macos MacOS (OSX) related label Feb 9, 2024
@theurgi
Copy link
Author

theurgi commented Feb 9, 2024

ulimit -S -n
256

❯ ulimit -H -n
unlimited

5e0471b is a possibility since 4.7.2 is the most recent release where I don't experience this issue. Maybe #16106 (comment) will do the trick?

@Luap99
Copy link
Member

Luap99 commented Feb 9, 2024

Maybe #16106 (comment) will do the trick?

This will change nothing here.

So your hard limit is unlimited but we cannot set he soft limit to unlimited that seem rather odd.
What happens if you run ulimit -S -n unlimited?

This apple bug sounds relevant: https://forums.developer.apple.com/forums/thread/735798

@baude @ashley-cui @jakecorrenti Did you ever saw such problems on your macs?

@jakecorrenti
Copy link
Member

I have not run into this before on my side

@theurgi
Copy link
Author

theurgi commented Feb 9, 2024

This apple bug sounds relevant: https://forums.developer.apple.com/forums/thread/735798

( face palm )

My need for a container arises from a different macOS issue, where I can't develop with the latest Bun release because of a dyld: Symbol not found error. The suggested fix is to Please upgrade to macOS 12+, but I can't because it doesn't support my hardware. 🙃

There are some other potential workarounds, but to save myself from having to reflect any further on the house of cards that comprises our entire digital infrastructure, for now I'll just sweep this under the rug and roll with v4.7.2. 🤝

What happens if you run ulimit -S -n unlimited?

I will try this later with a newer release and report back. 🙏

@Luap99
Copy link
Member

Luap99 commented Feb 12, 2024

So reading more from the bug it seems apple does not allow setting the limit to greater than OPEN_MAX for some stupid reason even though the limit says it is unlimited we cannot set it to more than OPEN_MAX. So just need to figure out what value OPEN_MAX has on a mac and then not try to set something higher than that in the linked podman code.

@ghost
Copy link

ghost commented Feb 16, 2024

When I made the commit, think I was on a build of MacOS 13.

A cursory search of MacOS 10 leads me to believe it's EOL. I'm not sure if it's worth patching podman, because EOL makes me think it isn't getting security patches.

@theurgi I don't think bun takes long to compile. If you just need bun, have you tried installing it from source? Might get lucky and have a working bun binary. Can't say for sure what to expect.

@ghost
Copy link

ghost commented Feb 16, 2024

Perhaps this is a Go bug in this case? Here is a comment about the issue in the codebase: https://github.com/golang/go/blob/1c9c9c8412f7d650a543c31478a82b9d61d1dd14/src/syscall/rlimit_darwin.go#L11C1-L12C54

Copy link

A friendly reminder that this issue had no activity for 30 days.

@Luap99
Copy link
Member

Luap99 commented Apr 3, 2024

Is this still an issue for you?

@theurgi
Copy link
Author

theurgi commented Apr 4, 2024

Is this still an issue for you?

It is. I tried upgrading to Podman v5.0.1 but still encounter the same error. Updating the ulimit has no effect.

I suspect the issue is related to macOS v10 and I'm in the process of migrating to Linux.

Feel free to close this issue if it's open only for my sake. Thanks for your help.

@rhatdan rhatdan closed this as completed Apr 5, 2024
@TimothyElems
Copy link

This is an issue for me as well; and I have the same setup as @theurgi

@uncleguanghui
Copy link

This is an issue for me as well; and I have the same setup as @theurgi

MacOS Catalina 10.15.7
podman version: 5.1.1

@Luap99
Copy link
Member

Luap99 commented Jun 20, 2024

Then update to a newer version, Catalina has been EOL for almost two years now and podman machine since 5.0 doesn't support it anyway. #22121

@abhins
Copy link

abhins commented Aug 18, 2024

MacBook-Pro:~ mymac$ podman machine init
Failed to set RLIMITS_NOFILE: setting new RLIMITS_NOFILE: invalid argument
Looking up Podman Machine image at quay.io/podman/machine-os:5.1 to create VM
Error: failed to pull quay.io/podman/machine-os@sha256:20fb29072e8a7271f11dd886d0f76123ba0c24869fdf031990b4851163e9db55: faccessat /Users/mymac/.local/share/containers/podman/machine/applehv/cache/20fb29072e8a7271f11dd886d0f76123ba0c24869fdf031990b4851163e9db55: invalid argument

MacBook-Pro:~ mymac$ podman info
Failed to set RLIMITS_NOFILE: setting new RLIMITS_NOFILE: invalid argument
OS: darwin/amd64
provider: applehv
version: 5.1.2

Cannot connect to Podman. Please verify your connection to the Linux system using podman system connection list, or try podman machine init and podman machine start to manage a new Linux VM
Error: unable to connect to Podman socket: Get "http://d/v5.1.2/libpod/_ping": dial unix /var/folders/1d/t44ljhrn7qn_46zy55z680zw0000gn/T/storage-run-501/podman/podman.sock: connect: no such file or directory

macOS Mojave
Version: 10.14.6
MacBook Pro (13-inch, Mid 2012)
Processor: 2.5 GHz Intel Core i5

@lost-carrier
Copy link

Same here...
OS: darwin/amd64
provider: applehv
version: 5.3.0

Mac OS 10.13.6

@tragicdog
Copy link

tragicdog commented Dec 3, 2024

Also experiencing this issue. I know Catalina is EOL, but the hardware works. Is the the only fix for us to throw out the hardware and buy new, not use Podman, or wipe the machine and not use macOS?

OS:darwin/amd64
provider: applehv
version 5.3.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. macos MacOS (OSX) related stale-issue
Projects
None yet
Development

No branches or pull requests

9 participants