"launchctl limit maxfiles" cannot increase maxfiles limit

Originator:chadvonnau
Number:rdar://15563096 Date Originated:2013-12-01
Status:Open Resolved:
Product:OS X Product Version:10.9.0
Classification:Other Bug Reproducible:Always
 
Summary:
It's possible to set a higher maxfiles limit with launchctl only one time per boot.

The first time that "launchctl limit maxfiles <value>" is run after booting sets the limit correctly with any allowed value. Running the command a second time with a lower value works, and lowers the limit successfully. But running it a second time with a higher value does not work, and the limit does not change.

Steps to Reproduce:
1. Boot machine
2. Open Terminal
3. Enter "launchctl limit maxfiles 1024"
4. Enter "launchctl limit maxfiles 2048"

Expected Results:
"launchctl limit maxfiles" should return "maxfiles 2048 2048".

Actual Results:
"launchctl limit maxfiles" returns "maxfiles 1024 1024".

Version:
10.9.0

Notes:
Here's a superuser.com thread about this exact problem: 
http://superuser.com/questions/602139/cannot-increase-maxfiles-limits-on-mac-10-7

Apparently this has been a bug since at least OS X 10.7.

Configuration:
Always happens. Tested on a MacBookPro11,3.


---------------------------

Apple Developer Relations 17-Oct-2014 08:39 AM

We believe this issue has been addressed in OS X Yosemite.  Please test with this release, and update this report with your results.

OS X Yosemite GM (Build 14A389)
Download from the Mac App Store
http://www.apple.com/osx/how-to-upgrade/
https://itunes.apple.com/app/os-x-yosemite/id915041082

Please let us know if that resolves the issue for you by updating your bug report.


---------------------------

Chad von Nau 02-Dec-2014 10:06 PM

I tried testing this in OS X 10.10.1 and found new bugs instead:

Running "launchctl limit maxfiles 1024" returns: "Could not set resource limits: 1: Operation not permitted" and the setting is not changed.

Running "sudo launchctl limit maxfiles 1024" beachballs the Terminal app, and I need to hard reboot to regain control over the machine.

Both cases can be reproduced reliably. Would you like me to file a new ticket? These new issues are preventing me from testing the original bug.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!