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

Item_subselect::cleanup double free or corruption

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.2.12, 10.2(EOL)
    • 10.2.15, 10.3.7
    • Server
    • docker mariadb:latest

    Description

      docker run -it --name ma10 -e MYSQL_ALLOW_EMPTY_PASSWORD=1 mariadb:latest
      docker cp error.sql ma10:/root/
      run commands inside docker exec -it ma10 bash

      create database test;
      CREATE TABLE `t` (
        `c1` bigint(20) NOT NULL AUTO_INCREMENT,
        `c2` bigint(20) DEFAULT NULL,
        `c3` varchar(256) NOT NULL,
        `c4` bigint(20) DEFAULT NULL,
        `c5` datetime DEFAULT NULL,
        PRIMARY KEY (`c1`)
      ) ENGINE=InnoDB
       
      insert t values(1,1,'aaa',NULL,NOW()),(2,1,'aaa',NULL,NOW()),(3,1,'aaa',NULL,NOW()),(4,1,'aaa',NULL,NOW()),(5,1,'aaa',NULL,NOW()),(6,1,'aaa',NULL,NOW()),(7,1,'aaa',NULL,NOW()),(8,1,'aaa',NULL,NOW()),(9,1,'aaa',NULL,NOW()),(10,1,'aaa',NULL,NOW());
      insert into t (c2,c3,c5) select t1.c2,t1.c3,t1.c5 from t t1, t t2, t t3, t t4, t t5;
      update t set c2=c1, c4=c1;
      

      mysql test < /root/error.sql
      ERROR 2013 (HY000) at line 1: Lost connection to MySQL server during query
      

      On server error log (in docker run console):

      Version: '10.2.12-MariaDB'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  MariaDB Server
      *** Error in `bin/mysqld': double free or corruption (!prev): 0x00007f28a19e0aa0 ***
      180125 11:15:43 [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.12-MariaDB
      key_buffer_size=134217728
      read_buffer_size=2097152
      max_used_connections=1
      max_threads=102
      thread_count=7
      It is possible that mysqld could use up to 
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 759915 K  bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
       
      Thread pointer: 0x7f28a00009a8
      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 = 0x7f2920164ec8 thread_stack 0x49000
      bin/mysqld(my_print_stacktrace+0x2e)[0xde610e]
      bin/mysqld(handle_fatal_signal+0x471)[0x7de601]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0xf890)[0x7f2928852890]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37)[0x7f292767c067]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x148)[0x7f292767d448]
      /lib/x86_64-linux-gnu/libc.so.6(+0x731b4)[0x7f29276ba1b4]
      /lib/x86_64-linux-gnu/libc.so.6(+0x7898e)[0x7f29276bf98e]
      /lib/x86_64-linux-gnu/libc.so.6(+0x79696)[0x7f29276c0696]
      bin/mysqld(_ZN14Item_subselect7cleanupEv+0x7c)[0x8c09bc]
      bin/mysqld(_ZN3THD19cleanup_after_queryEv+0x140)[0x5ae170]
      bin/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x21d)[0x5f40ed]
      bin/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcjbb+0x26f0)[0x5f7190]
      bin/mysqld(_Z10do_commandP3THD+0x15d)[0x5f84cd]
      bin/mysqld(_Z24do_handle_one_connectionP7CONNECT+0x235)[0x6dc865]
      bin/mysqld(handle_one_connection+0x3f)[0x6dca2f]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x8064)[0x7f292884b064]
      /lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f292772f62d]
       
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f28a00aa0e0): is an invalid pointer
      Connection ID (thread ID): 8
      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
       
      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.
       
      We think the query pointer is invalid, but we will try to print it anyway. 
      Query: SELECT
          *
      FROM
          (
      
      

      Attachments

        1. mdev15065.test
          103 kB
        2. error.sql
          587 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ihanick Nickolay Ihalainen
              Votes:
              1 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.