You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ganesh Murthy (Jira)" <ji...@apache.org> on 2021/03/26 20:46:00 UTC

[jira] [Resolved] (DISPATCH-1919) Thread race accessing qdr_delivery_t->conn_id and ->link_id

     [ https://issues.apache.org/jira/browse/DISPATCH-1919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ganesh Murthy resolved DISPATCH-1919.
-------------------------------------
    Resolution: Duplicate

> Thread race accessing qdr_delivery_t->conn_id and ->link_id
> -----------------------------------------------------------
>
>                 Key: DISPATCH-1919
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1919
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>    Affects Versions: 1.15.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Minor
>              Labels: race-condition
>             Fix For: 1.16.0
>
>
> 71: ==================
> 71: WARNING: ThreadSanitizer: data race (pid=70857)
> 71: Write of size 8 at 0x7b4800013338 by thread T1:
> 71: #0 qdr_link_process_initial_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1651 (libqpid-dispatch.so+0x9ff1e)
> 71: #1 qdr_link_inbound_first_attach_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1779 (libqpid-dispatch.so+0x9ff1e)
> 71: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xbf09d)
> 71: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #4 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Previous read of size 8 at 0x7b4800013338 by thread T4:
> 71: #0 qdr_tcp_open_server_side_connection /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:674 (libqpid-dispatch.so+0x50ca1)
> 71: #1 handle_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:524 (libqpid-dispatch.so+0x55c45)
> 71: #2 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 71: #3 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 71: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 71: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 71: #6 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #7 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Location is heap block of size 384 at 0x7b4800013200 allocated by thread T4:
> 71: #0 posix_memalign <null> (libtsan.so.0+0x3061d)
> 71: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:388 (libqpid-dispatch.so+0x580a4)
> 71: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:23 (libqpid-dispatch.so+0xa7ca1)
> 71: #3 qdr_link_deliver_to_routed_link /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:117 (libqpid-dispatch.so+0xc50e9)
> 71: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:480 (libqpid-dispatch.so+0xd9e25)
> 71: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:223 (libqpid-dispatch.so+0x6cac4)
> 71: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:733 (libqpid-dispatch.so+0x6cac4)
> 71: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1097 (libqpid-dispatch.so+0xe0211)
> 71: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2a34)
> 71: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #10 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Thread T1 (tid=70859, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qdr_core /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:121 (libqpid-dispatch.so+0xb9b16)
> 71: #3 qd_router_setup_late /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:1989 (libqpid-dispatch.so+0xdc0f8)
> 71: #4 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 71: #5 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 71: #6 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: Thread T4 (tid=70862, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1482 (libqpid-dispatch.so+0xe350a)
> 71: #3 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 (qdrouterd+0x40287c)
> 71: #4 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: SUMMARY: ThreadSanitizer: data race /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1651 in qdr_link_process_initial_delivery_CT
> 71: ==================
> 71: ==================
> 71: WARNING: ThreadSanitizer: data race (pid=70857)
> 71: Read of size 8 at 0x7b4800013338 by thread T4:
> 71: #0 qdr_delivery_decref /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:141 (libqpid-dispatch.so+0xa8348)
> 71: #1 qdr_tcp_open_server_side_connection /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:676 (libqpid-dispatch.so+0x50b83)
> 71: #2 handle_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:524 (libqpid-dispatch.so+0x55c45)
> 71: #3 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 71: #4 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 71: #5 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 71: #6 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 71: #7 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #8 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Previous write of size 8 at 0x7b4800013338 by thread T1:
> 71: #0 qdr_link_process_initial_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1651 (libqpid-dispatch.so+0x9ff1e)
> 71: #1 qdr_link_inbound_first_attach_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1779 (libqpid-dispatch.so+0x9ff1e)
> 71: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xbf09d)
> 71: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #4 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Location is heap block of size 384 at 0x7b4800013200 allocated by thread T4:
> 71: #0 posix_memalign <null> (libtsan.so.0+0x3061d)
> 71: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:388 (libqpid-dispatch.so+0x580a4)
> 71: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:23 (libqpid-dispatch.so+0xa7ca1)
> 71: #3 qdr_link_deliver_to_routed_link /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:117 (libqpid-dispatch.so+0xc50e9)
> 71: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:480 (libqpid-dispatch.so+0xd9e25)
> 71: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:223 (libqpid-dispatch.so+0x6cac4)
> 71: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:733 (libqpid-dispatch.so+0x6cac4)
> 71: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1097 (libqpid-dispatch.so+0xe0211)
> 71: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2a34)
> 71: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #10 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Thread T4 (tid=70862, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1482 (libqpid-dispatch.so+0xe350a)
> 71: #3 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 (qdrouterd+0x40287c)
> 71: #4 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: Thread T1 (tid=70859, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qdr_core /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:121 (libqpid-dispatch.so+0xb9b16)
> 71: #3 qd_router_setup_late /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:1989 (libqpid-dispatch.so+0xdc0f8)
> 71: #4 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 71: #5 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 71: #6 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: SUMMARY: ThreadSanitizer: data race /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:141 in qdr_delivery_decref
> 71: ==================
> 71: ==================
> 71: WARNING: ThreadSanitizer: data race (pid=70857)
> 71: Write of size 8 at 0x7b4800013330 by thread T1:
> 71: #0 qdr_link_process_initial_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1652 (libqpid-dispatch.so+0x9ff4e)
> 71: #1 qdr_link_inbound_first_attach_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1779 (libqpid-dispatch.so+0x9ff4e)
> 71: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xbf09d)
> 71: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #4 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Previous read of size 8 at 0x7b4800013330 by thread T4:
> 71: #0 qdr_delivery_decref /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:141 (libqpid-dispatch.so+0xa8335)
> 71: #1 qdr_tcp_open_server_side_connection /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:676 (libqpid-dispatch.so+0x50b83)
> 71: #2 handle_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:524 (libqpid-dispatch.so+0x55c45)
> 71: #3 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 71: #4 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 71: #5 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 71: #6 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 71: #7 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #8 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Location is heap block of size 384 at 0x7b4800013200 allocated by thread T4:
> 71: #0 posix_memalign <null> (libtsan.so.0+0x3061d)
> 71: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:388 (libqpid-dispatch.so+0x580a4)
> 71: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:23 (libqpid-dispatch.so+0xa7ca1)
> 71: #3 qdr_link_deliver_to_routed_link /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:117 (libqpid-dispatch.so+0xc50e9)
> 71: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:480 (libqpid-dispatch.so+0xd9e25)
> 71: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:223 (libqpid-dispatch.so+0x6cac4)
> 71: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:733 (libqpid-dispatch.so+0x6cac4)
> 71: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1097 (libqpid-dispatch.so+0xe0211)
> 71: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2a34)
> 71: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 71: #10 <null> <null> (libtsan.so.0+0x2d33f)
> 71: 
> 71: Thread T1 (tid=70859, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qdr_core /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:121 (libqpid-dispatch.so+0xb9b16)
> 71: #3 qd_router_setup_late /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:1989 (libqpid-dispatch.so+0xdc0f8)
> 71: #4 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 71: #5 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 71: #6 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: Thread T4 (tid=70862, running) created by main thread at:
> 71: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 71: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 71: #2 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1482 (libqpid-dispatch.so+0xe350a)
> 71: #3 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 (qdrouterd+0x40287c)
> 71: #4 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 71: 
> 71: SUMMARY: ThreadSanitizer: data race /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:1652 in qdr_link_process_initial_delivery_CT
> 71: ==================
> 71: ThreadSanitizer: reported 3 warnings



--
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