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

Ken Giusti commented on DISPATCH-1214:
--------------------------------------

Root caused this trace:

kind = InvalidRead  (count=2)
Invalid read of size 8
Stack:
  (qdr_forward_link_direct_CT) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:925
  (on_reply) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/modules/address_lookup_client/lookup_client.c:624
  (_receiver_transfer_CT) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/core_client_api.c:546
  (qdrc_endpoint_do_deliver_CT) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/core_link_endpoint.c:190
  (qdr_link_deliver_CT) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:991
  (router_core_thread) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:124
  (start_thread) <none>/<none>:<none>
  (clone) <none>/<none>:<none>
Address 0x1b829708 is 104 bytes inside a block of size 448 free'd:
  (free) 
/builddir/build/BUILD/valgrind-3.14.0/coregrind/m_replacemalloc/vg_replace_malloc.c:530
  (free_qdr_link_t) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:32
  (qdr_connection_closed_CT) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1192
  (router_core_thread) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:124
  (start_thread) <none>/<none>:<none>
  (clone) <none>/<none>:<none>
Block was alloc'd at:
  (malloc) 
/builddir/build/BUILD/valgrind-3.14.0/coregrind/m_replacemalloc/vg_replace_malloc.c:299
  (new_qdr_link_t) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:32
  (qdr_link_first_attach) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:454
  (AMQP_outgoing_link_handler) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:721
  (setup_outgoing_link) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:129
  (qd_container_handle_event) 
/home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:559
  (handle) /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:985
  (thread_run) /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1010
  (start_thread) <none>/<none>:<none>
  (clone) <none>/<none>:<none>

An address lookup request is being sent by the address lookup client.  The 
client stores the link and connection in the request context.  Before a reply 
is received the connection that is stored goes down.  When the reply is 
received the link and conn pointers are stale.


> Valgrind finds invalid reads and many leaks during the unit tests
> -----------------------------------------------------------------
>
>                 Key: DISPATCH-1214
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1214
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>    Affects Versions: 1.4.1
>            Reporter: Ken Giusti
>            Priority: Major
>             Fix For: 1.5.0
>
>         Attachments: grinder-12128.txt, grinder-report.txt
>
>
> See the attached grinder report



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

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

Reply via email to