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

MariaRocks: rocksdb.collation crashes because of gcc bug.

Details

    Description

      This is not the same issue as MDEV-12280.

      It crashes like this:
      http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-amd64/builds/672/steps/test/logs/stdio

      rocksdb.collation                        w3 [ fail ]
              Test ended at 2017-04-03 08:21:53
       
      CURRENT_TEST: rocksdb.collation
      mysqltest: At line 82: query 'SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"' failed: 2013: Lost connection to MySQL server during query
      

      ...

       
      Thread pointer: 0x7f10c80009a8
      Attempting backtrace. You can use the following information to find out
      where mysqld died. If you see no messages after this, something went
      terribly wrong...
      stack_bottom = 0x7f10e8322e40 thread_stack 0x49000
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(my_print_stacktrace+0x2e)[0x7f10ef6e188e]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_fatal_signal+0x30d)[0x7f10ef1312dd]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f10ee062330]
      /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEE14_M_disjunctionEv+0x213)[0x7f10e3affb63]
      /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEC2ERKS5_SA_RS7_j+0x2a2)[0x7f10e3afff92]
      /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9__compileIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEESt10shared_ptrINS_10_AutomatonEERKT_SD_RT0_j+0x31)[0x7f10e3b00511]
      /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZN18Regex_list_handler12set_patternsERKSs+0x13f)[0x7f10e3af922f]
      /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(+0x18b415)[0x7f10e3b03415]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN17sys_var_pluginvar13global_updateEP3THDP7set_var+0x3e)[0x7f10eefb985e]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7sys_var6updateEP3THDP7set_var+0x65)[0x7f10eef2c5b5]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7set_var6updateEP3THD+0x17)[0x7f10eef2ca97]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z17sql_set_variablesP3THDP4ListI12set_var_baseEb+0x89)[0x7f10eef2db39]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z21mysql_execute_commandP3THD+0x609d)[0x7f10eefad01d]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2bd)[0x7f10eefb009d]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x21c0)[0x7f10eefb30d0]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z10do_commandP3THD+0x161)[0x7f10eefb3a11]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x7f10ef0744aa]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_one_connection+0x3d)[0x7f10ef0745cd]
      /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(+0x80cdcd)[0x7f10ef2e0dcd]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f10ee05a182]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f10ed576b2d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f10c800ef90): SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"
      Connection ID (thread ID): 4
      

      This is because of GCC.
      The upstream solves it as follows: collation.test has --source include/have_fullregex.inc
      which has this contents:

      # Skip test if we didn't compile with a compiler that supports full regex
      # Currently only gcc is tested (gcc 4.9 is the first version to support full
      # regex).  All other compilers are assumed to support it.
      # Add further checks as we get information on these compilers
       
      --disable_query_log
      set @comp_version = @@version_compile_compiler_major * 100 +
                          @@version_compile_compiler_minor;
      set @is_gnu = STRCMP(@@version_compile_compiler, "GNU") = 0;
      --enable_query_log
      if (`SELECT IF (@is_gnu, IF (@comp_version > 408, 1, 0), 1) = 0`)
      {
        --skip Test requires full regex (not supported in gcc 4.8 and prior)
      }
      

      • MariaDB doesn't have @@version_compile_XXX variables, so we can't re-use this approach directly.
      • We can disable MyRocks on gcc-4.8, but this seems like an overkill.
      • Or we could disable the query.

      Not sure which one is better.

      Attachments

        Issue Links

          Activity

            psergei Sergei Petrunia created issue -
            psergei Sergei Petrunia made changes -
            Field Original Value New Value
            psergei Sergei Petrunia made changes -
            Description This is not the same issue as MDEV-12280.

            It crashes like this:
            http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-amd64/builds/672/steps/test/logs/stdio

            {noformat}
            rocksdb.collation w3 [ fail ]
                    Test ended at 2017-04-03 08:21:53

            CURRENT_TEST: rocksdb.collation
            mysqltest: At line 82: query 'SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"' failed: 2013: Lost connection to MySQL server during query
            {noformat}
            ...
            {noformat}

            Thread pointer: 0x7f10c80009a8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f10e8322e40 thread_stack 0x49000
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(my_print_stacktrace+0x2e)[0x7f10ef6e188e]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_fatal_signal+0x30d)[0x7f10ef1312dd]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f10ee062330]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEE14_M_disjunctionEv+0x213)[0x7f10e3affb63]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEC2ERKS5_SA_RS7_j+0x2a2)[0x7f10e3afff92]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9__compileIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEESt10shared_ptrINS_10_AutomatonEERKT_SD_RT0_j+0x31)[0x7f10e3b00511]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZN18Regex_list_handler12set_patternsERKSs+0x13f)[0x7f10e3af922f]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(+0x18b415)[0x7f10e3b03415]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN17sys_var_pluginvar13global_updateEP3THDP7set_var+0x3e)[0x7f10eefb985e]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7sys_var6updateEP3THDP7set_var+0x65)[0x7f10eef2c5b5]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7set_var6updateEP3THD+0x17)[0x7f10eef2ca97]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z17sql_set_variablesP3THDP4ListI12set_var_baseEb+0x89)[0x7f10eef2db39]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z21mysql_execute_commandP3THD+0x609d)[0x7f10eefad01d]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2bd)[0x7f10eefb009d]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x21c0)[0x7f10eefb30d0]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z10do_commandP3THD+0x161)[0x7f10eefb3a11]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x7f10ef0744aa]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_one_connection+0x3d)[0x7f10ef0745cd]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(+0x80cdcd)[0x7f10ef2e0dcd]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f10ee05a182]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f10ed576b2d]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f10c800ef90): SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"
            Connection ID (thread ID): 4
            {noformat}

            This is because of GCC.
            The upstream solves it as follows: collation.test has {{--source include/have_fullregex.inc}}
            which has this contents:
            {noformat}
            # Skip test if we didn't compile with a compiler that supports full regex
            # Currently only gcc is tested (gcc 4.9 is the first version to support full
            # regex). All other compilers are assumed to support it.
            # Add further checks as we get information on these compilers

            --disable_query_log
            set @comp_version = @@version_compile_compiler_major * 100 +
                                @@version_compile_compiler_minor;
            set @is_gnu = STRCMP(@@version_compile_compiler, "GNU") = 0;
            --enable_query_log
            if (`SELECT IF (@is_gnu, IF (@comp_version > 408, 1, 0), 1) = 0`)
            {
              --skip Test requires full regex (not supported in gcc 4.8 and prior)
            }
            {noformat}

            * MariaDB doesn't have @@version_compiler variables, so we can't re-use this approach directly.
            * We can disable MyRocks on gcc-4.8, but this seems like an overkill.
            * Or we could disable the query.

            Not sure which one is better.
            This is not the same issue as MDEV-12280.

            It crashes like this:
            http://buildbot.askmonty.org/buildbot/builders/kvm-bintar-trusty-amd64/builds/672/steps/test/logs/stdio

            {noformat}
            rocksdb.collation w3 [ fail ]
                    Test ended at 2017-04-03 08:21:53

            CURRENT_TEST: rocksdb.collation
            mysqltest: At line 82: query 'SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"' failed: 2013: Lost connection to MySQL server during query
            {noformat}
            ...
            {noformat}

            Thread pointer: 0x7f10c80009a8
            Attempting backtrace. You can use the following information to find out
            where mysqld died. If you see no messages after this, something went
            terribly wrong...
            stack_bottom = 0x7f10e8322e40 thread_stack 0x49000
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(my_print_stacktrace+0x2e)[0x7f10ef6e188e]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_fatal_signal+0x30d)[0x7f10ef1312dd]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330)[0x7f10ee062330]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEE14_M_disjunctionEv+0x213)[0x7f10e3affb63]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9_CompilerIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEC2ERKS5_SA_RS7_j+0x2a2)[0x7f10e3afff92]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZNSt8__detail9__compileIN9__gnu_cxx17__normal_iteratorIPKcSsEESt12regex_traitsIcEEESt10shared_ptrINS_10_AutomatonEERKT_SD_RT0_j+0x31)[0x7f10e3b00511]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(_ZN18Regex_list_handler12set_patternsERKSs+0x13f)[0x7f10e3af922f]
            /usr/local/mariadb-10.2.5-linux-x86_64/lib/plugin/ha_rocksdb.so(+0x18b415)[0x7f10e3b03415]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN17sys_var_pluginvar13global_updateEP3THDP7set_var+0x3e)[0x7f10eefb985e]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7sys_var6updateEP3THDP7set_var+0x65)[0x7f10eef2c5b5]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_ZN7set_var6updateEP3THD+0x17)[0x7f10eef2ca97]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z17sql_set_variablesP3THDP4ListI12set_var_baseEb+0x89)[0x7f10eef2db39]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z21mysql_execute_commandP3THD+0x609d)[0x7f10eefad01d]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2bd)[0x7f10eefb009d]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x21c0)[0x7f10eefb30d0]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z10do_commandP3THD+0x161)[0x7f10eefb3a11]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x1aa)[0x7f10ef0744aa]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(handle_one_connection+0x3d)[0x7f10ef0745cd]
            /usr/local/mariadb-10.2.5-linux-x86_64/bin/mysqld(+0x80cdcd)[0x7f10ef2e0dcd]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x8182)[0x7f10ee05a182]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f10ed576b2d]

            Trying to get some variables.
            Some pointers may be invalid and cause the dump to abort.
            Query (0x7f10c800ef90): SET GLOBAL rocksdb_strict_collation_exceptions=",s.*,t.*"
            Connection ID (thread ID): 4
            {noformat}

            This is because of GCC.
            The upstream solves it as follows: collation.test has {{--source include/have_fullregex.inc}}
            which has this contents:
            {noformat}
            # Skip test if we didn't compile with a compiler that supports full regex
            # Currently only gcc is tested (gcc 4.9 is the first version to support full
            # regex). All other compilers are assumed to support it.
            # Add further checks as we get information on these compilers

            --disable_query_log
            set @comp_version = @@version_compile_compiler_major * 100 +
                                @@version_compile_compiler_minor;
            set @is_gnu = STRCMP(@@version_compile_compiler, "GNU") = 0;
            --enable_query_log
            if (`SELECT IF (@is_gnu, IF (@comp_version > 408, 1, 0), 1) = 0`)
            {
              --skip Test requires full regex (not supported in gcc 4.8 and prior)
            }
            {noformat}

            * MariaDB doesn't have @@version_compile_XXX variables, so we can't re-use this approach directly.
            * We can disable MyRocks on gcc-4.8, but this seems like an overkill.
            * Or we could disable the query.

            Not sure which one is better.

            This is not about just one query. First 80 lines of the test pass, but the rest 110 lines are all crashes or failures.

            psergei Sergei Petrunia added a comment - This is not about just one query. First 80 lines of the test pass, but the rest 110 lines are all crashes or failures.

            FWIW in Percona Server we migrated from std::regex to my_regex because of GCC 4.8. I can dig up the commits if you wish

            laurynas Laurynas Biveinis added a comment - FWIW in Percona Server we migrated from std::regex to my_regex because of GCC 4.8. I can dig up the commits if you wish
            elenst Elena Stepanova made changes -
            Affects Version/s 10.2 [ 14601 ]
            elenst Elena Stepanova made changes -
            Assignee Sergei Petrunia [ psergey ]
            elenst Elena Stepanova made changes -
            Component/s Storage Engine - RocksDB [ 13901 ]
            Component/s Tests [ 10800 ]
            elenst Elena Stepanova made changes -
            Fix Version/s 10.2 [ 14601 ]

            At the moment the test is disabled for all platforms.

            psergei Sergei Petrunia added a comment - At the moment the test is disabled for all platforms.
            psergei Sergei Petrunia made changes -
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.2 [ 14601 ]
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Rank Ranked higher
            sergei.krivonos Sergei Krivonos (Inactive) made changes -
            Rank Ranked higher
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 80226 ] MariaDB v4 [ 140271 ]

            People

              psergei Sergei Petrunia
              psergei Sergei Petrunia
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

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