kgiusti commented on a change in pull request #445: DISPATCH-1246: clean up core link endpoints on shutdown URL: https://github.com/apache/qpid-dispatch/pull/445#discussion_r252826040
########## File path: src/router_core/connections.c ########## @@ -1227,9 +1223,7 @@ static void qdr_connection_closed_CT(qdr_core_t *core, qdr_action_t *action, boo qdr_connection_work_t *work = DEQ_HEAD(conn->work_list); while (work) { DEQ_REMOVE_HEAD(conn->work_list); - qdr_terminus_free(work->source); - qdr_terminus_free(work->target); - free_qdr_connection_work_t(work); + qdr_connection_work_free_CT(work); Review comment: @ChugR - I've removed the abort() call. It's possible to get a second delete event when the connection is dropped with outstanding deletes pending. Running the system_tests_edge_router testcase under valgrind kept hanging for me. I traced this to a test that wasn't cleaning up properly (running the router under valgrind slowed down the test to the point where the bug was evident). I've pushed the fix to master, you may want to rebase on that. https://github.com/apache/qpid-dispatch/commit/d10676f8ee6a76fff57f6a62cfa4d583dabc63a9 Other than that I do see leaks for other objects - mostly deliveries - but no link endpoint leaks. And I haven't hit the bad memory reference. This appears to be a race, but it may not be a result of this patch per se. I'm looking a bit at the locking around the link work lists in any case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org