[ 
https://issues.apache.org/jira/browse/PROTON-2344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17313935#comment-17313935
 ] 

ASF GitHub Bot commented on PROTON-2344:
----------------------------------------

cliffjansen commented on pull request #304:
URL: https://github.com/apache/qpid-proton/pull/304#issuecomment-812582546


   BlockingConnection.close() must ensure eventual cleanup of all resources by 
the time it returns and be resilient against exceptions.
   
   The strategy under the old C reactor and IO code was to update connection 
properties to generate the close frame and when there was no remaining 
possibility of blocking operations to run the reactor to clean up all 
resources.  Some previous bug fix required stopping the reactor early and 
allowing the C object reference counting to promote the cleanup.
   
   With the new Python IO, the strategy is the same but slightly different 
mechanisms are required.
   
   This patch:
   
     - does a Transport.close_tail to prevent blocking waiting for the peer 
close frame (which may never be sent)
   
     - removes the early stop() so that Reactor cleanup can complete, 
especially Selectable and socket closing.
   
     - prevents mistaking a local close with an external disconnect.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> memory leak and close_waits in qpid-proton-c / python2-qpid-proton when 
> dropping timeouted connection
> -----------------------------------------------------------------------------------------------------
>
>                 Key: PROTON-2344
>                 URL: https://issues.apache.org/jira/browse/PROTON-2344
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.33.0
>            Reporter: Pavel Moravec
>            Priority: Major
>         Attachments: mimic_goferd_consumer-with-receive-noSSL.py
>
>
> Packages used from EPEL:
>  * qpid-proton-c-0.33.0-1.el7.x86_64
>  * python2-qpid-proton-0.33.0-1.el7.x86_64
>  
> reproducer idea: connect to a broker with a consumer and some heartbeat set, 
> and mimic dropping packets until the client drops the connection.
>  
> Particular reproducer:
>  * create a queue pulp.agent.TEST.0 in a broker
>  * run below reproducer script (can be further simplified, just modify the 
> ROUTER_ADDRESS)
>  * mimic packets drops on output:
>  
> {noformat}
> port=5647
> a="-I"
> while true; do
>   echo "$(date): setting $a"
>   iptables $a OUTPUT -p tcp --dport $port -j DROP
>   if [ $a = "-I" ]; then
>     a="-D"
>   else
>     a="-I"
>   fi
>   sleep 5
> done{noformat}
>  
> .. and monitor memory usage and CLOSE_WAIT connections.
>  
> The issue sounds to be a regression from python-qpid-proton-0.28.0-3 where I 
> cant reproduce it.
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to