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/08/03 07:29:00 UTC

[jira] [Updated] (DISPATCH-2126) qdr_delivery_t->settled flag race

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

Jiri Daněk updated DISPATCH-2126:
---------------------------------
    Description: 
I/O thread reads the qdr_delivery_t->settled flag while calling the delivery_update_handler, while core thread is updating it while processing multicast.

{noformat}
5: WARNING: ThreadSanitizer: data race (pid=568299) 
65: Read of size 1 at 0x7b500008131c by thread T4: 
65: #0 qdr_connection_process /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 (libqpid-dispatch.so+0xc4a30) 
65: #1 AMQP_writable_conn_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 (libqpid-dispatch.so+0x122d42) 
65: #2 writable_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 (libqpid-dispatch.so+0x7b2e2) 
65: #3 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 (libqpid-dispatch.so+0x7cfd5) 
65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
65: #6 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #7 <null> <null> (libtsan.so.0+0x2d33f) 
65: 
65: Previous write of size 1 at 0x7b500008131c by thread T1: 
65: #0 qdr_delivery_mcast_inbound_update_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 (libqpid-dispatch.so+0xd\
97bb) 
65: #1 qdr_update_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 (libqpid-dispatch.so+0xd8f22) 
65: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xfb2ae) 
65: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #4 <null> <null> (libtsan.so.0+0x2d33f) 
65: 
65: Location is heap block of size 512 at 0x7b5000081200 allocated by thread T2: 
65: #0 posix_memalign <null> (libtsan.so.0+0x3061d) 
65: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 (libqpid-dispatch.so+0x6ab9c) 
65: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 (libqpid-dispatch.so+0xd5ddd) 
65: #3 qdr_link_deliver /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 (libqpid-dispatch.so+0x1038d9) 
65: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 (libqpid-dispatch.so+0x124406) 
65: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 (libqpid-dispatch.so+0x7a99b) 
65: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 (libqpid-dispatch.so+0x7cf4f) 
65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
65: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #10 <null> <null> (libtsan.so.0+0x2d33f)
{noformat}

  was:
I/O thread reads the qdr_delivery_t->settled flag while calling the delivery_update_handler, while core thread is updating it while processing multicast.

 

5: WARNING: ThreadSanitizer: data race (pid=568299) 
65: Read of size 1 at 0x7b500008131c by thread T4: 
65: #0 qdr_connection_process /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 (libqpid-dispatch.so+0xc4a30) 
65: #1 AMQP_writable_conn_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 (libqpid-dispatch.so+0x122d42) 
65: #2 writable_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 (libqpid-dispatch.so+0x7b2e2) 
65: #3 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 (libqpid-dispatch.so+0x7cfd5) 
65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
65: #6 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #7 <null> <null> (libtsan.so.0+0x2d33f) 
65: 
65: Previous write of size 1 at 0x7b500008131c by thread T1: 
65: #0 qdr_delivery_mcast_inbound_update_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 (libqpid-dispatch.so+0xd\
97bb) 
65: #1 qdr_update_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 (libqpid-dispatch.so+0xd8f22) 
65: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xfb2ae) 
65: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #4 <null> <null> (libtsan.so.0+0x2d33f) 
65: 
65: Location is heap block of size 512 at 0x7b5000081200 allocated by thread T2: 
65: #0 posix_memalign <null> (libtsan.so.0+0x3061d) 
65: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 (libqpid-dispatch.so+0x6ab9c) 
65: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 (libqpid-dispatch.so+0xd5ddd) 
65: #3 qdr_link_deliver /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 (libqpid-dispatch.so+0x1038d9) 
65: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 (libqpid-dispatch.so+0x124406) 
65: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 (libqpid-dispatch.so+0x7a99b) 
65: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 (libqpid-dispatch.so+0x7cf4f) 
65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
65: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
65: #10 <null> <null> (libtsan.so.0+0x2d33f)


> qdr_delivery_t->settled flag race
> ---------------------------------
>
>                 Key: DISPATCH-2126
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2126
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Router Node
>    Affects Versions: 1.16.0
>            Reporter: Ken Giusti
>            Assignee: Ken Giusti
>            Priority: Major
>              Labels: race-condition, tsan
>             Fix For: 1.17.0
>
>
> I/O thread reads the qdr_delivery_t->settled flag while calling the delivery_update_handler, while core thread is updating it while processing multicast.
> {noformat}
> 5: WARNING: ThreadSanitizer: data race (pid=568299) 
> 65: Read of size 1 at 0x7b500008131c by thread T4: 
> 65: #0 qdr_connection_process /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:403 (libqpid-dispatch.so+0xc4a30) 
> 65: #1 AMQP_writable_conn_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:299 (libqpid-dispatch.so+0x122d42) 
> 65: #2 writable_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:395 (libqpid-dispatch.so+0x7b2e2) 
> 65: #3 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:747 (libqpid-dispatch.so+0x7cfd5) 
> 65: #4 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
> 65: #5 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
> 65: #6 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
> 65: #7 <null> <null> (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Previous write of size 1 at 0x7b500008131c by thread T1: 
> 65: #0 qdr_delivery_mcast_inbound_update_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:853 (libqpid-dispatch.so+0xd\
> 97bb) 
> 65: #1 qdr_update_delivery_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:671 (libqpid-dispatch.so+0xd8f22) 
> 65: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xfb2ae) 
> 65: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
> 65: #4 <null> <null> (libtsan.so.0+0x2d33f) 
> 65: 
> 65: Location is heap block of size 512 at 0x7b5000081200 allocated by thread T2: 
> 65: #0 posix_memalign <null> (libtsan.so.0+0x3061d) 
> 65: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:396 (libqpid-dispatch.so+0x6ab9c) 
> 65: #2 new_qdr_delivery_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/delivery.c:24 (libqpid-dispatch.so+0xd5ddd) 
> 65: #3 qdr_link_deliver /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:47 (libqpid-dispatch.so+0x1038d9) 
> 65: #4 AMQP_rx_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:868 (libqpid-dispatch.so+0x124406) 
> 65: #5 do_receive /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:227 (libqpid-dispatch.so+0x7a99b) 
> 65: #6 qd_container_handle_event /home/kgiusti/work/dispatch/qpid-dispatch/src/container.c:737 (libqpid-dispatch.so+0x7cf4f) 
> 65: #7 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0x130537) 
> 65: #8 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a) 
> 65: #9 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a) 
> 65: #10 <null> <null> (libtsan.so.0+0x2d33f)
> {noformat}



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