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

Race accessing several message content flags and values

    XMLWordPrintableJSON

Details

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

    Description

      Asynchronous read/write of the send_complete flag in the message content:

      71: E           WARNING: ThreadSanitizer: data race (pid=3184)
      71: E             Write of size 1 at 0x7b4800014551 by thread T4:
      71: E               #0 qd_message_set_send_complete /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1321 (libqpid-dispatch.so+0x82975)
      71: E               #1 read_message_body /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:534 (libqpid-dispatch.so+0x561d2)
      71: E               #2 handle_outgoing /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:627 (libqpid-dispatch.so+0x561d2)
      71: E               #3 qdr_tcp_deliver /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:1541 (libqpid-dispatch.so+0x59a74)
      71: E               #4 qdr_link_process_deliveries /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:178 (libqpid-dispatch.so+0xd4daf)
      71: E               #5 qdr_tcp_push /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:1479 (libqpid-dispatch.so+0x5741f)
      71: E               #6 qdr_connection_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/connections.c:414 (libqpid-dispatch.so+0xa86fd)
      71: E               #7 handle_connection_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:850 (libqpid-dispatch.so+0x57881)
      71: E               #8 handle_event_with_context /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:802 (libqpid-dispatch.so+0xf206d)
      71: E               #9 do_handle_raw_connection_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:808 (libqpid-dispatch.so+0xf206d)
      71: E               #10 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1089 (libqpid-dispatch.so+0xf206d)
      71: E               #11 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf64d5)
      71: E               #12 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x96d52)
      71: E           
      71: E             Previous read of size 1 at 0x7b4800014551 by thread T3 (mutexes: write M410):
      71: E               #0 qd_message_send_complete /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1313 (libqpid-dispatch.so+0x82923)
      71: E               #1 qdr_delivery_send_complete /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/delivery.c:64 (libqpid-dispatch.so+0xb442c)
      71: E               #2 qdr_link_process_deliveries /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/transfer.c:186 (libqpid-dispatch.so+0xd4ddc)
      71: E               #3 qdr_tcp_push /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:1479 (libqpid-dispatch.so+0x5741f)
      71: E               #4 qdr_connection_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/connections.c:414 (libqpid-dispatch.so+0xa86fd)
      71: E               #5 on_activate /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:185 (libqpid-dispatch.so+0x5a209)
      71: E               #6 qd_timer_visit /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/timer.c:317 (libqpid-dispatch.so+0xf7fad)
      71: E               #7 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1006 (libqpid-dispatch.so+0xf1fbe)
      71: E               #8 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf64d5)
      71: E               #9 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x96d52)
      71: E           
      71: E             Location is heap block of size 384 at 0x7b4800014400 allocated by thread T2:
      71: E               #0 posix_memalign <null> (libtsan.so.0+0x32a23)
      71: E               #1 qd_alloc /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/alloc_pool.c:396 (libqpid-dispatch.so+0x5cca3)
      71: E               #2 new_qd_message_t /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:95 (libqpid-dispatch.so+0x81d31)
      71: E               #3 qd_message /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:995 (libqpid-dispatch.so+0x82238)
      71: E               #4 qd_message_receive /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1463 (libqpid-dispatch.so+0x88e53)
      71: E               #5 AMQP_rx_handler /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_node.c:466 (libqpid-dispatch.so+0xeaf87)
      71: E               #6 do_receive /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:227 (libqpid-dispatch.so+0x751dc)
      71: E               #7 qd_container_handle_event /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/container.c:737 (libqpid-dispatch.so+0x751dc)
      71: E               #8 handle /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1096 (libqpid-dispatch.so+0xf2021)
      71: E               #9 thread_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0xf6460)
      71: E               #10 _thread_init /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0x96d52)
      71: E           
      71: E             Mutex M410 (0x7b10000022c0) created at:
      71: E               #0 pthread_mutex_init <null> (libtsan.so.0+0x49603)
      71: E               #1 sys_mutex /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:43 (libqpid-dispatch.so+0x96dac)
      71: E               #2 qdr_connection_opened /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/router_core/connections.c:111 (libqpid-dispatch.so+0xa7516)
      71: E               #3 qdr_tcp_open_server_side_connection /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:966 (libqpid-dispatch.so+0x53031)
      71: E               #4 qdr_tcp_connection_egress /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:1050 (libqpid-dispatch.so+0x59704)
      71: E               #5 qd_dispatch_configure_tcp_connector /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/adaptors/tcp_adaptor.c:1287 (libqpid-dispatch.so+0x5b917)
      71: E               #6 ffi_call_unix64 <null> (libffi.so.6+0x6c03)
      71: E               #7 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:97 (qdrouterd+0x40281c)
      71: E               #8 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      71: E           
      71: E             Thread T4 (tid=3189, running) created by main thread at:
      71: E               #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      71: E               #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x971ee)
      71: E               #2 qd_server_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1499 (libqpid-dispatch.so+0xf6712)
      71: E               #3 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40287c)
      71: E               #4 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      71: E           
      71: E             Thread T3 (tid=3188, running) created by main thread at:
      71: E               #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      71: E               #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x971ee)
      71: E               #2 qd_server_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1499 (libqpid-dispatch.so+0xf6712)
      71: E               #3 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40287c)
      71: E               #4 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      71: E           
      71: E             Thread T2 (tid=3187, running) created by main thread at:
      71: E               #0 pthread_create <null> (libtsan.so.0+0x5bf45)
      71: E               #1 sys_thread /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/posix/threading.c:181 (libqpid-dispatch.so+0x971ee)
      71: E               #2 qd_server_run /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/server.c:1499 (libqpid-dispatch.so+0xf6712)
      71: E               #3 main_process /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40287c)
      71: E               #4 main /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x4024fc)
      71: E           
      71: E           SUMMARY: ThreadSanitizer: data race /home/runner/work/qpid-dispatch/qpid-dispatch/qpid-dispatch/src/message.c:1321 in qd_message_set_send_complete
      71: E           ==================
      71: E           ThreadSanitizer: reported 1 warnings
      

       

      Attachments

        Activity

          People

            chug Charles E. Rolke
            chug Charles E. Rolke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: