Nathan Henrie <n8hen...@gmail.com> added the comment: Update -- I found the following plist at `/Library/LaunchDaemons/limit.maxfiles.plist`:
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>limit.maxfiles</string> <key>ProgramArguments</key> <array> <string>launchctl</string> <string>limit</string> <string>maxfiles</string> <string>64000</string> <string>524288</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist> ``` I think I made this file at some point to deal with an error about insufficient file descriptors while playing with asyncio / sockets. After `launchctl unload`ing it and rebooting **the test now passes**, and I now see a *much* higher hard limit (similar to that posted by Ned) with the `getrlimit()` command, and `unlimited` as the hard limit with `launchtl limit`. I can reproduce the failure by restoring my prior settings: ```bash $ sudo launchctl limit maxfiles 64000 524288 $ ulimit -n 64000 $ $ ./python.exe -m unittest -v test.test_selectors.PollSelectorTestCase.test_above_fd_setsize test_above_fd_setsize (test.test_selectors.PollSelectorTestCase) ... ERROR ====================================================================== ERROR: test_above_fd_setsize (test.test_selectors.PollSelectorTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/n8henrie/git/cpython/Lib/test/support/__init__.py", line 600, in wrapper return func(*args, **kw) File "/Users/n8henrie/git/cpython/Lib/test/test_selectors.py", line 453, in test_above_fd_setsize self.assertEqual(NUM_FDS // 2, len(s.select())) File "/Users/n8henrie/git/cpython/Lib/selectors.py", line 376, in select fd_event_list = self._poll.poll(timeout) OSError: [Errno 22] Invalid argument ---------------------------------------------------------------------- Ran 1 test in 9.771s FAILED (errors=1) ``` ---------- resolution: works for me -> status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33036> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com