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

INSERT ... SELECT on self on a Columnstore_cache table causes the server to crash

    XMLWordPrintable

Details

    Description

      ColumnStore engine commit on develop: 0cd56e7d01ec952fbe05f2c462cc59a80b88a309
      Server commit on 10.5: 5155a300fab85e97217c75e3ba3c3ce78082dd8a

      MariaDB [test]> DROP TABLE IF EXISTS cache1;
      Query OK, 0 rows affected (0.288 sec)
       
      MariaDB [test]> CREATE TABLE cache1 (a int, b varchar(44))engine=columnstore_cache;
      Query OK, 0 rows affected (0.215 sec)
       
      MariaDB [test]> INSERT INTO cache1 SELECT * FROM cache1;
      ERROR 2013 (HY000): Lost connection to MySQL server during query
      MariaDB [test]> 
      

      Here is the mysqld_err.log stack trace:

      2020-06-18 11:20:56 0 [Note] /usr/sbin/mysqld: ready for connections.
      Version: '10.5.4-MariaDB-debug'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Source distribution
      200618 11:21:23 [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.5.4-MariaDB-debug
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=2
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467906 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f2c8c000d78
      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 = 0x7f2cc806cd98 thread_stack 0x49000
      /usr/sbin/mysqld(my_print_stacktrace+0x40)[0x55ac9843934b]
      mysys/stacktrace.c:306(my_print_stacktrace)[0x55ac97af5d27]
      ??:0(__restore_rt)[0x7f2cea372890]
      mysql/ha_mcs.cpp:1293(cache_copy_status(void*, void*))[0x7f2ce62f51cc]
      mysql/ha_mcs.cpp:1294(cache_copy_status(void*, void*))[0x7f2ce62f51ed]
      /usr/sbin/mysqld(thr_multi_lock+0x229)[0x55ac9843ce76]
      mysys/thr_lock.c:1333(thr_multi_lock)[0x55ac97c46cad]
      sql/lock.cc:349(mysql_lock_tables(THD*, st_mysql_lock*, unsigned int))[0x55ac97c46aaf]
      sql/lock.cc:301(mysql_lock_tables(THD*, TABLE**, unsigned int, unsigned int))[0x55ac977029e2]
      sql/sql_base.cc:5449(lock_tables(THD*, TABLE_LIST*, unsigned int, unsigned int))[0x55ac97701f0a]
      sql/sql_base.cc:5169(open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*))[0x55ac976b95d5]
      sql/sql_base.h:509(open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int))[0x55ac977a7078]
      sql/sql_parse.cc:4637(mysql_execute_command(THD*))[0x55ac977b23bd]
      sql/sql_parse.cc:7993(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55ac9779e73a]
      sql/sql_parse.cc:1877(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55ac9779ce71]
      sql/sql_parse.cc:1355(do_command(THD*))[0x55ac97941b60]
      sql/sql_connect.cc:1411(do_handle_one_connection(CONNECT*, bool))[0x55ac979418c9]
      sql/sql_connect.cc:1315(handle_one_connection)[0x55ac97e7d587]
      nptl/pthread_create.c:463(start_thread)[0x7f2cea3676db]
      x86_64/clone.S:97(clone)[0x7f2ce954d88f]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f2c8c012750): INSERT INTO cache1 SELECT * FROM cache1
      Connection ID (thread ID): 4
      Status: NOT_KILLED
      

      Attachments

        Activity

          People

            monty Michael Widenius
            tntnatbry Gagan Goel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.