Opened 2 years ago

Closed 18 months ago

#5472 defect closed duplicate (duplicate)

Delayed calls in the sufficiently distant future break epoll reactor

Reported by: exarkun Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

Consider:

from twisted.internet import epollreactor
epollreactor.install()
from twisted.internet import reactor
reactor.callLater(2 ** 32 - 1, lambda: None)
reactor.run()

producing these results:

Unhandled Error
Traceback (most recent call last):
  File "<string>", line 6, in <module>
    
  File "/home/exarkun/Projects/Twisted/trunk/twisted/internet/base.py", line 1169, in run
    self.mainLoop()
--- <exception caught here> ---
  File "/home/exarkun/Projects/Twisted/trunk/twisted/internet/base.py", line 1181, in mainLoop
    self.doIteration(t)
  File "/home/exarkun/Projects/Twisted/trunk/twisted/internet/epollreactor.py", line 182, in doPoll
    l = self._poller.wait(len(self._selectables), timeout)
^C  File "_epoll.pyx", line 127, in twisted.python._epoll.epoll.wait (twisted/python/_epoll.c:993)
    
exceptions.OverflowError: value too large to convert to int

(effectively) perpetually.

This appears to be a limitation particular to epoll, perhaps due to our custom Cython bindings. The checks for delayed calls may need a review anyway, particularly in DelayedCall.reset and DelayedCall.delay.

Change History (1)

comment:1 Changed 18 months ago by tom.prince

  • Resolution set to duplicate
  • Status changed from new to closed

This is a duplicate of #6259. (Closing the older ticket as the newer one has a patch)

Note: See TracTickets for help on using tickets.