Code Monkey home page Code Monkey logo

Comments (8)

elephantum avatar elephantum commented on May 18, 2024

that seems to be general problem which is caused by inconsistency between epoll.c and select.epoll in py2.6

epoll.c raises OSError, while select.epoll raises IOError.

may be the best way to fix this is to alter epoll.c and tornado to use IOError like select.epoll does

from tornado.

stevvooe avatar stevvooe commented on May 18, 2024

This sounds reasonable.

Is this project being maintained? There hasn't been any activity on it in month and I don't want to maintain a fork for simple bug fixes.

from tornado.

mackstann avatar mackstann commented on May 18, 2024

Seeing this problem as well. It doesn't actually seem to break my code at all; it just adds a bunch of slightly alarming little tracebacks in the logging output.

from tornado.

caseymrm avatar caseymrm commented on May 18, 2024

Thanks stevvooe and others, this has been fixed: http://github.com/facebook/tornado/commit/57ec818a3f8ab56dec1b6cf585fa7c8c4d6ab80a

from tornado.

aloksingh avatar aloksingh commented on May 18, 2024

Same issue in the loop that calls remove_handler(fd)

2010-07-26 12:00:50,449 [ERROR] - Exception in callback >
Traceback (most recent call last):
  File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/ioloop.py", line 245, in _run_callback
    callback()
  File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/httpclient.py", line 214, in _perform
    self.io_loop.remove_handler(fd)
  File "/usr/local/jive/python/lib/python2.6/site-packages/tornado/ioloop.py", line 135, in remove_handler
    self._impl.unregister(fd)
IOError: [Errno 2] No such file or directory

In httpclient.py

for fd in self._fds:
        if fd not in fds:
            self.io_loop.remove_handler(fd)

from tornado.

upalse avatar upalse commented on May 18, 2024

it seems to be rather common for epoll to spuriously forget about descriptors once they become unpollable (e.g. peer shuts down connection).

Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/httpclient.py", line 205, in _handle_socket
    self.io_loop.update_handler(fd, ioloop_event)
  File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/ioloop.py", line 155, in update_handler
    self._impl.modify(fd, events | self.ERROR)
IOError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/httpclient.py", line 205, in _handle_socket
    self.io_loop.update_handler(fd, ioloop_event)
  File "/usr/local/lib/python2.6/dist-packages/tornado-1.1-py2.6.egg/tornado/ioloop.py", line 155, in update_handler
    self._impl.modify(fd, events | self.ERROR)
IOError: [Errno 2] No such file or directory

fix:

$ git diff
diff --git a/tornado/ioloop.py b/tornado/ioloop.py
index ea34e0f..dbda034 100644
--- a/tornado/ioloop.py
+++ b/tornado/ioloop.py
@@ -152,7 +152,11 @@ class IOLoop(object):

     def update_handler(self, fd, events):
         """Changes the events we listen for fd."""
-        self._impl.modify(fd, events | self.ERROR)
+        try:
+            self._impl.modify(fd, events | self.ERROR)
+        except (OSError, IOError):
+            logging.debug("Error updating fd in IOLoop", exc_info=True)
+

     def remove_handler(self, fd):
         """Stop listening for events on fd."""

from tornado.

gwillem avatar gwillem commented on May 18, 2024

With Python 3.4.3, Linux 3.19.0-22-generic and Tornado 4.2.1 I still get this error incidentally, when I run a spider with 100+ concurrency.

DEBUG:tornado.general:Error deleting fd from IOLoop
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/tornado/ioloop.py", line 715, in remove_handler
    self._impl.unregister(fd)
FileNotFoundError: [Errno 2] No such file or directory

from tornado.

bdarnell avatar bdarnell commented on May 18, 2024

This is just a "debug" logging message; it doesn't indicate an actual problem.

from tornado.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.