You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jiri Daněk (Jira)" <ji...@apache.org> on 2021/04/15 21:56:00 UTC

[jira] [Commented] (DISPATCH-1844) sys_mutex leak detected by LeakSanitizer ASAN (shutdown)

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

Jiri Daněk commented on DISPATCH-1844:
--------------------------------------

https://travis-ci.com/github/apache/qpid-dispatch/jobs/498890969#L8314

{noformat}
54: Direct leak of 128 byte(s) in 2 object(s) allocated from:
54:     #0 0x496f97 in posix_memalign (/home/travis/build/apache/qpid-dispatch/build/router/qdrouterd+0x496f97)
54:     #1 0x7f5e41157290 in sys_mutex /home/travis/build/apache/qpid-dispatch/src/posix/threading.c:43:5
54:     #2 0x7f5e411071e3 in qd_message /home/travis/build/apache/qpid-dispatch/src/message.c:1017:26
54:     #3 0x7f5e411bc453 in _create_message_CT /home/travis/build/apache/qpid-dispatch/src/router_core/core_client_api.c:683:29
54:     #4 0x7f5e411bc453 in _flush_send_queue_CT /home/travis/build/apache/qpid-dispatch/src/router_core/core_client_api.c:288:29
54:     #5 0x7f5e411b8ced in _send_request_CT /home/travis/build/apache/qpid-dispatch/src/router_core/core_client_api.c:271:5
54:     #6 0x7f5e411b8ced in qdrc_client_request_CT /home/travis/build/apache/qpid-dispatch/src/router_core/core_client_api.c:260:5
54:     #7 0x7f5e41265640 in qcm_edge_mgmt_request_CT /home/travis/build/apache/qpid-dispatch/src/router_core/modules/edge_router/edge_mgmt.c:293:12
54:     #8 0x7f5e4125ff26 in _sync_interior_proxies /home/travis/build/apache/qpid-dispatch/src/router_core/modules/edge_router/link_route_proxy.c:153:13
54:     #9 0x7f5e411b0745 in qdrc_event_addr_raise /home/travis/build/apache/qpid-dispatch/src/router_core/core_events.c:125:13
54:     #10 0x7f5e41201a3c in qdr_link_route_deactivate_CT /home/travis/build/apache/qpid-dispatch/src/router_core/route_control.c:229:9
54:     #11 0x7f5e41207035 in deactivate_route_connection /home/travis/build/apache/qpid-dispatch/src/router_core/route_control.c:620:13
54:     #12 0x7f5e41206317 in qdr_route_connection_closed_CT /home/travis/build/apache/qpid-dispatch/src/router_core/route_control.c:695:9
54:     #13 0x7f5e411888cd in qdr_connection_closed_CT /home/travis/build/apache/qpid-dispatch/src/router_core/connections.c:1477:5
54:     #14 0x7f5e4122bc41 in router_core_thread /home/travis/build/apache/qpid-dispatch/src/router_core/router_core_thread.c:240:13
54:     #15 0x7f5e40d13608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9608)
{noformat}

https://github.com/apache/qpid-dispatch/pull/1050/checks?check_run_id=2343920572#step:9:6516

{noformat}
72: ==4323==ERROR: LeakSanitizer: detected memory leaks
72: 
72: Direct leak of 64 byte(s) in 1 object(s) allocated from:
72:     #0 0x7f2b6c99faa5 in posix_memalign (/lib/x86_64-linux-gnu/libasan.so.5+0x10eaa5)
72:     #1 0x7f2b6c1784d4 in sys_mutex ../src/posix/threading.c:43
72:     #2 0x7f2b6c133ee6 in qd_message ../src/message.c:1017
72:     #3 0x7f2b6c0887e4 in handle_incoming_impl ../src/adaptors/tcp_adaptor.c:249
72:     #4 0x7f2b6c1af7ba in qdr_connection_process ../src/router_core/connections.c:421
72:     #5 0x7f2b6c08d931 in handle_connection_event ../src/adaptors/tcp_adaptor.c:683
72:     #6 0x7f2b6c2b4dc5 in handle_event_with_context ../src/server.c:804
72:     #7 0x7f2b6c2b4dc5 in do_handle_raw_connection_event ../src/server.c:810
72:     #8 0x7f2b6c2b4dc5 in handle ../src/server.c:1090
72:     #9 0x7f2b6c2bd2f5 in thread_run ../src/server.c:1122
72:     #10 0x7f2b6bb47608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9608)
{noformat}

https://github.com/apache/qpid-dispatch/pull/1050/checks?check_run_id=2343920542#step:9:1408

{noformat}
25: ==2309==ERROR: LeakSanitizer: detected memory leaks
25: 
25: Direct leak of 64 byte(s) in 1 object(s) allocated from:
25:     #0 0x7fee688ffaa5 in posix_memalign (/lib/x86_64-linux-gnu/libasan.so.5+0x10eaa5)
25:     #1 0x7fee680d84d4 in sys_mutex ../src/posix/threading.c:43
25:     #2 0x7fee68093ee6 in qd_message ../src/message.c:1017
25:     #3 0x7fee680ad38c in qd_message_receive ../src/message.c:1462
25:     #4 0x7fee6820473e in AMQP_rx_handler ../src/router_node.c:455
25:     #5 0x7fee68068406 in do_receive ../src/container.c:227
25:     #6 0x7fee68068406 in qd_container_handle_event ../src/container.c:737
25:     #7 0x7fee68214d19 in handle ../src/server.c:1097
25:     #8 0x7fee6821d260 in thread_run ../src/server.c:1122
25:     #9 0x7fee6821f7fa in qd_server_run ../src/server.c:1487
25:     #10 0x5577eabb51bc in main_process ../router/src/main.c:115
25:     #11 0x5577eabb4ce0 in main ../router/src/main.c:369
25:     #12 0x7fee66f660b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
{noformat}

https://github.com/apache/qpid-dispatch/pull/1050/checks?check_run_id=2343920572#step:9:3704

{noformat}
54: ==3486==ERROR: LeakSanitizer: detected memory leaks
54: 
54: Direct leak of 64 byte(s) in 1 object(s) allocated from:
54:     #0 0x7fdde5fe1aa5 in posix_memalign (/lib/x86_64-linux-gnu/libasan.so.5+0x10eaa5)
54:     #1 0x7fdde57ba4d4 in sys_mutex ../src/posix/threading.c:43
54:     #2 0x7fdde5775ee6 in qd_message ../src/message.c:1017
54:     #3 0x7fdde578f38c in qd_message_receive ../src/message.c:1462
54:     #4 0x7fdde58e673e in AMQP_rx_handler ../src/router_node.c:455
54:     #5 0x7fdde574a406 in do_receive ../src/container.c:227
54:     #6 0x7fdde574a406 in qd_container_handle_event ../src/container.c:737
54:     #7 0x7fdde58f6d19 in handle ../src/server.c:1097
54:     #8 0x7fdde58ff260 in thread_run ../src/server.c:1122
54:     #9 0x7fdde5189608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9608)
54: 
54: Direct leak of 64 byte(s) in 1 object(s) allocated from:
54:     #0 0x7fdde5fe1aa5 in posix_memalign (/lib/x86_64-linux-gnu/libasan.so.5+0x10eaa5)
54:     #1 0x7fdde57ba4d4 in sys_mutex ../src/posix/threading.c:43
54:     #2 0x7fdde5775ee6 in qd_message ../src/message.c:1017
54:     #3 0x7fdde581b5d5 in _create_message_CT ../src/router_core/core_client_api.c:683
54:     #4 0x7fdde581b5d5 in _flush_send_queue_CT ../src/router_core/core_client_api.c:288
54:     #5 0x7fdde581e11e in _send_request_CT ../src/router_core/core_client_api.c:271
54:     #6 0x7fdde581e11e in qdrc_client_request_CT ../src/router_core/core_client_api.c:260
54:     #7 0x7fdde58af759 in _sync_interior_proxies ../src/router_core/modules/edge_router/link_route_proxy.c:153
54:     #8 0x7fdde58109d5 in qdrc_event_addr_raise ../src/router_core/core_events.c:125
54:     #9 0x7fdde5856fd7 in qdr_link_route_deactivate_CT ../src/router_core/route_control.c:229
54:     #10 0x7fdde5859dfd in deactivate_route_connection ../src/router_core/route_control.c:620
54:     #11 0x7fdde586354b in qdr_route_connection_closed_CT ../src/router_core/route_control.c:695
54:     #12 0x7fdde580b24f in qdr_connection_closed_CT ../src/router_core/connections.c:1474
54:     #13 0x7fdde587fd98 in router_core_thread ../src/router_core/router_core_thread.c:240
54:     #14 0x7fdde5189608 in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x9608)
{noformat}

> sys_mutex leak detected by LeakSanitizer ASAN (shutdown)
> --------------------------------------------------------
>
>                 Key: DISPATCH-1844
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1844
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>    Affects Versions: 1.14.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Major
>              Labels: lsan
>             Fix For: 1.17.0
>
>
> The LSAN (ASAN) leak sanitizer occasionally detects a leak of sys_mutex items that are used by the qd_message_t content:
>  
> {noformat}
> 70: ==1475684==ERROR: LeakSanitizer: detected memory leaks 
> 70: 
> 70: Direct leak of 128 byte(s) in 2 object(s) allocated from: 
> 70: #0 0x7f52044ebbf5 in __interceptor_posix_memalign (/lib64/libasan.so.5+0x10ebf5) 
> 70: #1 0x7f5203b7e2cc in sys_mutex /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:41 
> 70: #2 0x7f5203b31b0f in qd_message /home/kgiusti/work/dispatch/qpid-dispatch/src/message.c:1012 
> 70: #3 0x7f5203a9edae in _server_rx_headers_done_cb /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:862 
> 70: #4 0x7f5203a64d2a in process_headers_done /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:831 
> 70: #5 0x7f5203a66411 in parse_header /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:911 
> 70: #6 0x7f5203a6d065 in decode_incoming /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:1301 
> 70: #7 0x7f5203a6e09a in h1_codec_connection_rx_data /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:1346 
> 70: #8 0x7f5203a9a3fe in _handle_connection_events /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:562 
> 70: #9 0x7f5203ceb754 in handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 
> 70: #10 0x7f5203ceb796 in do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 
> 70: #11 0x7f5203ceffe5 in handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 
> 70: #12 0x7f5203cf0297 in thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 
> 70: #13 0x7f5203cf770f in qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1484 
> 70: #14 0x4026f8 in main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 
> 70: #15 0x404576 in main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 
> 70: #16 0x7f52025761a2 in __libc_start_main (/lib64/libc.so.6+0x271a2)
> {noformat}
> This leak is easily triggered by the HTTP1 adaptor but can also be triggered using plain AMQP.
> This is a shutdown leak.  This occurs when a qdr_delivery_t is left on the link's updated_deliveries list at the point where the shutdown occurs.
> Since this is a shutdown leak I will add a suppression to the lsan.supp list for now - this Jira remains open until the issue is actually fixed.



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

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