Comments (8)
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.
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.
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.
Thanks stevvooe and others, this has been fixed: http://github.com/facebook/tornado/commit/57ec818a3f8ab56dec1b6cf585fa7c8c4d6ab80a
from tornado.
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.
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.
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.
This is just a "debug" logging message; it doesn't indicate an actual problem.
from tornado.
Related Issues (20)
- Add Docker Image for easier setup HOT 3
- Queue.get(timeout) waits indefinitly for timedelta of zero seconds HOT 1
- ERROR An open stream object is being garbage collected HOT 3
- Test failures with Python 3.12 b1 & b2 HOT 1
- locale doesn't preserve territory and doesn't do error handling
- Assertion errors causing exceptions that kill Jupyter kernels HOT 3
- Header: 'latin-1' codec can't encode characters
- WSGI support HOT 1
- AttributeError: '_NullFuture' object has no attribute 'add_done_callback' HOT 5
- how to abort async HTTP request with curl implementation? HOT 4
- Patch to compile on gnu/hurd HOT 1
- public way to disable atexit callback for AddThreadSelectorEventLoop HOT 3
- support IOLoop.close() when called after asyncio.run HOT 1
- Docker + tornado.ioloop.IOLoop.current().start() HOT 2
- RFE: please start making github releases HOT 4
- wsgi: Overloaded thread pool blocks longer than expected HOT 2
- Incorrect header validation HOT 3
- RFE: please start making github releases HOT 2
- Exclude test files from install HOT 6
- Incorrect type annotation on chain_future method
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tornado.