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

qd_entity_refresh_allocator race in alloc_pool.c

    XMLWordPrintableJSON

Details

    Description

      qd_entity_refresh_allocator walks all the descriptors reading their contents.  This can happen while the descriptors are being written to during normal pool operations.

       

      Example:

       

      5: WARNING: ThreadSanitizer: data race (pid=566878)
      65: Read of size 8 at 0x7b0c00000d10 by main thread (mutexes: write M13, write M286, write M9):
      65: #0 qd_entity_refresh_allocator /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:700 (libqpid-dispatch.so+0x6cdec)
      65: #1 ffi_call_unix64 <null> (libffi.so.6+0x6aef)
      65: #2 qdr_forward_on_message /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/forwarder.c:336 (libqpid-dispatch.so+0xe4ff5)
      65: #3 qdr_general_handler /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core.c:929 (libqpid-dispatch.so+0xf83f6)
      65: #4 qd_timer_visit /home/kgiusti/work/dispatch/qpid-dispatch/src/timer.c:317 (libqpid-dispatch.so+0x135b52)
      65: #5 handle /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1006 (libqpid-dispatch.so+0x12fc8d)
      65: #6 thread_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1121 (libqpid-dispatch.so+0x13063a)
      65: #7 qd_server_run /home/kgiusti/work/dispatch/qpid-dispatch/src/server.c:1501 (libqpid-dispatch.so+0x1328de)
      65: #8 main_process /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:115 (qdrouterd+0x40271a)
      65: #9 main /home/kgiusti/work/dispatch/qpid-dispatch/router/src/main.c:369 (qdrouterd+0x403557)
      65:
      65: Previous write of size 8 at 0x7b0c00000d10 by thread T1 (mutexes: write M305):
      65: #0 qd_dealloc /home/kgiusti/work/dispatch/qpid-dispatch/src/alloc_pool.c:494 (libqpid-dispatch.so+0x6bacd)
      65: #1 free_qdr_action_t /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:33 (libqpid-dispatch.so+0xf9a35)
      65: #2 router_core_thread /home/kgiusti/work/dispatch/qpid-dispatch/src/router_core/router_core_thread.c:240 (libqpid-dispatch.so+0xfb2ba)
      65: #3 _thread_init /home/kgiusti/work/dispatch/qpid-dispatch/src/posix/threading.c:172 (libqpid-dispatch.so+0xad37a)
      65: #4 <null> <null> (libtsan.so.0+0x2d33f)

       

      Attachments

        Activity

          People

            kgiusti Ken Giusti
            kgiusti Ken Giusti
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: