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

ASF GitHub Bot commented on DISPATCH-1391:
------------------------------------------

kgiusti commented on pull request #545: DISPATCH-1391 - Zero out pn_link 
references on all qd_links related t…
URL: https://github.com/apache/qpid-dispatch/pull/545#discussion_r306927274
 
 

 ##########
 File path: src/container.c
 ##########
 @@ -541,14 +541,16 @@ void qd_container_handle_event(qd_container_t 
*container, pn_event_t *event,
                     qd_conn->n_sessions--;
                 }
 
-                pn_link = pn_link_head(conn, PN_LOCAL_ACTIVE | 
PN_REMOTE_CLOSED);
+                //Sweep thru every pn_link in this connection and a matching 
session and zero out the
+                // qd_link->pn_link reference. We do this in order to not miss 
any pn_links
+                pn_link = pn_link_head(conn, 0);
 
 Review comment:
   Suggestion:
   
   Since you now have to check every link on the session why not combine this 
loop with the previous into a single loop?
   Loop through all once using an if statement to check for PN_LOCAL_ACTIVE | 
PN_REMOTE_ACTIVE and do the detach handling  zeroing the pn_link entry.
 
----------------------------------------------------------------
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]


> Proton link reference not cleared on router link objects during session close
> -----------------------------------------------------------------------------
>
>                 Key: DISPATCH-1391
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1391
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Container
>    Affects Versions: 1.8.0
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.9.0
>
>
> When the following program is run against the router, it  crashes -
> {noformat}
> from proton.utils import BlockingConnection
> from time import sleep
> ROUTER_ADDRESS = "amqp://127.0.0.1:5672"
> RECEIVER_ADDRESS = "examples-receiver"
> c = BlockingConnection(ROUTER_ADDRESS)
> count = 0
> while True:
>     count += 1
>     r = c.create_receiver(RECEIVER_ADDRESS + str(count))
>     r.session.close()
>     if count == 5:
>         break
> {noformat}
> This is happening because the pn_link references are not cleaned up on router 
> link objects (qd_link_t) during session close



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

Reply via email to