[Twisted-Python] epoll 2.4 kernel
Not sure if this is the right mailing list for this.... epoll should *not* be used on 2.4 kernels... I have 2.4 kernel running on a 32-bit x86 machine and another 2.4 kernel running on 64-bit x64 and I'm having an issue with twisted (via buildbot). I can import epoll from select on the 64-bit machine (it *should* fail but doesn't) and this later causes twisted to fail...
from select import epoll epoll(1) Traceback (most recent call last): File "<stdin>", line 1, in <module> IOError: [Errno 38] Function not implemented
On the 32-bit machine, however, importing epoll is properly failing...
from select import epoll Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: cannot import name epoll
twisted/internet/default.py is hitting this same problem. It's incorrectly picking epoll when it shouldn’t because import epoll is working when it shouldn't. I 'fixed' the problem on my machine by adding a check method in epollreactor.py which does this... def check(): try: epoll(1) except IOError: return False return True and I import and call the check method in default.py. An alternate fix can be... in twisted/internet/default.py try: if platform.isLinux(): try: from select import epoll epoll(1) from twisted.internet.epollreactor import install except (IOError, ImportError): from twisted.internet.pollreactor import install Any insight would be good. I had to compile my own Python 2.7.8 on these old computers...maybe python is incorrectly detecting epoll in the build process? Thanks in advance, Reuben
On Sep 11, 2014, at 12:37 AM, Reuben Hawkins <reubenhwk@gmail.com> wrote:
Not sure if this is the right mailing list for this....
epoll should *not* be used on 2.4 kernels...
I'm sorry to say that Twisted does not currently support 2.4 kernels. Our set of supported platforms is defined by the set of buildbots that we maintain: <http://buildbot.twistedmatrix.com/boxes-supported?branch=trunk&num_builds=10> As far as I know none of those platforms use a 2.4 kernel. If you wanted to contribute or fund some resources for a 2.4 buildbot, we could consider it, but... it seems like this would be a waste of time. Even my ancient WiFi routers which I can never upgrade because of proprietary firmware drivers still have a 2.6 kernel at least. As I understand it, 2.4 was end-of-lifed 8 years ago, and even at that point it was pretty well into its decline. Why are you using it? Is "just use a really old version of Twisted" an acceptable answer for you? I ask because I am wondering if supporting it is something it would be reasonable to entertain. -glyph
Easiest thing for you to do is install a poll reactor as the custom reactor: https://twistedmatrix.com/documents/current/core/howto/choosing-reactor.html...
participants (3)
-
Glyph -
Itamar Turner-Trauring -
Reuben Hawkins