You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ken Giusti (Jira)" <ji...@apache.org> on 2021/01/21 14:21:00 UTC
[jira] [Updated] (DISPATCH-1918) Thread race between I/O and Core
over link->undelivered and unsettled lists
[ https://issues.apache.org/jira/browse/DISPATCH-1918?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ken Giusti updated DISPATCH-1918:
---------------------------------
Labels: race-condition (was: )
> Thread race between I/O and Core over link->undelivered and unsettled lists
> ---------------------------------------------------------------------------
>
> Key: DISPATCH-1918
> URL: https://issues.apache.org/jira/browse/DISPATCH-1918
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Router Node
> Affects Versions: 1.15.0
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Priority: Major
> Labels: race-condition
> Fix For: 1.16.0
>
>
> 70: WARNING: ThreadSanitizer: data race (pid=70705)
> 70: Read of size 8 at 0x7b540008eb68 by thread T1:
> 70: #0 qdr_forward_balanced_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:778 (libqpid-dispatch.so+0xb19c9)
> 70: #1 qdr_forward_message_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:1101 (libqpid-dispatch.so+0xb5160)
> 70: #2 qdr_link_forward_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:566 (libqpid-dispatch.so+0xc69ad)
> 70: #3 qdr_link_deliver_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:853 (libqpid-dispatch.so+0xc7bca)
> 70: #4 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xbf09d)
> 70: #5 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #6 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Previous write of size 8 at 0x7b540008eb68 by thread T4 (mutexes: write M348):
> 70: #0 qdr_link_complete_sent_message /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:289 (libqpid-dispatch.so+0xc5ce8)
> 70: #1 _process_request /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:715 (libqpid-dispatch.so+0x4d568)
> 70: #2 _handle_connection_events /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:615 (libqpid-dispatch.so+0x4dd9a)
> 70: #3 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 70: #4 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 70: #5 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 70: #6 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 70: #7 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #8 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Location is heap block of size 576 at 0x7b540008ea80 allocated by thread T4:
> 70: #0 posix_memalign <null> (libtsan.so.0+0x3061d)
> 70: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:388 (libqpid-dispatch.so+0x580a4)
> 70: #2 new_qdr_link_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:32 (libqpid-dispatch.so+0xb8a01)
> 70: #3 qdr_link_first_attach /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:580 (libqpid-dispatch.so+0x9e6a6)
> 70: #4 _setup_server_links /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:305 (libqpid-dispatch.so+0x4e855)
> 70: #5 _handle_connection_events /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:485 (libqpid-dispatch.so+0x4e855)
> 70: #6 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 70: #7 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 70: #8 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 70: #9 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 70: #10 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #11 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Mutex M348 (0x7b1000009980) created at:
> 70: #0 pthread_mutex_init <null> (libtsan.so.0+0x4a7c6)
> 70: #1 sys_mutex /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:43 (libqpid-dispatch.so+0x8c64c)
> 70: #2 qdr_connection_opened /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:110 (libqpid-dispatch.so+0x9caf6)
> 70: #3 _create_server_connection /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:187 (libqpid-dispatch.so+0x4f0c9)
> 70: #4 qd_http1_configure_connector /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:224 (libqpid-dispatch.so+0x4f0c9)
> 70: #5 qd_dispatch_configure_http_connector /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http_common.c:169 (libqpid-dispatch.so+0x3a1cd)
> 70: #6 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 70: #7 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 70: #8 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: Thread T1 (tid=70707, running) created by main thread at:
> 70: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 70: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 70: #2 qdr_core /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:121 (libqpid-dispatch.so+0xb9b16)
> 70: #3 qd_router_setup_late /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:1989 (libqpid-dispatch.so+0xdc0f8)
> 70: #4 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 70: #5 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 70: #6 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: Thread T4 (tid=70710, running) created by main thread at:
> 70: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 70: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 70: #2 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1482 (libqpid-dispatch.so+0xe350a)
> 70: #3 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 (qdrouterd+0x40287c)
> 70: #4 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: SUMMARY: ThreadSanitizer: data race /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:778 in qdr_forward_balanced_CT
> 70: ==================
> 70: WARNING: ThreadSanitizer: data race (pid=70705)
> 70: Read of size 8 at 0x7b540008eb88 by thread T1:
> 70: #0 qdr_forward_balanced_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:778 (libqpid-dispatch.so+0xb19dc)
> 70: #1 qdr_forward_message_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:1101 (libqpid-dispatch.so+0xb5160)
> 70: #2 qdr_link_forward_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:566 (libqpid-dispatch.so+0xc69ad)
> 70: #3 qdr_link_deliver_CT /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:853 (libqpid-dispatch.so+0xc7bca)
> 70: #4 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xbf09d)
> 70: #5 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #6 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Previous write of size 8 at 0x7b540008eb88 by thread T4 (mutexes: write M348):
> 70: #0 qdr_link_complete_sent_message /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/transfer.c:304 (libqpid-dispatch.so+0xc604b)
> 70: #1 _process_request /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:715 (libqpid-dispatch.so+0x4d568)
> 70: #2 _handle_connection_events /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:615 (libqpid-dispatch.so+0x4dd9a)
> 70: #3 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 70: #4 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 70: #5 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 70: #6 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 70: #7 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #8 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Location is heap block of size 576 at 0x7b540008ea80 allocated by thread T4:
> 70: #0 posix_memalign <null> (libtsan.so.0+0x3061d)
> 70: #1 qd_alloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:388 (libqpid-dispatch.so+0x580a4)
> 70: #2 new_qdr_link_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:32 (libqpid-dispatch.so+0xb8a01)
> 70: #3 qdr_link_first_attach /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:580 (libqpid-dispatch.so+0x9e6a6)
> 70: #4 _setup_server_links /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:305 (libqpid-dispatch.so+0x4e855)
> 70: #5 _handle_connection_events /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:485 (libqpid-dispatch.so+0x4e855)
> 70: #6 handle_event_with_context /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:804 (libqpid-dispatch.so+0xe025d)
> 70: #7 do_handle_raw_connection_event /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:810 (libqpid-dispatch.so+0xe025d)
> 70: #8 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1090 (libqpid-dispatch.so+0xe025d)
> 70: #9 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1122 (libqpid-dispatch.so+0xe2aa7)
> 70: #10 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x8c5f2)
> 70: #11 <null> <null> (libtsan.so.0+0x2d33f)
> 70:
> 70: Mutex M348 (0x7b1000009980) created at:
> 70: #0 pthread_mutex_init <null> (libtsan.so.0+0x4a7c6)
> 70: #1 sys_mutex /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:43 (libqpid-dispatch.so+0x8c64c)
> 70: #2 qdr_connection_opened /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/connections.c:110 (libqpid-dispatch.so+0x9caf6)
> 70: #3 _create_server_connection /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:187 (libqpid-dispatch.so+0x4f0c9)
> 70: #4 qd_http1_configure_connector /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:224 (libqpid-dispatch.so+0x4f0c9)
> 70: #5 qd_dispatch_configure_http_connector /home/kgiusti/work/dispatch/qpid-dispatch/src/adaptors/http_common.c:169 (libqpid-dispatch.so+0x3a1cd)
> 70: #6 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 70: #7 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 70: #8 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: Thread T1 (tid=70707, running) created by main thread at:
> 70: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 70: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 70: #2 qdr_core /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:121 (libqpid-dispatch.so+0xb9b16)
> 70: #3 qd_router_setup_late /home/kgiusti/work/dispatch/qpid-dispatch/src/router_node.c:1989 (libqpid-dispatch.so+0xdc0f8)
> 70: #4 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
> 70: #5 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:95 (qdrouterd+0x40281c)
> 70: #6 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: Thread T4 (tid=70710, running) created by main thread at:
> 70: #0 pthread_create <null> (libtsan.so.0+0x5ec29)
> 70: #1 sys_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x8ca8e)
> 70: #2 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1482 (libqpid-dispatch.so+0xe350a)
> 70: #3 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:113 (qdrouterd+0x40287c)
> 70: #4 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:367 (qdrouterd+0x4024fc)
> 70:
> 70: SUMMARY: ThreadSanitizer: data race /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:778 in qdr_forward_balanced_CT
> 70: ==================
> 70: ThreadSanitizer: reported 2 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