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

show tables fails when selecting the information_schema database

Details

    Description

      I've recently upgraded from 10.2.24 -> 10.3.15 on
      Linux 0 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
      Debian 9.9

      MariaDB [core]> select version();
      +---------------------------------------------+
      | version()                                   |
      +---------------------------------------------+
      | 10.3.15-MariaDB-1:10.3.15+maria~stretch-log |
      +---------------------------------------------+
      

      When trying to:
      ```
      > use information_schema;
      > show tables;
      ```
      I get
      ```

      MariaDB [information_schema]> show tables;
      ERROR 2006 (HY000): MySQL server has gone away
      No connection. Trying to reconnect...
      ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)
      ERROR: Can't connect to the server
      

      ```
      and the following error.log entries:
      ```

      190516  5:15:19 [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.3.15-MariaDB-1:10.3.15+maria~stretch-log
      key_buffer_size=33554432
      read_buffer_size=131072
      max_used_connections=1
      max_threads=65537
      thread_count=12
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 75756414 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7fa440000a88
      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 = 0x7fa4b67fbc48 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55b751c568de]
      /usr/sbin/mysqld(handle_fatal_signal+0x3af)[0x55b75170535f]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7fac7699e0e0]
      /usr/sbin/mysqld(+0xce1695)[0x55b751c96695]
      /usr/sbin/mysqld(_Z17find_schema_tableP3THDPK25st_mysql_const_lex_stringPb+0x55)[0x55b7515940d5]
      /usr/sbin/mysqld(_Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjPP19Sroutine_hash_entryjP19Prelocking_strategy+0xd9e)[0x55b7514ccbde]
      /usr/sbin/mysqld(_Z30open_normal_and_derived_tablesP3THDP10TABLE_LISTjj+0x5a)[0x55b7514cd5da]
      /usr/sbin/mysqld(_Z18mysqld_list_fieldsP3THDP10TABLE_LISTPKc+0x35)[0x55b751587225]
      /usr/sbin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x234c)[0x55b75152f64c]
      /usr/sbin/mysqld(_Z10do_commandP3THD+0x131)[0x55b75152fbc1]
      /usr/sbin/mysqld(_Z11tp_callbackP13TP_connection+0x11f)[0x55b75163f73f]
      /usr/sbin/mysqld(+0x724a10)[0x55b7516d9a10]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x74a4)[0x7fac769944a4]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fac750f3d0f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7fa44000f650): 
      Connection ID (thread ID): 13
      Status: NOT_KILLED
       
      Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on
       
      The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
      information that should help you find out what is causing the crash.
      Writing a core file...
      Working directory at /home/services/mariadb/data
      Resource Limits:
      Limit                     Soft Limit           Hard Limit           Units     
      Max cpu time              unlimited            unlimited            seconds   
      Max file size             unlimited            unlimited            bytes     
      Max data size             unlimited            unlimited            bytes     
      Max stack size            8388608              unlimited            bytes     
      Max core file size        0                    unlimited            bytes     
      Max resident set          unlimited            unlimited            bytes     
      Max processes             122577               122577               processes 
      Max open files            65535                65535                files     
      Max locked memory         65536                65536                bytes     
      Max address space         unlimited            unlimited            bytes     
      Max file locks            unlimited            unlimited            locks     
      Max pending signals       122577               122577               signals   
      Max msgqueue size         819200               819200               bytes     
      Max nice priority         0                    0                    
      Max realtime priority     0                    0                    
      Max realtime timeout      unlimited            unlimited            us        
      Core pattern: core
      ```
       
      
      

      Attachments

        Issue Links

          Activity

            alice Alice Sherepa added a comment -

            Reproducible on debug and non-debug version, 10.2-10.4

            MariaDB [test]> use information_schema;
            Reading table information for completion of table and column names
            You can turn off this feature to get a quicker startup with -A
             
            Database changed
            MariaDB [information_schema]> select 1;
            ERROR 2006 (HY000): MySQL server has gone away
            

            10.2 796486d19b7eede585666

            190516 14:31:19 [ERROR] mysqld got signal 11 ;
             
            strings/ctype-utf8.c:5300(my_strcasecmp_utf8)[0x557a46d4cb9c]
            sql/sql_show.cc:7708(find_schema_table(THD*, char const*, bool*))[0x557a463d7b68]
            sql/sql_show.h:123(find_schema_table(THD*, char const*))[0x557a462b5a2f]
            sql/sql_base.cc:3402(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x557a462bba9f]
            sql/sql_base.cc:4054(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, Sroutine_hash_entry**, unsigned int, Prelocking_strategy*))[0x557a462bd075]
            sql/sql_base.h:251(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x557a462b5967]
            sql/sql_base.h:260(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x557a462b59b8]
            sql/sql_base.cc:4873(open_normal_and_derived_tables(THD*, TABLE_LIST*, unsigned int, unsigned int))[0x557a462bea55]
            sql/sql_show.cc:1529(mysqld_list_fields(THD*, TABLE_LIST*, char const*))[0x557a463bf5cf]
            sql/sql_parse.cc:2028(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x557a46328495]
            sql/sql_parse.cc:1387(do_command(THD*))[0x557a463263b5]
            sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x557a4647a120]
            sql/sql_connect.cc:1242(handle_one_connection)[0x557a46479ea0]
            /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f9057d256ba]
            x86_64/clone.S:111(clone)[0x7f90571ba41d]
            
            

            alice Alice Sherepa added a comment - Reproducible on debug and non-debug version, 10.2-10.4 MariaDB [test]> use information_schema; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A   Database changed MariaDB [information_schema]> select 1; ERROR 2006 (HY000): MySQL server has gone away 10.2 796486d19b7eede585666 190516 14:31:19 [ERROR] mysqld got signal 11 ;   strings/ctype-utf8.c:5300(my_strcasecmp_utf8)[0x557a46d4cb9c] sql/sql_show.cc:7708(find_schema_table(THD*, char const*, bool*))[0x557a463d7b68] sql/sql_show.h:123(find_schema_table(THD*, char const*))[0x557a462b5a2f] sql/sql_base.cc:3402(open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*))[0x557a462bba9f] sql/sql_base.cc:4054(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, Sroutine_hash_entry**, unsigned int, Prelocking_strategy*))[0x557a462bd075] sql/sql_base.h:251(open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x557a462b5967] sql/sql_base.h:260(open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*))[0x557a462b59b8] sql/sql_base.cc:4873(open_normal_and_derived_tables(THD*, TABLE_LIST*, unsigned int, unsigned int))[0x557a462bea55] sql/sql_show.cc:1529(mysqld_list_fields(THD*, TABLE_LIST*, char const*))[0x557a463bf5cf] sql/sql_parse.cc:2028(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x557a46328495] sql/sql_parse.cc:1387(do_command(THD*))[0x557a463263b5] sql/sql_connect.cc:1335(do_handle_one_connection(CONNECT*))[0x557a4647a120] sql/sql_connect.cc:1242(handle_one_connection)[0x557a46479ea0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f9057d256ba] x86_64/clone.S:111(clone)[0x7f90571ba41d]
            hholzgra Hartmut Holzgraefe added a comment - - edited

            "Fun" part:

            • crashes when run interactively
            • not crashing if starting mysql client with "-A" option
            • not crashing when running directly from command line

              mysql information_schema -e 'SHOW TABLES'

            • not crashing when run interactively on Windows
            hholzgra Hartmut Holzgraefe added a comment - - edited "Fun" part: crashes when run interactively not crashing if starting mysql client with "-A" option not crashing when running directly from command line mysql information_schema -e 'SHOW TABLES' not crashing when run interactively on Windows

            The bug was that when using mysql_list_fields, then table_list->schema_table_name was not
            filled in.
            Fixed by using table_list->schema_table instead, which is always filled in.

            monty Michael Widenius added a comment - The bug was that when using mysql_list_fields, then table_list->schema_table_name was not filled in. Fixed by using table_list->schema_table instead, which is always filled in.

            Version 10.3.15 on RHEL 7.6 64bit also affected.

            yarjoooz Jaroslaw Jozwik added a comment - Version 10.3.15 on RHEL 7.6 64bit also affected.

            Version 10.3.15 on Debian 10 affected too (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931801)

            faust Faustin Lammler added a comment - Version 10.3.15 on Debian 10 affected too ( https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931801 )

            People

              monty Michael Widenius
              danielgavrila Daniel Gavrila
              Votes:
              1 Vote for this issue
              Watchers:
              12 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.