This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ned.deily
Recipients ned.deily, neologix
Date 2013-09-07.21:32:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1378589520.51.0.514840120494.issue18963@psf.upfronthosting.co.za>
In-reply-to
Content
======================================================================
ERROR: test_above_fd_setsize (test.test_selectors.PollSelectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/support/__init__.py", line 485, in wrapper
    return func(*args, **kw)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_selectors.py", line 312, in test_above_fd_setsize
    resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
ValueError: current limit exceeds maximum limit

======================================================================
ERROR: test_above_fd_setsize (test.test_selectors.KqueueSelectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/support/__init__.py", line 485, in wrapper
    return func(*args, **kw)
  File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/test/test_selectors.py", line 312, in test_above_fd_setsize
    resource.setrlimit(resource.RLIMIT_NOFILE, (hard, hard))
ValueError: current limit exceeds maximum limit

----------------------------------------------------------------------
Ran 58 tests in 8.080s

FAILED (errors=2, skipped=12)

Looking at the OS X man page for setrlimit(2), it appears the test's strategy of trying to set the soft RLIMIT_NOFILE to the hard RLIMIT_NOFILE ceiling will fail on OS X (at least) if the hard limit is infinite:

>>> import resource
>>> resource.getrlimit(resource.RLIMIT_NOFILE)
(2560, 9223372036854775807)

From the man page:
COMPATIBILITY
     setrlimit() now returns with errno set to EINVAL in places that historically
     succeeded.  It no longer accepts "rlim_cur = RLIM_INFINITY" for RLIM_NOFILE.
     Use "rlim_cur = min(OPEN_MAX, rlim_max)".

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/setrlimit.2.html
History
Date User Action Args
2013-09-07 21:32:00ned.deilysetrecipients: + ned.deily, neologix
2013-09-07 21:32:00ned.deilysetmessageid: <1378589520.51.0.514840120494.issue18963@psf.upfronthosting.co.za>
2013-09-07 21:32:00ned.deilylinkissue18963 messages
2013-09-07 21:32:00ned.deilycreate