Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ThreadSanitizer data race between qdr_close_connection_CT and qdr_connection_process #127

Closed
jiridanek opened this issue Mar 4, 2022 · 2 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@jiridanek
Copy link
Contributor

https://github.com/jiridanek/skupper-router/runs/5426596730?check_suite_focus=true#step:27:951

58: WARNING: ThreadSanitizer: data race (pid=2216)
58:   Write of size 1 at 0x7b54000b0942 by thread T1:
58:     #0 qdr_close_connection_CT /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:267 (qdrouterd+0x486bd8)
58:     #1 qdr_core_close_connection_CT /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:283 (qdrouterd+0x486d66)
58:     #2 router_core_thread /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/router_core_thread.c:236 (qdrouterd+0x4a2e5a)
58:     #3 _thread_init /home/runner/work/skupper-router/skupper-router/skupper-router/src/posix/threading.c:172 (qdrouterd+0x47a32d)
58: 
58:   Previous read of size 1 at 0x7b54000b0942 by thread T2:
58:     #0 qdr_connection_process /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:308 (qdrouterd+0x486e3c)
58:     #1 _do_reconnect /home/runner/work/skupper-router/skupper-router/skupper-router/src/adaptors/http1/http1_server.c:432 (qdrouterd+0x43ae3c)
58:     #2 qd_timer_visit /home/runner/work/skupper-router/skupper-router/skupper-router/src/timer.c:320 (qdrouterd+0x4c4c7f)
58:     #3 handle /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:980 (qdrouterd+0x4c054e)
58:     #4 thread_run /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:1095 (qdrouterd+0x4c2357)
58:     #5 _thread_init /home/runner/work/skupper-router/skupper-router/skupper-router/src/posix/threading.c:172 (qdrouterd+0x47a32d)
58: 
58:   Location is heap block of size 640 at 0x7b54000b0900 allocated by main thread:
58:     #0 posix_memalign <null> (libtsan.so.0+0x32a23)
58:     #1 qd_alloc /home/runner/work/skupper-router/skupper-router/skupper-router/src/alloc_pool.c:391 (qdrouterd+0x447b99)
58:     #2 new_qdr_connection_t /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:44 (qdrouterd+0x486321)
58:     #3 qdr_connection_opened /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:88 (qdrouterd+0x486321)
58:     #4 _create_server_connection /home/runner/work/skupper-router/skupper-router/skupper-router/src/adaptors/http1/http1_server.c:194 (qdrouterd+0x43c7b0)
58:     #5 qd_http1_configure_connector /home/runner/work/skupper-router/skupper-router/skupper-router/src/adaptors/http1/http1_server.c:232 (qdrouterd+0x43c7b0)
58:     #6 qd_dispatch_configure_http_connector /home/runner/work/skupper-router/skupper-router/skupper-router/src/adaptors/http_common.c:169 (qdrouterd+0x42702e)
58:     #7 ffi_call_unix64 <null> (libffi.so.6+0x6c03)
58:     #8 qdr_forward_on_message /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/forwarder.c:324 (qdrouterd+0x4[969](https://github.com/jiridanek/skupper-router/runs/5426596730?check_suite_focus=true#step:27:969)7c)
58:     #9 qdr_general_handler /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/router_core.c:794 (qdrouterd+0x49c4ae)
58:     #10 qd_timer_visit /home/runner/work/skupper-router/skupper-router/skupper-router/src/timer.c:320 (qdrouterd+0x4c4c7f)
58:     #11 handle /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:[980](https://github.com/jiridanek/skupper-router/runs/5426596730?check_suite_focus=true#step:27:980) (qdrouterd+0x4c054e)
58:     #12 thread_run /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:1095 (qdrouterd+0x4c2357)
58:     #13 qd_server_run /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:1491 (qdrouterd+0x4c2ecc)
58:     #14 main_process /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:105 (qdrouterd+0x423ccc)
58:     #15 main /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:359 (qdrouterd+0x42318c)
58: 
58:   Thread T1 (tid=2244, running) created by main thread at:
58:     #0 pthread_create <null> (libtsan.so.0+0x5bef5)
58:     #1 sys_thread /home/runner/work/skupper-router/skupper-router/skupper-router/src/posix/threading.c:181 (qdrouterd+0x47a7bc)
58:     #2 qdr_core /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/router_core.c:122 (qdrouterd+0x49d924)
58:     #3 qd_router_setup_late /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_node.c:2088 (qdrouterd+0x4bb948)
58:     #4 ffi_call_unix64 <null> (libffi.so.6+0x6c03)
58:     #5 main_process /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:92 (qdrouterd+0x423c6c)
58:     #6 main /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:359 (qdrouterd+0x42318c)
58: 
58:   Thread T2 (tid=2248, running) created by main thread at:
58:     #0 pthread_create <null> (libtsan.so.0+0x5bef5)
58:     #1 sys_thread /home/runner/work/skupper-router/skupper-router/skupper-router/src/posix/threading.c:181 (qdrouterd+0x47a7bc)
58:     #2 qd_server_run /home/runner/work/skupper-router/skupper-router/skupper-router/src/server.c:1489 (qdrouterd+0x4c2eac)
58:     #3 main_process /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:105 (qdrouterd+0x423ccc)
58:     #4 main /home/runner/work/skupper-router/skupper-router/skupper-router/router/src/main.c:359 (qdrouterd+0x42318c)
58: 
58: SUMMARY: ThreadSanitizer: data race /home/runner/work/skupper-router/skupper-router/skupper-router/src/router_core/connections.c:267 in qdr_close_connection_CT
58: ==================
58: ThreadSanitizer: reported 1 warnings
@jiridanek jiridanek added test-bug It's a test bug unless proven otherwise race Reported by Thread Sanitizer labels Mar 5, 2022
@kgiusti kgiusti self-assigned this Apr 1, 2022
@kgiusti kgiusti added duplicate This issue or pull request already exists and removed test-bug It's a test bug unless proven otherwise race Reported by Thread Sanitizer labels Apr 1, 2022
@kgiusti
Copy link
Contributor

kgiusti commented Apr 1, 2022

This is a dup of ISSUE #243 closing as duplicate.

@kgiusti kgiusti closed this as completed Apr 1, 2022
@jiridanek
Copy link
Contributor Author

Sorry, too many issues to keep track what is filled and what is not, I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants