[
https://issues.apache.org/jira/browse/DISPATCH-2137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386279#comment-17386279
]
Ken Giusti commented on DISPATCH-2137:
--------------------------------------
More races in remote_sasl.c:
https://app.travis-ci.com/github/apache/qpid-dispatch/jobs/526235103
{color:#172b4d}43: WARNING: ThreadSanitizer: data race (pid=13703){color}
{color:#172b4d}43: Write of size 8 at 0x5626e18dbb38 by thread T3 (mutexes:
write M237):{color}
{color:#172b4d}43: #0 qdr_use_remote_authentication_service
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:506
(qdrouterd+0x8af79){color}
{color:#172b4d}43: #1 on_connection_bound
/home/travis/build/apache/qpid-dispatch/src/server.c:755
(qdrouterd+0xe2edf){color}
{color:#172b4d}43: #2 handle
/home/travis/build/apache/qpid-dispatch/src/server.c:1037
(qdrouterd+0xe2edf){color}
{color:#172b4d}43: #3 thread_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1133
(qdrouterd+0xe4ce8){color}
{color:#172b4d}43: #4 _thread_init
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172
(qdrouterd+0x8b851){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Previous read of size 8 at 0x5626e18dbb38 by main
thread:{color}
{color:#172b4d}43: #0 qdr_handle_authentication_service_connection_event
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:724
(qdrouterd+0x8b188){color}
{color:#172b4d}43: #1 handle
/home/travis/build/apache/qpid-dispatch/src/server.c:1005
(qdrouterd+0xe3567){color}
{color:#172b4d}43: #2 thread_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1133
(qdrouterd+0xe4d6c){color}
{color:#172b4d}43: #3 qd_server_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1524
(qdrouterd+0xe597f){color}
{color:#172b4d}43: #4 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:115
(qdrouterd+0x2dc57){color}
{color:#172b4d}43: #5 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Location is global 'auth_service_log' of size 8 at
0x5626e18dbb38 (qdrouterd+0x00000012eb38){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Mutex M237 (0x7b1000000900) created at{color}
{color:#172b4d}43: #0 pthread_mutex_init
../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1220
(libtsan.so.0+0x4a616){color}
{color:#172b4d}43: #1 sys_mutex
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:43
(qdrouterd+0x8b8bf){color}
{color:#172b4d}43: #2 qd_server
/home/travis/build/apache/qpid-dispatch/src/server.c:1380
(qdrouterd+0xe50aa){color}
{color:#172b4d}43: #3 qd_dispatch_prepare
/home/travis/build/apache/qpid-dispatch/src/dispatch.c:334
(qdrouterd+0x6b8da){color}{color:#172b4d} {color}
{color:#172b4d}43: #4 <null> <null> (libffi.so.7+0x6ff4){color}{color:#172b4d}
{color}
{color:#172b4d}43: #5 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:97
(qdrouterd+0x2dbe2){color}{color:#172b4d} {color}
{color:#172b4d}43: #6 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}{color:#172b4d} {color}
{color:#172b4d}43: {color}{color:#172b4d} {color}
{color:#172b4d}43: Thread T3 (tid=13707, running) created by main thread
at:{color}{color:#172b4d} {color}
{color:#172b4d}43: #0 pthread_create
../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:962
(libtsan.so.0+0x5ea79){color}{color:#172b4d}
{color}
{color:#172b4d}43: #1 sys_thread
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:181
(qdrouterd+0x8be12){color}
{color:#172b4d}43: #2 qd_server_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1522
(qdrouterd+0xe595a){color}
{color:#172b4d}43: #3 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:115
(qdrouterd+0x2dc57){color}
{color:#172b4d}43: #4 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: SUMMARY: ThreadSanitizer: data race
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:506 in
qdr_use_remote_authentication_service{color}
{color:#172b4d}43: =================={color}
{color:#172b4d}43: =================={color}
{color:#172b4d}43: WARNING: ThreadSanitizer: data race (pid=13703){color}
{color:#172b4d}43: Read of size 8 at 0x5626e18dbb38 by main thread:{color}
{color:#172b4d}43: #0 qdr_handle_authentication_service_connection_event
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:724
(qdrouterd+0x8b188){color}
{color:#172b4d}43: #1 handle
/home/travis/build/apache/qpid-dispatch/src/server.c:1005
(qdrouterd+0xe3567){color}
{color:#172b4d}43: #2 thread_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1133
(qdrouterd+0xe4d6c){color}
{color:#172b4d}43: #3 qd_server_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1524
(qdrouterd+0xe597f){color}
{color:#172b4d}43: #4 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:115
(qdrouterd+0x2dc57){color}
{color:#172b4d}43: #5 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Previous write of size 8 at 0x5626e18dbb38 by thread T3
(mutexes: write M237):{color}
{color:#172b4d}43: #0 qdr_use_remote_authentication_service
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:506
(qdrouterd+0x8af79){color}
{color:#172b4d}43: #1 on_connection_bound
/home/travis/build/apache/qpid-dispatch/src/server.c:755
(qdrouterd+0xe2edf){color}
{color:#172b4d}43: #2 handle
/home/travis/build/apache/qpid-dispatch/src/server.c:1037
(qdrouterd+0xe2edf){color}
{color:#172b4d}43: #3 thread_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1133
(qdrouterd+0xe4ce8){color}
{color:#172b4d}43: #4 _thread_init
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:172
(qdrouterd+0x8b851){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Location is global 'auth_service_log' of size 8 at
0x5626e18dbb38 (qdrouterd+0x00000012eb38){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Mutex M237 (0x7b1000000900) created at:{color}
{color:#172b4d}43: #0 pthread_mutex_init
../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1220
(libtsan.so.0+0x4a616){color}
{color:#172b4d}43: #1 sys_mutex
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:43
(qdrouterd+0x8b8bf){color}
{color:#172b4d}43: #2 qd_server
/home/travis/build/apache/qpid-dispatch/src/server.c:1380
(qdrouterd+0xe50aa){color}
{color:#172b4d}43: #3 qd_dispatch_prepare
/home/travis/build/apache/qpid-dispatch/src/dispatch.c:334
(qdrouterd+0x6b8da){color}
{color:#172b4d}43: #4 <null> <null> (libffi.so.7+0x6ff4{color}
{color:#172b4d}43: #5 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:97
(qdrouterd+0x2dbe2){color}
{color:#172b4d}43: #6 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: Thread T3 (tid=13707, running) created by main thread
at:{color}
{color:#172b4d}43: #0 pthread_create
../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:962
(libtsan.so.0+0x5ea79){color}
{color:#172b4d}43: #1 sys_thread
/home/travis/build/apache/qpid-dispatch/src/posix/threading.c:181
(qdrouterd+0x8be12){color}
{color:#172b4d}43: #2 qd_server_run
/home/travis/build/apache/qpid-dispatch/src/server.c:1522
(qdrouterd+0xe595a){color}
{color:#172b4d}43: #3 main_process
/home/travis/build/apache/qpid-dispatch/router/src/main.c:115
(qdrouterd+0x2dc57){color}
{color:#172b4d}43: #4 main
/home/travis/build/apache/qpid-dispatch/router/src/main.c:369
(qdrouterd+0x2d0b2){color}
{color:#172b4d}43: {color}
{color:#172b4d}43: SUMMARY: ThreadSanitizer: data race
/home/travis/build/apache/qpid-dispatch/src/remote_sasl.c:724 in
qdr_handle_authentication_service_connection_event{color}
> multiple data races in the SASL plugin
> --------------------------------------
>
> Key: DISPATCH-2137
> URL: https://issues.apache.org/jira/browse/DISPATCH-2137
> Project: Qpid Dispatch
> Issue Type: Bug
> Components: Router Node
> Affects Versions: 1.16.0
> Reporter: Ken Giusti
> Assignee: Ganesh Murthy
> Priority: Major
> Labels: race-condition, tsan
> Fix For: 1.17.0
>
>
> 44: WARNING: ThreadSanitizer: data race (pid=652787)
> 44: Read of size 1 at 0x7b300002ddc0 by main thread:
> 44: #0 remote_sasl_prepare
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:344
> (libqpid-dispatch.so+0xab480)
> 44: #1 pni_sasl_impl_prepare_write
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:219
> (libqpid-proton-core.so.10+0x2895b)
> 44: #2 pn_output_write_sasl
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:691
> (libqpid-proton-core.so.10+0x2895b)
> 44: #3 qd_server_run
> /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501
> (libqpid-dispatch.so+0x132935)
> 44: #4 main_process
> /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115
> (qdrouterd+0x40271a)
> 44: #5 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369
> (qdrouterd+0x403557)
> 44:
> 44: Previous write of size 1 at 0x7b300002ddc0 by thread T4:
> 44: #0 notify_downstream
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:276
> (libqpid-dispatch.so+0xaaf79)
> 44: #1 remote_sasl_process_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:445
> (libqpid-dispatch.so+0xabb75)
> 44: #2 pni_sasl_impl_process_init
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:224
> (libqpid-proton-core.so.10+0x297b5)
> 44: #3 pn_do_init /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:903
> (libqpid-proton-core.so.10+0x297b5)
> 44: #4 _thread_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172
> (libqpid-dispatch.so+0xad38a)
> 44: #5 <null> <null> (libtsan.so.0+0x2d33f)
>
> --------------------------------------------
> 44: Read of size 8 at 0x7b300002dda8 by main thread:
> 44: #0 remote_sasl_prepare
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:345
> (libqpid-dispatch.so+0xab4a5)
> 44: #1 pni_sasl_impl_prepare_write
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:219
> (libqpid-proton-core.so.10+0x2895b)
> 44: #2 pn_output_write_sasl
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:691
> (libqpid-proton-core.so.10+0x2895b)
> 44: #3 qd_server_run
> /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501
> (libqpid-dispatch.so+0x132935)
> 44: #4 main_process
> /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115
> (qdrouterd+0x40271a)
> 44: #5 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369
> (qdrouterd+0x403557)
> 44:
> 44: Previous write of size 8 at 0x7b300002dda8 by thread T4:
> 44: #0 remote_sasl_process_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:443
> (libqpid-dispatch.so+0xabb40)
> 44: #1 pni_sasl_impl_process_init
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:224
> (libqpid-proton-core.so.10+0x297b5)
> 44: #2 pn_do_init /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:903
> (libqpid-proton-core.so.10+0x297b5)
> 44: #3 _thread_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172
> (libqpid-dispatch.so+0xad38a)
> 44: #4 <null> <null> (libtsan.so.0+0x2d33f)
>
> ----------
> 44: Read of size 8 at 0x7b04000018b0 by main thread:
> 44: #0 strlen <null> (libtsan.so.0+0x32c4f)
> 44: #1 pn_strdup /home/kgiusti/work/proton/qpid-proton/c/src/core/util.c:122
> (libqpid-proton-core.so.10+0x26b3c)
> 44: #2 pnx_sasl_set_selected_mechanism
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:147
> (libqpid-proton-core.so.10+0x26b3c)
> 44: #3 pni_sasl_impl_prepare_write
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:219
> (libqpid-proton-core.so.10+0x2895b)
> 44: #4 pn_output_write_sasl
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:691
> (libqpid-proton-core.so.10+0x2895b)
> 44: #5 qd_server_run
> /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501
> (libqpid-dispatch.so+0x132935)
> 44: #6 main_process
> /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115
> (qdrouterd+0x40271a)
> 44: #7 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369
> (qdrouterd+0x403557)
> 44:
> 44: Previous write of size 8 at 0x7b04000018b0 by thread T4:
> 44: #0 malloc <null> (libtsan.so.0+0x304d3)
> 44: #1 __GI___strdup
> /usr/src/debug/glibc-2.31-74-gd0c84d22b6/string/strdup.c:42
> (libc.so.6+0x900ae)
> 44: #2 remote_sasl_process_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:443
> (libqpid-dispatch.so+0xabb2d)
> 44: #3 pni_sasl_impl_process_init
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:224
> (libqpid-proton-core.so.10+0x297b5)
> 44: #4 pn_do_init /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:903
> (libqpid-proton-core.so.10+0x297b5)
> 44: #5 _thread_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172
> (libqpid-dispatch.so+0xad38a)
> 44: #6 <null> <null> (libtsan.so.0+0x2d33f)
>
> --------------------
> 44: WARNING: ThreadSanitizer: data race (pid=652787)
> 44: Read of size 8 at 0x7b300002ddb8 by main thread:
> 44: #0 remote_sasl_prepare
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:347
> (libqpid-dispatch.so+0xab4f3)
> 44: #1 pni_sasl_impl_prepare_write
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:219
> (libqpid-proton-core.so.10+0x2895b)
> 44: #2 pn_output_write_sasl
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:691
> (libqpid-proton-core.so.10+0x2895b)
> 44: #3 qd_server_run
> /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501
> (libqpid-dispatch.so+0x132935)
> 44: #4 main_process
> /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115
> (qdrouterd+0x40271a)
> 44: #5 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369
> (qdrouterd+0x403557)
> 44:
> 44: Previous write of size 8 at 0x7b300002ddb8 by thread T4:
> 44: #0 copy_bytes
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:133
> (libqpid-dispatch.so+0xaa550)
> 44: #1 remote_sasl_process_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:444
> (libqpid-dispatch.so+0xabb5f)
> 44: #2 pni_sasl_impl_process_init
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:224
> (libqpid-proton-core.so.10+0x297b5)
> 44: #3 pn_do_init /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:903
> (libqpid-proton-core.so.10+0x297b5)
> 44: #4 _thread_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172
> (libqpid-dispatch.so+0xad38a)
> 44: #5 <null> <null> (libtsan.so.0+0x2d33f)
>
> --------------------------------
> 44: Read of size 8 at 0x7b0c000032a0 by main thread:
> 44: #0 memmove <null> (libtsan.so.0+0x42bd3)
> 44: #1 pn_buffer_append
> /home/kgiusti/work/proton/qpid-proton/c/src/core/buffer.c:179
> (libqpid-proton-core.so.10+0x13d00)
> 44: #2 pn_buffer_append
> /home/kgiusti/work/proton/qpid-proton/c/src/core/buffer.c:169
> (libqpid-proton-core.so.10+0x13d00)
> 44: #3 qd_server_run
> /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501
> (libqpid-dispatch.so+0x132935)
> 44: #4 main_process
> /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115
> (qdrouterd+0x40271a)
> 44: #5 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369
> (qdrouterd+0x403557)
> 44:
> 44: Previous write of size 8 at 0x7b0c000032a0 by thread T4:
> 44: #0 malloc <null> (libtsan.so.0+0x304d3)
> 44: #1 copy_bytes
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:133
> (libqpid-dispatch.so+0xaa53d)
> 44: #2 remote_sasl_process_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/remote_sasl.c:444
> (libqpid-dispatch.so+0xabb5f)
> 44: #3 pni_sasl_impl_process_init
> /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:224
> (libqpid-proton-core.so.10+0x297b5)
> 44: #4 pn_do_init /home/kgiusti/work/proton/qpid-proton/c/src/sasl/sasl.c:903
> (libqpid-proton-core.so.10+0x297b5)
> 44: #5 _thread_init
> /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172
> (libqpid-dispatch.so+0xad38a)
> 44: #6 <null> <null> (libtsan.so.0+0x2d33f)
>
> -------------------------------------------------------------
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]