Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-2172

TSan data race from qd_message_free in system_tests_http1_adaptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.17.0
    • None
    • None

    Description

      Seen at current head (with PR changes only touching Travis CI) in system_tests_http1_adaptor

      https://github.com/apache/qpid-dispatch/pull/1258/checks?check_run_id=2827236011#step:25:3447

      69: WARNING: ThreadSanitizer: data race (pid=3415)
      69:   Read of size 8 at 0x7b4800022620 by thread T4 (mutexes: write M1463):
      69:     #0 qd_message_free /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1037 (libqpid-dispatch.so+0x86510)
      69:     #1 qdr_do_message_to_addr_free /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core_thread.c:102 (libqpid-dispatch.so+0xcd356)
      69:     #2 qdr_general_handler /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:942 (libqpid-dispatch.so+0xc6c2b)
      69:     #3 qd_timer_visit /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/timer.c:317 (libqpid-dispatch.so+0xf7b9d)
      69:     #4 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1006 (libqpid-dispatch.so+0xf1bae)
      69:     #5 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf60c5)
      69:     #6 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x968c2)
      69: 
      69:   Previous write of size 8 at 0x7b4800022620 by thread T2:
      69:     #0 qd_message_stream_data_release /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:2680 (libqpid-dispatch.so+0x87acf)
      69:     #1 qdr_http1_out_data_fifo_cleanup /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_adaptor.c:152 (libqpid-dispatch.so+0x43b41)
      69:     #2 _server_request_free /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:1647 (libqpid-dispatch.so+0x4f1ed)
      69:     #3 _server_request_free /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:1645 (libqpid-dispatch.so+0x4f843)
      69:     #4 _process_request /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:734 (libqpid-dispatch.so+0x4f843)
      69:     #5 _handle_connection_events /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_server.c:659 (libqpid-dispatch.so+0x4ff55)
      69:     #6 handle_event_with_context /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:802 (libqpid-dispatch.so+0xf1c5d)
      69:     #7 do_handle_raw_connection_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:808 (libqpid-dispatch.so+0xf1c5d)
      69:     #8 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1089 (libqpid-dispatch.so+0xf1c5d)
      69:     #9 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf60c5)
      69:     #10 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x968c2)
      69: 
      69:   Location is heap block of size 384 at 0x7b4800022500 allocated by thread T1:
      69:     #0 posix_memalign <null> (libtsan.so.0+0x32a23)
      69:     #1 qd_alloc /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:396 (libqpid-dispatch.so+0x5c663)
      69:     #2 new_qd_message_t /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:91 (libqpid-dispatch.so+0x81721)
      69:     #3 qd_message_copy /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1099 (libqpid-dispatch.so+0x83c48)
      69:     #4 qdr_forward_new_delivery_CT /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:153 (libqpid-dispatch.so+0xbdb7b)
      69:     #5 qdr_forward_balanced_CT /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:905 (libqpid-dispatch.so+0xbf20d)
      69:     #6 qdr_forward_message_CT /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/forwarder.c:1120 (libqpid-dispatch.so+0xc2600)
      69:     #7 qdr_link_forward_CT /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:572 (libqpid-dispatch.so+0xd6033)
      69:     #8 qdr_link_deliver_CT /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:862 (libqpid-dispatch.so+0xd7582)
      69:     #9 router_core_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core_thread.c:239 (libqpid-dispatch.so+0xce0db)
      69:     #10 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x968c2)
      69: 
      69:   Mutex M1463 (0x7b10000094c0) created at:
      69:     #0 pthread_mutex_init <null> (libtsan.so.0+0x49603)
      69:     #1 sys_mutex /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:43 (libqpid-dispatch.so+0x9691c)
      69:     #2 qd_message /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1005 (libqpid-dispatch.so+0x81cc7)
      69:     #3 _client_rx_headers_done_cb /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_client.c:849 (libqpid-dispatch.so+0x454d8)
      69:     #4 process_headers_done /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:837 (libqpid-dispatch.so+0x411c8)
      69:     #5 parse_header /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:917 (libqpid-dispatch.so+0x411c8)
      69:     #6 decode_incoming /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:1294 (libqpid-dispatch.so+0x411c8)
      69:     #7 h1_codec_connection_rx_data /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_codec.c:1339 (libqpid-dispatch.so+0x411c8)
      69:     #8 _handle_conn_read_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_client.c:404 (libqpid-dispatch.so+0x45c79)
      69:     #9 _handle_connection_events /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/http1/http1_client.c:511 (libqpid-dispatch.so+0x4826c)
      69:     #10 handle_event_with_context /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:802 (libqpid-dispatch.so+0xf1c5d)
      69:     #11 do_handle_raw_connection_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:808 (libqpid-dispatch.so+0xf1c5d)
      69:     #12 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1089 (libqpid-dispatch.so+0xf1c5d)
      69:     #13 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf60c5)
      69:     #14 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x968c2)
      69: 
      69:   Thread T4 (tid=3420, running) created by main thread at:
      69:     #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      69:     #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x96d5e)
      69:     #2 qd_server_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1499 (libqpid-dispatch.so+0xf6302)
      69:     #3 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40287c)
      69:     #4 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      69: 
      69:   Thread T2 (tid=3418, running) created by main thread at:
      69:     #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      69:     #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x96d5e)
      69:     #2 qd_server_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1499 (libqpid-dispatch.so+0xf6302)
      69:     #3 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40287c)
      69:     #4 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      69: 
      69:   Thread T1 (tid=3417, running) created by main thread at:
      69:     #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      69:     #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x96d5e)
      69:     #2 qdr_core /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/router_core.c:124 (libqpid-dispatch.so+0xc75d6)
      69:     #3 qd_router_setup_late /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:2124 (libqpid-dispatch.so+0xedb98)
      69:     #4 ffi_call_unix64 <null> (libffi.so.6+0x6c03)
      69:     #5 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:97 (qdrouterd+0x40281c)
      69:     #6 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      69: 
      69: SUMMARY: ThreadSanitizer: data race /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1037 in qd_message_free
      69: ==================
      69: ThreadSanitizer: reported 1 warnings
      

      Attachments

        Issue Links

          Activity

            People

              kgiusti Ken Giusti
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: