Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1988

TSAN reports data race in log_manager.cc

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • 2.3.0
    • Core
    • None

    Description

      Steps to reproduce:

      • Compile with TSAN
      • Start MaxScale

      WARNING: ThreadSanitizer: data race (pid=32439)
        Write of size 1 at 0x7b9400000040 by thread T1 (mutexes: write M62):
          #0 simple_mutex_lock /home/markusjm/MaxScale/server/core/skygw_utils.cc:481 (libmaxscale-common.so.1.0.0+0xe9158)
          #1 thr_flush_file /home/markusjm/MaxScale/server/core/log_manager.cc:2306 (libmaxscale-common.so.1.0.0+0x9af8d)
          #2 thr_filewriter_fun /home/markusjm/MaxScale/server/core/log_manager.cc:2461 (libmaxscale-common.so.1.0.0+0x9af8d)
          #3 <null> <null> (libtsan.so.0+0x29d3d)
        Previous write of size 1 at 0x7b9400000040 by main thread:
          #0 simple_mutex_unlock /home/markusjm/MaxScale/server/core/skygw_utils.cc:509 (libmaxscale-common.so.1.0.0+0xe922f)
          #1 blockbuf_get_writepos /home/markusjm/MaxScale/server/core/log_manager.cc:1163 (libmaxscale-common.so.1.0.0+0x9992b)
          #2 logmanager_write_log /home/markusjm/MaxScale/server/core/log_manager.cc:960 (libmaxscale-common.so.1.0.0+0x9992b)
          #3 log_write /home/markusjm/MaxScale/server/core/log_manager.cc:1431 (libmaxscale-common.so.1.0.0+0x9992b)
          #4 mxs_log_message /home/markusjm/MaxScale/server/core/log_manager.cc:3072 (libmaxscale-common.so.1.0.0+0x9992b)
          #5 add_mysql_user /home/markusjm/MaxScale/server/modules/authenticator/MySQLAuth/dbusers.cc:470 (libmysqlauth.so.1.0.0+0x4ce5)
          #6 get_users_from_server(st_mysql*, server_ref_t*, service*, servlistener*) /home/markusjm/MaxScale/server/modules/authenticator/MySQLAuth/dbusers.cc:860 (libmysqlauth.so.1.0.0+0x5e65)
          #7 get_users /home/markusjm/MaxScale/server/modules/authenticator/MySQLAuth/dbusers.cc:971 (libmysqlauth.so.1.0.0+0x6158)
          #8 replace_mysql_users /home/markusjm/MaxScale/server/modules/authenticator/MySQLAuth/dbusers.cc:141 (libmysqlauth.so.1.0.0+0x6158)
          #9 mysql_auth_load_users /home/markusjm/MaxScale/server/modules/authenticator/MySQLAuth/mysql_auth.cc:620 (libmysqlauth.so.1.0.0+0x3766)
          #10 serviceStartPort /home/markusjm/MaxScale/server/core/service.cc:399 (libmaxscale-common.so.1.0.0+0xd93b7)
          #11 serviceStartAllPorts(Service*) /home/markusjm/MaxScale/server/core/service.cc:486 (libmaxscale-common.so.1.0.0+0xd9baf)
          #12 serviceInitialize(Service*) /home/markusjm/MaxScale/server/core/service.cc:544 (libmaxscale-common.so.1.0.0+0xdc487)
          #13 service_launch_all() /home/markusjm/MaxScale/server/core/service.cc:632 (libmaxscale-common.so.1.0.0+0xdc5a1)
          #14 main /home/markusjm/MaxScale/server/core/gateway.cc:2095 (maxscale+0x40714c)
        Location is heap block of size 8320 at 0x7b9400000000 allocated by main thread:
          #0 calloc <null> (libtsan.so.0+0x2b693)
          #1 mxs_calloc /home/markusjm/MaxScale/server/core/alloc.cc:58 (libmaxscale-common.so.1.0.0+0x5e360)
          #2 blockbuf_init /home/markusjm/MaxScale/server/core/log_manager.cc:1372 (libmaxscale-common.so.1.0.0+0x97350)
          #3 blockbuf_get_writepos /home/markusjm/MaxScale/server/core/log_manager.cc:1287 (libmaxscale-common.so.1.0.0+0x99d44)
          #4 logmanager_write_log /home/markusjm/MaxScale/server/core/log_manager.cc:960 (libmaxscale-common.so.1.0.0+0x99d44)
          #5 log_write /home/markusjm/MaxScale/server/core/log_manager.cc:1431 (libmaxscale-common.so.1.0.0+0x99d44)
          #6 mxs_log_message /home/markusjm/MaxScale/server/core/log_manager.cc:3072 (libmaxscale-common.so.1.0.0+0x99d44)
          #7 init_sqlite3 /home/markusjm/MaxScale/server/core/gateway.cc:3216 (maxscale+0x4063eb)
          #8 main /home/markusjm/MaxScale/server/core/gateway.cc:1902 (maxscale+0x4063eb)
        Mutex M62 (0x7b9400000010) created at:
          #0 pthread_mutex_init <null> (libtsan.so.0+0x2ccd1)
          #1 simple_mutex_init /home/markusjm/MaxScale/server/core/skygw_utils.cc:383 (libmaxscale-common.so.1.0.0+0xe8e10)
          #2 blockbuf_init /home/markusjm/MaxScale/server/core/log_manager.cc:1378 (libmaxscale-common.so.1.0.0+0x97368)
          #3 blockbuf_get_writepos /home/markusjm/MaxScale/server/core/log_manager.cc:1287 (libmaxscale-common.so.1.0.0+0x99d44)
          #4 logmanager_write_log /home/markusjm/MaxScale/server/core/log_manager.cc:960 (libmaxscale-common.so.1.0.0+0x99d44)
          #5 log_write /home/markusjm/MaxScale/server/core/log_manager.cc:1431 (libmaxscale-common.so.1.0.0+0x99d44)
          #6 mxs_log_message /home/markusjm/MaxScale/server/core/log_manager.cc:3072 (libmaxscale-common.so.1.0.0+0x99d44)
          #7 init_sqlite3 /home/markusjm/MaxScale/server/core/gateway.cc:3216 (maxscale+0x4063eb)
          #8 main /home/markusjm/MaxScale/server/core/gateway.cc:1902 (maxscale+0x4063eb)
        Thread T1 (tid=32441, running) created by main thread at:
          #0 pthread_create <null> (libtsan.so.0+0x2c3f2)
          #1 skygw_thread_start /home/markusjm/MaxScale/server/core/skygw_utils.cc:228 (libmaxscale-common.so.1.0.0+0xe8cd3)
          #2 logmanager_init_nomutex /home/markusjm/MaxScale/server/core/log_manager.cc:670 (libmaxscale-common.so.1.0.0+0x98a68)
          #3 mxs_log_init /home/markusjm/MaxScale/server/core/log_manager.cc:717 (libmaxscale-common.so.1.0.0+0x9ad8d)
          #4 main /home/markusjm/MaxScale/server/core/gateway.cc:1884 (maxscale+0x406226)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.