Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20184

data race at global counter btr_cur_n_non_sea

    Details

      Description

      All accesses to a global variable should be atomic.

      WARNING: ThreadSanitizer: data race (pid=28668)
        Write of size 8 at 0x0000037f9490 by thread T20:
          #0 btr_cur_search_to_nth_level_func(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, rw_lock_t*, char const*, unsigned int, mtr_t*, unsigned long) build/../storage/innobase/btr/btr0cur.cc:1295:19 (mysqld+0x1a5c71d)
          #1 btr_pcur_open_low(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_pcur_t*, char const*, unsigned int, unsigned long, mtr_t*) build/../storage/innobase/include/btr0pcur.ic:441:8 (mysqld+0x18a6f1e)
          #2 row_search_on_row_ref(btr_pcur_t*, unsigned long, dict_table_t const*, dtuple_t const*, mtr_t*) build/../storage/innobase/row/row0row.cc:1052:7 (mysqld+0x18a640c)
          #3 row_purge_reposition_pcur(unsigned long, purge_node_t*, mtr_t*) build/../storage/innobase/row/row0purge.cc:78:23 (mysqld+0x18902cf)
          #4 row_purge_reset_trx_id(purge_node_t*, mtr_t*) build/../storage/innobase/row/row0purge.cc:795:6 (mysqld+0x1895059)
          #5 row_purge_record_func(purge_node_t*, unsigned char*, que_thr_t const*, bool) build/../storage/innobase/row/row0purge.cc:1209:4 (mysqld+0x1893ac7)
          #6 row_purge(purge_node_t*, unsigned char*, que_thr_t*) build/../storage/innobase/row/row0purge.cc:1258:18 (mysqld+0x1890c81)
          #7 row_purge_step(que_thr_t*) build/../storage/innobase/row/row0purge.cc:1317:3 (mysqld+0x189093e)
          #8 que_thr_step(que_thr_t*) build/../storage/innobase/que/que0que.cc:1042:9 (mysqld+0x178f027)
          #9 que_run_threads_low(que_thr_t*) build/../storage/innobase/que/que0que.cc:1104:14 (mysqld+0x178d374)
          #10 que_run_threads(que_thr_t*) build/../storage/innobase/que/que0que.cc:1144:2 (mysqld+0x178cf23)
          #11 srv_task_execute() build/../storage/innobase/srv/srv0srv.cc:2473:3 (mysqld+0x193b1f5)
          #12 srv_worker_thread build/../storage/innobase/srv/srv0srv.cc:2521:7 (mysqld+0x193aee6)
       
        Previous write of size 8 at 0x0000037f9490 by thread T19:
          #0 btr_cur_search_to_nth_level_func(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_cur_t*, rw_lock_t*, char const*, unsigned int, mtr_t*, unsigned long) build/../storage/innobase/btr/btr0cur.cc:1295:19 (mysqld+0x1a5c71d)
          #1 btr_pcur_open_low(dict_index_t*, unsigned long, dtuple_t const*, page_cur_mode_t, unsigned long, btr_pcur_t*, char const*, unsigned int, unsigned long, mtr_t*) build/../storage/innobase/include/btr0pcur.ic:441:8 (mysqld+0x18a6f1e)
          #2 row_search_on_row_ref(btr_pcur_t*, unsigned long, dict_table_t const*, dtuple_t const*, mtr_t*) build/../storage/innobase/row/row0row.cc:1052:7 (mysqld+0x18a640c)
          #3 row_purge_reposition_pcur(unsigned long, purge_node_t*, mtr_t*) build/../storage/innobase/row/row0purge.cc:78:23 (mysqld+0x18902cf)
          #4 row_purge_reset_trx_id(purge_node_t*, mtr_t*) build/../storage/innobase/row/row0purge.cc:795:6 (mysqld+0x1895059)
          #5 row_purge_record_func(purge_node_t*, unsigned char*, que_thr_t const*, bool) build/../storage/innobase/row/row0purge.cc:1209:4 (mysqld+0x1893ac7)
          #6 row_purge(purge_node_t*, unsigned char*, que_thr_t*) build/../storage/innobase/row/row0purge.cc:1258:18 (mysqld+0x1890c81)
          #7 row_purge_step(que_thr_t*) build/../storage/innobase/row/row0purge.cc:1317:3 (mysqld+0x189093e)
          #8 que_thr_step(que_thr_t*) build/../storage/innobase/que/que0que.cc:1042:9 (mysqld+0x178f027)
          #9 que_run_threads_low(que_thr_t*) build/../storage/innobase/que/que0que.cc:1104:14 (mysqld+0x178d374)
          #10 que_run_threads(que_thr_t*) build/../storage/innobase/que/que0que.cc:1144:2 (mysqld+0x178cf23)
          #11 trx_purge(unsigned long, bool) build/../storage/innobase/trx/trx0purge.cc:1600:2 (mysqld+0x1994eb7)
          #12 srv_do_purge(unsigned long*) build/../storage/innobase/srv/srv0srv.cc:2617:20 (mysqld+0x193c567)
          #13 srv_purge_coordinator_thread build/../storage/innobase/srv/srv0srv.cc:2742:22 (mysqld+0x193b868)
       
        Location is global 'btr_cur_n_non_sea' of size 8 at 0x0000037f9490 (mysqld+0x0000037f9490)
      

        Attachments

          Activity

            People

            • Assignee:
              kevg Eugene Kosov
              Reporter:
              kevg Eugene Kosov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: