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

MariaDB server crash in Create_tmp_table::finalize

    XMLWordPrintable

Details

    Description

      PoC:

      CREATE TABLE v0 ( v2 DATE DEFAULT ( v1 MOD 68321183.000000 ) , v1 DATETIME NULL ) ;
       SHOW DATABASES LIKE 'x' ;
       SELECT DISTINCT v2 , v1 , DEFAULT ( v2 ) FROM v0 ;
      

      Crash Log:

      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.7.0-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=1
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467956 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x62b0000bd218
      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 = 0x7fbccf9b6850 thread_stack 0x5fc00
      sanitizer_common/sanitizer_common_interceptors.inc:4203(__interceptor_backtrace.part.0)[0x7fbcf53e9c3e]
      mysys/stacktrace.c:213(my_print_stacktrace)[0x55da8b1e8747]
      sql/signal_handler.cc:222(handle_fatal_signal)[0x55da8a1b0120]
      sigaction.c:0(__restore_rt)[0x7fbcf4dd3870]
      sql/sql_select.cc:19307(Create_tmp_table::finalize(THD*, TABLE*, TMP_TABLE_PARAM*, bool, bool))[0x55da89b716a6]
      sql/sql_select.cc:19606(create_tmp_table(THD*, TMP_TABLE_PARAM*, List<Item>&, st_order*, bool, bool, unsigned long long, unsigned long long, st_mysql_const_lex_string const*, bool, bool))[0x55da89b736a4]
      sql/sql_select.cc:4015(JOIN::create_postjoin_aggr_table(st_join_table*, List<Item>*, st_order*, bool, bool, bool))[0x55da89ba26b3]
      sql/sql_select.cc:3589(JOIN::make_aggr_tables_info())[0x55da89ba5424]
      sql/sql_select.cc:3225(JOIN::optimize_stage2())[0x55da89bd5e72]
      sql/sql_select.cc:2479(JOIN::optimize_inner())[0x55da89bdfd07]
      sql/sql_select.cc:1811(JOIN::optimize())[0x55da89be17b1]
      sql/sql_select.cc:4977(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55da89be1a0e]
      sql/sql_select.cc:545(handle_select(THD*, LEX*, select_result*, unsigned long))[0x55da89be3655]
      sql/sql_parse.cc:6256(execute_sqlcom_select(THD*, TABLE_LIST*))[0x55da89a26d7d]
      sql/sql_parse.cc:3946(mysql_execute_command(THD*, bool))[0x55da89a50421]
      sql/sql_parse.cc:8047(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x55da89a555a1]
      sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x55da89a5b60c]
      sql/sql_parse.cc:1406(do_command(THD*, bool))[0x55da89a6073d]
      sql/sql_connect.cc:1418(do_handle_one_connection(CONNECT*, bool))[0x55da89e1be57]
      sql/sql_connect.cc:1312(handle_one_connection)[0x55da89e1c33d]
      perfschema/pfs.cc:2204(pfs_spawn_thread)[0x55da8a8acc2c]
      pthread_create.c:0(start_thread)[0x7fbcf4dc9259]
      :0(__GI___clone)[0x7fbcf49745e3]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x629000087238): SELECT DISTINCT v2 , v1 , DEFAULT ( v2 ) FROM v0
       
      Connection ID (thread ID): 4
      Status: NOT_KILLED
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              yaoguang yaoguang
              Votes:
              0 Vote for this issue
              Watchers:
              5 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.