-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
"Application data after close notify" regression in 3.5.0 with SSL connection #3477
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #3052 (SSL with closed connections), #3242 (Error), #2822 (Unexpected SSL error (CERTIFICATE_VERIFY_FAILED)), #2497 (ClientSession keep transferring data after closed), and #370 (Server closes connection before sending data). |
I've been seeing this as well, with some sites most of my https transfers are failing. |
Pin it to 3.4.4 until this gets cleared. |
Yep, that's what I've done. |
Thanks for the report. |
@mnach We have to fix that. Please be involved. |
@socketpair it looks like after his PR @mnach doesn't have any GH activity. I wouldn't count on him receiving these notifications. |
@webknjaz, @mnach is my colleague :) Well, seems, I fix your bug, Now, I'm writing tests and so on. Thanks for sample of code to reproduce it. Also, it seems, your server (or servers) sometimes respond with gzipped, and sometimes with plain responses. This could mean wrong server setup or incoherent configuration. |
@socketpair can you provide a reproducer for inconsistent aiohttp server response compression? |
@K900 Problem is fixed. Please re-check. Thanks for bug report. |
|
Still showing.
Python 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 |
I too am still getting this error on 3.5.4. |
:( could you provide sample program that triggers that ? |
As far as I remember, my patch helped. Something new ? I would like to fix again. |
This example recreates it for me: import asyncio
import aiohttp
print(aiohttp.__version__)
url = "https://github.com/sunpy/sample-data/blob/master/sunpy/v1/AIA20110607_063303_0335_lowres.fits?raw=true"
async def run_example():
async with aiohttp.ClientSession() as session:
async with session.get(url) as resp:
print(resp)
asyncio.run(run_example()) |
@Cadair I can not reproduce the bug. I use latest Aiohttp from corresponding branch. I tried many times. The output is always
But Python version is 3.6.7 |
This is on Python 3.7, I will test out a few different environments and see how reliable it is to reproduce it. |
I met this when I executed a script for about a day. Because the network is not stable, so I met something like timeout, and then that message showed. |
@Cadair's example reproduces this issue pretty reliably (25-50% of the time) for me with:
This Python comes via conda-forge. However, when I run it with homebrew-installed Python 3.7.2, which links openssl 1.0.2r, I don't see the issue. So maybe there is something in openssl 1.1? |
@Cadair's example reproduces this for me as well with:
|
Same issue.
|
Hi all. I still can not reproduce the bug.
|
@socketpair I sometimes met this when the network is not stable. And you might need to execute the script again and again. It is not reproduced easily, but we are sure we saw it. |
I'm getting this when I set timeout to be too low and make a request for a large https image for example, pretty much always reproduces
Getting this error:
|
@davidb1 I cannot reproduce this following your instructions. If I set a low timeout and download a 100MB file I get $ ipython
Python 3.7.1 (default, Jan 28 2019, 08:25:13)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
In [2]: aiohttp.__version__
Out[2]: '4.0.0a0'
...
In [20]: import ssl
In [21]: ssl.OPENSSL_VERSION
Out[21]: 'OpenSSL 1.1.0j 20 Nov 2018' Please verify what openssl version your ssl module is linked against. |
@socketpair I noticed that a common occurrence is that using openssl version 1.1.1b so i downgraded to 1.1.1a and same issue then 1.1.1 and the ssl.SSLError still showed. i couldn't downgrade further without breaking the system. But from seeing on here 1.1.0g and under works. Maybe issue is somewhere above ssl version 1.1.0g? |
Try bisect deeper. Docker ? for example install Ubuntu 16.04 or so. |
@socketpair yes, OpenSSL changed behavior a little on SSL shutdown stage. python/cpython#13548 fixes the log output. Maybe I'll fix sslproto.py for not generating the exception at all, but suppressing asyncio logging on |
See also #3535 -- it should be fixed too. |
I'm running this code:
With aiohttp 3.5.1 on Arch Linux testing (Python 3.7.2, OpenSSL 1.1.1a).
The request to the same URL goes through correctly with curl, and sometimes (very rarely) with aiohttp, but most of the time aiohttp returns
None
and produces the following error:Edit: this is a regression between 3.4.4 and 3.5.0
The text was updated successfully, but these errors were encountered: