cheroot: [cheroot==8.1.0 regression] Spin on Linux when socket filedescriptor is too big for select
Once the filedescriptor for a socket used by cherrypy has a value greater than 1024 a thread goes in to a loop just writing blocks like the following to stderr:
[22/Nov/2019:11:55:07] ENGINE Error in HTTPServer.tick
Traceback (most recent call last):
File "/usr/lib/python3.6/dist-packages/cheroot/server.py", line 1770, in serve
self.tick()
File "/usr/lib/python3.6/dist-packages/cheroot/server.py", line 1993, in tick
conn = self.connections.get_conn(self.socket)
File "/usr/lib/python3.6/dist-packages/cheroot/connections.py", line 142, in get_conn
rlist, _, _ = select.select(list(socket_dict), [], [], 0.1)
ValueError: filedescriptor out of range in select()
This does not happen with cheroot versions prior to 8.1.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 20 (16 by maintainers)
Commits related to this issue
- Work around a file descriptor issue in cherrot. There is an issue that was introduced in 8.1.0 that throws an rror when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/issu... — committed to girder/large_image by manthey 4 years ago
- Work around a file descriptor issue in cheroot. There is an issue that was introduced in 8.1.0 that throws an error when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/iss... — committed to girder/large_image by manthey 4 years ago
- Work around a file descriptor issue in cheroot. There is an issue that was introduced in 8.1.0 that throws an error when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/iss... — committed to girder/large_image by manthey 4 years ago
- Work around a file descriptor issue in cheroot. There is an issue that was introduced in 8.1.0 that throws an error when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/iss... — committed to girder/large_image by manthey 4 years ago
- Work around a file descriptor issue in cheroot. There is an issue that was introduced in 8.1.0 that throws an error when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/iss... — committed to girder/large_image by manthey 4 years ago
- Work around a file descriptor issue in cheroot. There is an issue that was introduced in 8.1.0 that throws an error when file descriptor numbers are large (see https://github.com/cherrypy/cheroot/iss... — committed to girder/large_image by manthey 4 years ago
Looks like #301 fix is close to be mergeable, everyone is welcome to test it before I merge it.
@webknjaz I’ve submitted a reproduction of this bug as PR #301
You can see the error reproduced in the Travis logs here
@hardikmodha thanks, it’d be great if you could submit such reproducer in a form of the pytest test so that we could have it in our CI (marked as xfail) as per https://pganssle-talks.github.io/xfail-lightning/.
@liamstask so the problem is that I don’t want to have the last py2-compatible release w/ this regression.
Looks like there’s a backport: https://pypi.org/project/selectors2/.