-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
macos: cnid_metad failing to load "setlimits: Invalid argument" #1793
Comments
Note: afpd has similar |
Are there any particular preconditions required to trigger this code path on macOS? I have not observed it on macOS 14 or 15. Regardless, I agree that lowering the number of permitted opened files to ~10k seems reasonable. |
Just compile and run. Looking at the Emaculation thread, others have had the problem, so it appears to be OS version dependent. |
Can you please share the URL to the Emaculation thread? Sorry if you already did and I couldn’t find it. :) To encapsulate this change, I suggest we introduce a MACOS (or DARWIN) compatibility macro. |
https://www.emaculation.com/forum/viewtopic.php?t=11123 Apple has a macro already, should be defined as |
Do you want to attempt the PR or should I? |
I am a bit occupied with other commitments at the moment. In my testing, I just changed |
This seems to have not broken anything on macOS 15.1.1 -- #1796 |
Edit: strike that. Additionally, by default ulimit gets you the soft limit.
|
Server OS: macOS 10.15 Catalina
When attempting to launch netatalk, the
cnid_metad
service fails to launch with message:setlimits: Invalid argument
This is due to setting
rlim.rlim_max
in asetrlimit()
call to 65535 when macOS limits this variable to 10240 (ref: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/syslimits.h and minio/minio#9855)netatalk/etc/cnid_dbd/cnid_metad.c
Lines 417 to 434 in e839b63
Fix: Under macOS, set limit to 10240 instead of 65535. There are ways to change this at the system level, but it likely isn't needed.
The text was updated successfully, but these errors were encountered: