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

SIGSEGV in read_statistics_for_tables_if_needed

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Duplicate
    • 10.1.24
    • N/A
    • Server
    • None

    Description

      *** buffer overflow detected ***: /usr/sbin/mysqld terminated
      ======= Backtrace: =========
      /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f33712ee7e5]
      /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f337139011c]
      /lib/x86_64-linux-gnu/libc.so.6(+0x117120)[0x7f337138e120]
      /lib/x86_64-linux-gnu/libc.so.6(+0x119067)[0x7f3371390067]
      /usr/sbin/mysqld(my_addr_resolve+0x48)[0x55cbd5e1e998]
      /usr/sbin/mysqld(my_print_stacktrace+0x1e2)[0x55cbd5e088e2]
      /usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x55cbd5953e05]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7f3371cdd390]
      /usr/sbin/mysqld(_Z36read_statistics_for_tables_if_neededP3THDP10TABLE_LIST+0x544)[0x55cbd583f994]
      /usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x9d)[0x55cbd5782c4d]
      /usr/sbin/mysqld(+0x40046d)[0x55cbd57bc46d]
      /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x635c)[0x55cbd57c92cc]
      /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x311)[0x55cbd57cc0d1]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x22e9)[0x55cbd57cf2f9]
      /usr/sbin/mysqld(_Z10do_commandP3THD+0x146)[0x55cbd57cfa36]
      /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55cbd589a722]
      /usr/sbin/mysqld(handle_one_connection+0x40)[0x55cbd589a8c0]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f3371cd36ba]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f337137e3dd]
      

      Attachments

        Issue Links

          Activity

            Another similar

            *** buffer overflow detected ***: /usr/sbin/mysqld terminated
            ======= Backtrace: =========
            /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff81acfc7e5]
            /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7ff81ad9e11c]
            /lib/x86_64-linux-gnu/libc.so.6(+0x117120)[0x7ff81ad9c120]
            /lib/x86_64-linux-gnu/libc.so.6(+0x119067)[0x7ff81ad9e067]
            /usr/sbin/mysqld(my_addr_resolve+0x48)[0x55a24e904998]
            /usr/sbin/mysqld(my_print_stacktrace+0x1e2)[0x55a24e8ee8e2]
            /usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x55a24e439e05]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff81b6eb390]
            /usr/sbin/mysqld(thr_multi_lock+0x54b)[0x55a24e8f186b]
            /usr/sbin/mysqld(_Z17mysql_lock_tablesP3THDP13st_mysql_lockj+0x118)[0x55a24e4f5e48]
            /usr/sbin/mysqld(_Z17mysql_lock_tablesP3THDPP5TABLEjj+0x185)[0x55a24e4f6985]
            /usr/sbin/mysqld(_Z11lock_tablesP3THDP10TABLE_LISTjj+0x1e8)[0x55a24e265f98]
            /usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x8a)[0x55a24e268c3a]
            /usr/sbin/mysqld(+0x40046d)[0x55a24e2a246d]
            /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x635c)[0x55a24e2af2cc]
            /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x311)[0x55a24e2b20d1]
            /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x22e9)[0x55a24e2b52f9]
            /usr/sbin/mysqld(_Z10do_commandP3THD+0x146)[0x55a24e2b5a36]
            /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55a24e380722]
            /usr/sbin/mysqld(handle_one_connection+0x40)[0x55a24e3808c0]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7ff81b6e16ba]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff81ad8c3dd]
            

            jplindst Jan Lindström (Inactive) added a comment - Another similar *** buffer overflow detected ***: /usr/sbin/mysqld terminated ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff81acfc7e5] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7ff81ad9e11c] /lib/x86_64-linux-gnu/libc.so.6(+0x117120)[0x7ff81ad9c120] /lib/x86_64-linux-gnu/libc.so.6(+0x119067)[0x7ff81ad9e067] /usr/sbin/mysqld(my_addr_resolve+0x48)[0x55a24e904998] /usr/sbin/mysqld(my_print_stacktrace+0x1e2)[0x55a24e8ee8e2] /usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x55a24e439e05] /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff81b6eb390] /usr/sbin/mysqld(thr_multi_lock+0x54b)[0x55a24e8f186b] /usr/sbin/mysqld(_Z17mysql_lock_tablesP3THDP13st_mysql_lockj+0x118)[0x55a24e4f5e48] /usr/sbin/mysqld(_Z17mysql_lock_tablesP3THDPP5TABLEjj+0x185)[0x55a24e4f6985] /usr/sbin/mysqld(_Z11lock_tablesP3THDP10TABLE_LISTjj+0x1e8)[0x55a24e265f98] /usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x8a)[0x55a24e268c3a] /usr/sbin/mysqld(+0x40046d)[0x55a24e2a246d] /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x635c)[0x55a24e2af2cc] /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x311)[0x55a24e2b20d1] /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x22e9)[0x55a24e2b52f9] /usr/sbin/mysqld(_Z10do_commandP3THD+0x146)[0x55a24e2b5a36] /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55a24e380722] /usr/sbin/mysqld(handle_one_connection+0x40)[0x55a24e3808c0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7ff81b6e16ba] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7ff81ad8c3dd]

            It appears that I got something similar to the first stack trace in MDEV-16068 (not yet reproducible). The second one is too non-specific, can be anything.

            elenst Elena Stepanova added a comment - It appears that I got something similar to the first stack trace in MDEV-16068 (not yet reproducible). The second one is too non-specific, can be anything.

            MDEV-16552 looks very similar, except that MDEV-16552 is a fairly recent regression, while this failure was happening much earlier.

            elenst Elena Stepanova added a comment - MDEV-16552 looks very similar, except that MDEV-16552 is a fairly recent regression, while this failure was happening much earlier.

            In the absence of any information about this issue that we could build upon, I suggest to consider it being a duplicate of MDEV-16711, until proven otherwise. The test case from MDEV-16711 causes a crash on 10.1.24 running with the config file used when the initial problem here was reported (setting use_stat_tables = PREFERABLY is not necessary, since the config already had COMPLEMENTARY, and that's enough), and produces a similar stack trace, apart from an extra frame which I'm getting on the top:

            10.1.24 xenial release

            Version: '10.1.24-MariaDB-1~xenial'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
            180711 11:49:36 [ERROR] mysqld got signal 11 ;
            This could be because you hit a bug. It is also possible that this binary
            or one of the libraries it was linked against is corrupt, improperly built,
            or misconfigured. This error can also be caused by malfunctioning hardware.
             
            To report this bug, see https://mariadb.com/kb/en/reporting-bugs
             
            We will try our best to scrape up some info that will hopefully help
            diagnose the problem, but since we have already crashed, 
            something is definitely wrong and this may fail.
             
            Server version: 10.1.24-MariaDB-1~xenial
            key_buffer_size=1073741824
            read_buffer_size=262144
            max_used_connections=1
            max_threads=361
            thread_count=1
            It is possible that mysqld could use up to 
            key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1240810 K  bytes of memory
            Hope that's ok; if not, decrease some variables in the equation.
             
            Thread pointer: 0x7f1f27f46008
            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 = 0x7f1fc0cc30b8 thread_stack 0x48400
            /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55bd5b1ec72e]
            /usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x55bd5ad37e05]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0)[0x7f1fc24813d0]
            /usr/sbin/mysqld(_ZN10Field_blob5storeEPKcjPK15charset_info_st+0x84)[0x55bd5ad2df84]
            /usr/sbin/mysqld(_Z36read_statistics_for_tables_if_neededP3THDP10TABLE_LIST+0xd7c)[0x55bd5ac241cc]
            /usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x9d)[0x55bd5ab66c4d]
            /usr/sbin/mysqld(+0x40046d)[0x55bd5aba046d]
            /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x635c)[0x55bd5abad2cc]
            /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x311)[0x55bd5abb00d1]
            /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x22e9)[0x55bd5abb32f9]
            /usr/sbin/mysqld(_Z10do_commandP3THD+0x146)[0x55bd5abb3a36]
            /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55bd5ac7e722]
            /usr/sbin/mysqld(handle_one_connection+0x40)[0x55bd5ac7e8c0]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f1fc24776fa]
            /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f1fc1b22b5d]
            

            The extra frame in itself, however, is not a reliable indication of a true difference, as our stack traces on Ubuntu release builds are the matter of luck.

            elenst Elena Stepanova added a comment - In the absence of any information about this issue that we could build upon, I suggest to consider it being a duplicate of MDEV-16711 , until proven otherwise. The test case from MDEV-16711 causes a crash on 10.1.24 running with the config file used when the initial problem here was reported (setting use_stat_tables = PREFERABLY is not necessary, since the config already had COMPLEMENTARY , and that's enough), and produces a similar stack trace, apart from an extra frame which I'm getting on the top: 10.1.24 xenial release Version: '10.1.24-MariaDB-1~xenial' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution 180711 11:49:36 [ERROR] mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware.   To report this bug, see https://mariadb.com/kb/en/reporting-bugs   We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.   Server version: 10.1.24-MariaDB-1~xenial key_buffer_size=1073741824 read_buffer_size=262144 max_used_connections=1 max_threads=361 thread_count=1 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 1240810 K bytes of memory Hope that's ok; if not, decrease some variables in the equation.   Thread pointer: 0x7f1f27f46008 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 = 0x7f1fc0cc30b8 thread_stack 0x48400 /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55bd5b1ec72e] /usr/sbin/mysqld(handle_fatal_signal+0x2f5)[0x55bd5ad37e05] /lib/x86_64-linux-gnu/libpthread.so.0(+0x113d0)[0x7f1fc24813d0] /usr/sbin/mysqld(_ZN10Field_blob5storeEPKcjPK15charset_info_st+0x84)[0x55bd5ad2df84] /usr/sbin/mysqld(_Z36read_statistics_for_tables_if_neededP3THDP10TABLE_LIST+0xd7c)[0x55bd5ac241cc] /usr/sbin/mysqld(_Z20open_and_lock_tablesP3THDRK14DDL_options_stP10TABLE_LISTbjP19Prelocking_strategy+0x9d)[0x55bd5ab66c4d] /usr/sbin/mysqld(+0x40046d)[0x55bd5aba046d] /usr/sbin/mysqld(_Z21mysql_execute_commandP3THD+0x635c)[0x55bd5abad2cc] /usr/sbin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_state+0x311)[0x55bd5abb00d1] /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0x22e9)[0x55bd5abb32f9] /usr/sbin/mysqld(_Z10do_commandP3THD+0x146)[0x55bd5abb3a36] /usr/sbin/mysqld(_Z24do_handle_one_connectionP3THD+0x182)[0x55bd5ac7e722] /usr/sbin/mysqld(handle_one_connection+0x40)[0x55bd5ac7e8c0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76fa)[0x7f1fc24776fa] /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f1fc1b22b5d] The extra frame in itself, however, is not a reliable indication of a true difference, as our stack traces on Ubuntu release builds are the matter of luck.

            People

              Unassigned Unassigned
              jplindst Jan Lindström (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              6 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.