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

Join using subselects with in clause containing data element crashes with signal 6

    XMLWordPrintable

Details

    Description

      Server crashes with signal 6 every time when a specific set of queries is run:

      use test;
       
      DROP TABLE IF EXISTS SomeTable;
      CREATE TABLE `SomeTable` (
      	`Id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
      	INDEX `Index 1` (`Id`)
      )
      ENGINE=InnoDB;
       
      INSERT INTO `SomeTable` (`Id`) VALUES (1);
       
      SET @id = 1;
      SELECT S.Id FROM (
      		SELECT m.Id FROM SomeTable m
      	WHERE @id IN (0, m.Id)
      	GROUP BY m.Id -- CRASH !!!!
      ) AS M
      INNER JOIN (
      	SELECT s.Id FROM SomeTable s
      	WHERE @id IN (0, s.Id) -- CRASH !!!!
      ) AS S
      ON S.Id = M.Id;
      

      Statement crashes every time regardless of the value of @id, so long as there is a static value and a data element included in the in clause, and the table is not empty.

      Notes:

      • happens only on CentOS and RedHat - not on Debian / Ubuntu
      • happens with default and customized configurations
      • does not happen in any tested 10.1 or 10.3 version of the server, or any other tested 10.2 release; only 10.2.15
      • appens with InnoDB or Aria storage engines.
      • only happens with data in the table.
      • happens whether primary key is defined or not.

      Version: '10.2.15-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MariaDB Server
      pure virtual method called
      terminate called without an active exception
      180618 23:10:46 [ERROR] mysqld got signal 6 ;
      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.2.15-MariaDB
      key_buffer_size=134217728
      read_buffer_size=131072
      max_used_connections=1
      max_threads=153
      thread_count=7
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 467238 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x55b18989bb78
      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 = 0x7ff7019c4d70 thread_stack 0x49000
      mysys/stacktrace.c:268(my_print_stacktrace)[0x55b18691ff9e]
      sql/signal_handler.cc:168(handle_fatal_signal)[0x55b1863aba05]
      sigaction.c:0(__restore_rt)[0x7ff7194d05e0]
      :0(__GI_raise)[0x7ff7179dd1f7]
      :0(__GI_abort)[0x7ff7179de8e8]
      /lib64/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x165)[0x7ff7180cdac5]
      /lib64/libstdc++.so.6(+0x5ea36)[0x7ff7180cba36]
      /lib64/libstdc++.so.6(+0x5ea63)[0x7ff7180cba63]
      /lib64/libstdc++.so.6(+0x5f5cf)[0x7ff7180cc5cf]
      sql/item_cmpfunc.cc:4405(Item_func_in::val_int())[0x55b1863eb587]
      

      Attachments

        Activity

          People

            shagalla Galina Shalygina (Inactive)
            juan.vera Juan
            Votes:
            0 Vote for this issue
            Watchers:
            7 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.