-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.4.1
-
Component/s: None
-
None
A handful of timeout-related tests fail in Tornado 3.2.2. If we continue supporting Tornado 3 these should be diagnosed and either fixed or skipped. Examples from a "tox" run:
====================================================================== ERROR: test_timeout (test_motor_client.MotorClientTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/testing.py", line 427, in wrapper functools.partial(f, self), timeout=timeout) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/ioloop.py", line 389, in run_sync return future_cell[0].result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/concurrent.py", line 129, in result raise_exc_info(self.__exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/gen.py", line 206, in handle_exception if runner is not None and runner.handle_exception(typ, value, tb): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/gen.py", line 580, in handle_exception self.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/gen.py", line 529, in run yielded = self.gen.throw(*exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/test/test_motor_client.py", line 120, in test_timeout yield [timeout_fut, notimeout_fut] File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/stack_context.py", line 343, in _handle_exception if tail.exit(*exc): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/stack_context.py", line 186, in exit return self.exception_handler(type, value, traceback) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/gen.py", line 210, in handle_exception future.set_exc_info((typ, value, tb)) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/concurrent.py", line 125, in set_exc_info self.set_exception(exc_info[1]) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/concurrent.py", line 87, in set_exception self._set_done() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-pypy/site-packages/tornado/concurrent.py", line 95, in _set_done for cb in self._callbacks: TypeError: 'NoneType' object is not iterable
====================================================================== ERROR: test_high_concurrency (test_motor_client.MotorClientTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/emptysquare/.virtualenvs/motor/motor/motor/core.py", line 212, in create_connection motor_sock.connect() File "/Users/emptysquare/.virtualenvs/motor/motor/motor/frameworks/tornado.py", line 162, in wrapped return main.switch() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 227, in wrapper runner.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 531, in run yielded = self.gen.send(next) File "/Users/emptysquare/.virtualenvs/motor/motor/motor/frameworks/tornado.py", line 300, in connect raise err File "/Users/emptysquare/.virtualenvs/motor/motor/motor/frameworks/tornado.py", line 270, in connect server_hostname=host) File "/Users/emptysquare/.virtualenvs/motor/motor/motor/frameworks/tornado.py", line 181, in stream_method method(*args, callback=callback, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/iostream.py", line 748, in connect self._add_io_state(self.io_loop.WRITE) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/iostream.py", line 630, in _add_io_state self.fileno(), self._handle_events, self._state) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/ioloop.py", line 545, in add_handler self._impl.register(fd, events | self.ERROR) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/platform/kqueue.py", line 40, in register raise IOError("fd %d already registered" % fd) OSError: fd 54 already registered During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/testing.py", line 427, in wrapper functools.partial(f, self), timeout=timeout) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/ioloop.py", line 389, in run_sync return future_cell[0].result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/concurrent.py", line 129, in result raise_exc_info(self.__exc_info) File "<string>", line 3, in raise_exc_info File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/stack_context.py", line 302, in wrapped ret = fn(*args, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 574, in inner self.set_result(key, result) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 500, in set_result self.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 529, in run yielded = self.gen.throw(*exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/test/test_motor_client.py", line 201, in test_high_concurrency yield [find() for _ in range(concurrency)] File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 520, in run next = self.yield_point.get_result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 450, in get_result return list(result) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 446, in <genexpr> result = (i.get_result() for i in self.children) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 409, in get_result return self.runner.pop_result(self.key).result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/concurrent.py", line 129, in result raise_exc_info(self.__exc_info) File "<string>", line 3, in raise_exc_info File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/stack_context.py", line 302, in wrapped ret = fn(*args, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 574, in inner self.set_result(key, result) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 500, in set_result self.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 529, in run yielded = self.gen.throw(*exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/test/test_motor_client.py", line 186, in find while (yield cursor.fetch_next): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 520, in run next = self.yield_point.get_result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/gen.py", line 409, in get_result return self.runner.pop_result(self.key).result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/tornado/concurrent.py", line 131, in result return super(TracebackFuture, self).result(timeout=timeout) File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/_base.py", line 395, in result return self.__get_result() File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/concurrent/futures/_base.py", line 354, in __get_result raise self._exception File "/Users/emptysquare/.virtualenvs/motor/motor/motor/metaprogramming.py", line 68, in call_method result = sync_method(self.delegate, *args, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/pymongo/cursor.py", line 1020, in _refresh self.__uuid_subtype)) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/pymongo/cursor.py", line 933, in __send_message res = client._send_message_with_response(message, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/pymongo/mongo_client.py", line 1199, in _send_message_with_response sock_info = self.__socket(member) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/pymongo/mongo_client.py", line 917, in __socket sock_info = member.get_socket() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py34/lib/python3.4/site-packages/pymongo/member.py", line 149, in get_socket sock_info = self.pool.get_socket(force) File "/Users/emptysquare/.virtualenvs/motor/motor/motor/core.py", line 291, in get_socket sock_info, from_pool = self.connect(force=force), False File "/Users/emptysquare/.virtualenvs/motor/motor/motor/core.py", line 264, in connect motor_sock = self.create_connection() File "/Users/emptysquare/.virtualenvs/motor/motor/motor/core.py", line 218, in create_connection motor_sock.close() File "/Users/emptysquare/.virtualenvs/motor/motor/motor/frameworks/tornado.py", line 329, in close sock = self.stream.socket AttributeError: 'NoneType' object has no attribute 'socket'
====================================================================== ERROR: test_wait_queue_timeout (test_motor_pool.MotorPoolTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/testing.py", line 427, in wrapper functools.partial(f, self), timeout=timeout) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/ioloop.py", line 389, in run_sync return future_cell[0].result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/concurrent.py", line 129, in result raise_exc_info(self.__exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/stack_context.py", line 302, in wrapped ret = fn(*args, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 574, in inner self.set_result(key, result) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 500, in set_result self.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 529, in run yielded = self.gen.throw(*exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/test/test_motor_pool.py", line 165, in test_wait_queue_timeout yield cx.open() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 520, in run next = self.yield_point.get_result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 409, in get_result return self.runner.pop_result(self.key).result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/concurrent.py", line 129, in result raise_exc_info(self.__exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/stack_context.py", line 302, in wrapped ret = fn(*args, **kwargs) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 574, in inner self.set_result(key, result) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 500, in set_result self.run() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 529, in run yielded = self.gen.throw(*exc_info) File "/Users/emptysquare/.virtualenvs/motor/motor/motor/core.py", line 559, in open yield self._framework.yieldable(self._ensure_connected()) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 520, in run next = self.yield_point.get_result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/gen.py", line 409, in get_result return self.runner.pop_result(self.key).result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/tornado/concurrent.py", line 131, in result return super(TracebackFuture, self).result(timeout=timeout) File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/concurrent/futures/_base.py", line 396, in result return self.__get_result() File "/Users/emptysquare/.virtualenvs/motor/motor/.tox/tornado3-py26-full/lib/python2.6/site-packages/concurrent/futures/_base.py", line 355, in __get_result raise type(self._exception), self._exception, self._traceback pymongo.errors.AutoReconnect: 'NoneType' object has no attribute 'socket' ----------------------------------------------------------------------
- is duplicated by
-
MOTOR-72 timeout_test fails in Tornado 3
- Closed