qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DISPATCH-1246) Address Proxy module leaks qdrc_endpoint_t on shutdown
Date Thu, 31 Jan 2019 14:27:00 GMT

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

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

ChugR commented on pull request #445: DISPATCH-1246: clean up core link endpoints on shutdown
URL: https://github.com/apache/qpid-dispatch/pull/445#discussion_r252687262
 
 

 ##########
 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:
   This branch produces a valgrind InvalidRead when the work item is used after it is free'd.
   `
   kind = InvalidRead  (count=1)
   
   Invalid read of size 1
   Stack:
   (qdr_deliver_continue_peers_CT) /home/chug/git/qpid-dispatch/src/router_core/transfer.c:1236
   (qdr_deliver_continue_CT) /home/chug/git/qpid-dispatch/src/router_core/transfer.c:1269
   `
   But it doesn't look like the work was free'd by this code:
   `
   Address 0x143aaa79 is 41 bytes inside a block of size 48 free'd:
     (free) /builddir/build/BUILD/valgrind-3.14.0/coregrind/m_replacemalloc/vg_replace_malloc.c:540
     (free_qdr_link_work_t) /home/chug/git/qpid-dispatch/src/router_core/router_core.c:36
     (qdr_connection_process) /home/chug/git/qpid-dispatch/src/router_core/connections.c:341
   `
 
----------------------------------------------------------------
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:
users@infra.apache.org


> Address Proxy module leaks qdrc_endpoint_t on shutdown
> ------------------------------------------------------
>
>                 Key: DISPATCH-1246
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1246
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Routing Engine
>    Affects Versions: 1.5.0
>            Reporter: Ken Giusti
>            Assignee: Chuck Rolke
>            Priority: Minor
>             Fix For: 1.6.0
>
>
> Running the system_tests_edge_router under valgrind:
> ==21590== 657 (256 direct, 401 indirect) bytes in 4 blocks are definitely lost in loss
record 2,886 of 3,532
> ==21590==    at 0x4C3147C: memalign (vg_replace_malloc.c:908)
> ==21590==    by 0x4C31589: posix_memalign (vg_replace_malloc.c:1072)
> ==21590==    by 0x4EA12FF: qd_alloc (alloc_pool.c:181)
> ==21590==    by 0x4E83086: qdrc_endpoint_create_link_CT (core_link_endpoint.c:70)
> ==21590==    by 0x4E92C2C: on_conn_event (addr_proxy.c:237)
> ==21590==    by 0x4E92C2C: on_conn_event (addr_proxy.c:199)
> ==21590==    by 0x4E82E28: qdrc_event_conn_raise (core_events.c:90)
> ==21590==    by 0x4E82E28: qdrc_event_conn_raise (core_events.c:90)
> ==21590==    by 0x4E8123F: qdr_connection_opened_CT (connections.c:1147)
> ==21590==    by 0x4E8C916: router_core_thread (router_core_thread.c:124)
> ==21590==    by 0x5511593: start_thread (in /usr/lib64/libpthread-2.27.so)
> ==21590==    by 0x62A6F4E: clone (in /usr/lib64/libc-2.27.so)
> ==21590== 
> Appears that the endpoint allocated here in addr_proxy.c:
>         //
>         // Attach a receiving link for edge address tracking updates.
>         //
>         ap->tracking_endpoint =
>             qdrc_endpoint_create_link_CT(ap->core, conn, QD_INCOMING,
>                                          qdr_terminus_normal(QD_TERMINUS_EDGE_ADDRESS_TRACKING),
>                                          qdr_terminus(0), &ap->endpoint_descriptor,
ap);
> is not released when the router is shutdown



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message