Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heizenbug in test_HTTP_200_OK_METHOD_ssl #90

Closed
kxepal opened this issue Jun 29, 2014 · 3 comments
Closed

Heizenbug in test_HTTP_200_OK_METHOD_ssl #90

kxepal opened this issue Jun 29, 2014 · 3 comments
Labels

Comments

@kxepal
Copy link
Member

kxepal commented Jun 29, 2014

The test_HTTP_200_OK_METHOD_ssl may fail from time to time with various reasons:

Traceback (most recent call last):
  File "/home/kxepal/projects/aiohttp/tests/test_client_functional.py", line 121, in test_HTTP_200_OK_METHOD_ssl
    loop=self.loop, connector=connector))
  File "/usr/lib64/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib64/python3.4/asyncio/tasks.py", line 279, in _step
    result = coro.throw(exc)
  File "/home/kxepal/projects/aiohttp/aiohttp/client.py", line 109, in request
    yield from resp.start(conn, read_until_eof)
  File "/home/kxepal/projects/aiohttp/aiohttp/client.py", line 606, in start
    self.message = yield from httpstream.read()
  File "/home/kxepal/projects/aiohttp/aiohttp/parsers.py", line 335, in read
    yield from self._waiter
  File "/usr/lib64/python3.4/asyncio/futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib64/python3.4/asyncio/tasks.py", line 332, in _wakeup
    value = future.result()
  File "/usr/lib64/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/home/kxepal/projects/aiohttp/aiohttp/parsers.py", line 170, in feed_eof
    self._parser.throw(EofStream())
  File "/home/kxepal/projects/aiohttp/aiohttp/protocol.py", line 251, in __call__
    'Can not read status line') from None
nose.proxy.ClientConnectionError: Can not read status line

or

Traceback (most recent call last):
  File "/home/kxepal/projects/aiohttp/tests/test_client_functional.py", line 121, in test_HTTP_200_OK_METHOD_ssl
    loop=self.loop, connector=connector))
  File "/usr/lib64/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib64/python3.4/asyncio/tasks.py", line 279, in _step
    result = coro.throw(exc)
  File "/home/kxepal/projects/aiohttp/aiohttp/client.py", line 117, in request
    raise aiohttp.OsConnectionError(exc)
nose.proxy.OsConnectionError: [Errno 104] Connection reset by peer

For the last case if raise the original exception instead of aiohttp.OsConnectionError the traceback becomes more verbose:

Traceback (most recent call last):
  File "/home/kxepal/projects/aiohttp/tests/test_client_functional.py", line 121, in test_HTTP_200_OK_METHOD_ssl
    loop=self.loop, connector=connector))
  File "/usr/lib64/python3.4/asyncio/base_events.py", line 208, in run_until_complete
    return future.result()
  File "/usr/lib64/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib64/python3.4/asyncio/tasks.py", line 279, in _step
    result = coro.throw(exc)
  File "/home/kxepal/projects/aiohttp/aiohttp/client.py", line 127, in request
    yield from resp.start(conn, read_until_eof)
  File "/home/kxepal/projects/aiohttp/aiohttp/client.py", line 628, in start
    self.message = yield from httpstream.read()
  File "/home/kxepal/projects/aiohttp/aiohttp/parsers.py", line 335, in read
    yield from self._waiter
  File "/usr/lib64/python3.4/asyncio/futures.py", line 348, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib64/python3.4/asyncio/tasks.py", line 332, in _wakeup
    value = future.result()
  File "/usr/lib64/python3.4/asyncio/futures.py", line 243, in result
    raise self._exception
  File "/usr/lib64/python3.4/asyncio/selector_events.py", line 673, in _read_ready
    data = self._sock.recv(self.max_size)
  File "/usr/lib64/python3.4/ssl.py", line 693, in recv
    return self.read(buflen)
  File "/usr/lib64/python3.4/ssl.py", line 582, in read
    v = self._sslobj.read(len or 1024)
nose.proxy.ConnectionResetError: [Errno 104] Connection reset by peer

To guarantee reproduce run:

watch -e nosetests --tests=tests/test_client_functional.py

and wait for a while. Not sure for now where the issue is: in test_util.run_server or somewhere deeper, but may be you have quick idea about what could be wrong.

Python: 3.3.5 / 3.4.1
aiohttp: 0.8.2 @ #2b19a85e3b
tulip: 3.4.1

@fafhrd91
Copy link
Member

fafhrd91 commented Jul 4, 2014

It might be timing issue. Could you test this against master?

@kxepal
Copy link
Member Author

kxepal commented Jul 4, 2014

Cannot reproduce any more after 388b828 commit. Looks like it's fixed now.

@kxepal kxepal closed this as completed Jul 4, 2014
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants