[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2022-02-28 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Agree

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2022-02-27 Thread Kumar Aditya


Kumar Aditya  added the comment:

Since https://bugs.python.org/issue44011 is fixed now, this can be closed.
@asvetlov

--
nosy: +kumaraditya303
versions: +Python 3.11 -Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-12-22 Thread Manjusaka


Manjusaka  added the comment:

Ping!

Agree with Wei-Cheng.

The leak still bothers me for times, and still bother for third-party like 
https://aiohttp.readthedocs.io/en/stable/client_reference.html#tcpconnector

Yury, I think it's worth working on it. Using uvloop should not be a good idea 
for some people.

--
nosy: +Manjusaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-10-15 Thread Wei-Cheng Pan


Wei-Cheng Pan  added the comment:

The SSL connection still cannot close cleanly in 3.7.0.
It will keep throwing read error during shutdown, so shutdown callback will 
never be called.

I've been test this PR for a while, and at least it fixes my problem.

Hope this PR can be included in 3.7.1, or at least 3.7.2.

--
nosy: +Wei-Cheng.Pan

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-05-25 Thread Yury Selivanov

Yury Selivanov  added the comment:

Is this issue resolved now, or do we need to work on this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-02-05 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
nosy: +asvetlov

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-01-11 Thread Grzegorz Grzywacz

Grzegorz Grzywacz  added the comment:

No, this PR originally fix similar but different issue. 

However it also fix issue29406 as a side effect.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2018-01-11 Thread Alexander Mohr

Alexander Mohr  added the comment:

@grzgrzgrz3, does this resolve the issue in https://bugs.python.org/issue29406 
? I'm guessing you based this PR on that issue. If so I'd like it merged ASAP 
as otherwise our prod services will be incompatible with all future python 
releases given the original "fix" was reverted.  Thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-21 Thread Grzegorz Grzywacz

Grzegorz Grzywacz added the comment:

No one yet responded, maybe this is unclear. I will clarify what is going on, 
why i made this change, what we gain from this and why this is not ideal 
solution.

I will focus on ssl layer shutdown as this issue regards.

We have connection asyncio <-> nginx

Lets see first situation asyncio initiates shutdown:

1. ideal:

   shutdown
asyncio   -->   nginx
  <--
   shutdown
Ideal situation asyncio sending shutdown and nginx replies back. This is how it 
works before attached PR.

2. we can't relay on nginx

   shutdown
asyncio   -->   nginx
  |||
   shutdown

At this point everything looks great, but what will happen when nginx do not 
sent shutdown - we will wait forever.
We have this situation here #29406.

Attached PR "fix" this problem (note is not ideal fix, more like workaround):

3. with fix:

   shutdown
asyncio   -->   nginx
  ||?
   shutdown
asyncio is sending shutdown ssl data to nginx but not waiting for nginx 
response, transport is closed anyway. I think ideal will
be to wait for certain amount of time for response like Nikolay in #29406 
propose. This will allow to implement SSL downgrade to
plain text.

Second situation, nginx sent ssl eof.

1. before fix:
   shutdown
nginx -->   asyncio
  |||
   shutdown
In this case we are receiving nginx shutdown and correctly process it but after 
that, shutdown callback will close the transport before
shutdown is sent back. Asyncio will try to send this data but fail due to 
closed transport. There is another issue should be not possible
to write to closed transport. We are getting false-positive result to write. I 
do not analyze this deeper,
maybe there is a reason to it.

2. after fix:
   shutdown
nginx -->   asyncio
  <--
   shutdown

This is clean, shutdown callback in _SSLPipe is removed. We close transport in 
ssl protocol.


I think connections between _SSLPipe and ssl protocol has design problems, 
_SSLPipe should be, as name suggest, only a pipe.
Callback for handshake and shutdown feels wrong. Ssl protocol based on 
_SSLPipie mode and state can figure out when to call
connection_made or close transport.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-19 Thread Alexander Mohr

Changes by Alexander Mohr :


--
nosy: +thehesiod

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-18 Thread Grzegorz Grzywacz

Changes by Grzegorz Grzywacz :


--
pull_requests: +2320

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30698] asyncio sslproto do not shutdown ssl layer cleanly

2017-06-18 Thread Grzegorz Grzywacz

New submission from Grzegorz Grzywacz:

Asyncio on shutdown do not send shutdown confirmation to the other side. 
_SSLPipe after doing unwrap is calling shutdown callback where transportis 
closed and quit ssldata wont be sent.

--
components: asyncio
messages: 296295
nosy: grzgrzgrz3, yselivanov
priority: normal
severity: normal
status: open
title: asyncio sslproto do not shutdown ssl layer cleanly
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com