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

Segfault on duplicate free of Item_func_in::array

    XMLWordPrintable

    Details

      Description

      -- drop table person_principal
      create or replace table person_principal
      (
          person_id bigint not null,
          insurant_id varchar(10) not null,
          principal_id bigint not null,
          principal_officer_id bigint not null,
          nursing_degree tinyint null,
          nursing_degree_valid_from date not null default cast(current_timestamp(6) as date),
          carma_user_id bigint not null,
          current_date_time timestamp(6) not null default current_timestamp(6) on update current_timestamp(6),
          constraint pk_person_principal primary key (person_id asc),
          constraint ck_person_principal_nursing_degree check (nursing_degree in (1,2,3,4,5))
      );
       
      -- drop table person_principal_hist
      create or replace table person_principal_hist
      (
          person_id bigint not null,
          insurant_id varchar(10) not null,
          principal_id bigint not null,
          principal_officer_id bigint not null,
          nursing_degree tinyint null,
          nursing_degree_valid_from date not null default cast(now() as date),
          carma_user_id bigint not null,
          orig_date_time datetime(6) not null,
          constraint pk_person_principal_hist primary key (person_id asc, orig_date_time asc),
          constraint ck_person_principal_hist_nursing_degree check (nursing_degree in (1,2,3,4,5))
      );
       
      -- select * from person_principal
      insert into person_principal
          (person_id, insurant_id, principal_id, principal_officer_id, nursing_degree, nursing_degree_valid_from, carma_user_id)
      values
          (1, 'A123456789', 5, 1, 1, '2018-05-06', 1);
       
      alter table person_principal add column if not exists date_mask tinyint null;
       
      update person_principal set date_mask = 0;
       
      alter table person_principal modify column date_mask tinyint not null;
      

      leads to a crash with the following output:
      2020-05-14 17:45:16 0 [Note] mysqld: ready for connections.
      Version: '10.4.13-MariaDB-1:10.4.13+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
      2020-05-14 17:45:16 0 [Note] InnoDB: Buffer pool(s) load completed at 200514 17:45:16
      200514 17:48:27 [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.4.13-MariaDB-1:10.4.13+maria~bionic
      key_buffer_size=134217728
      read_buffer_size=2097152
      max_used_connections=3
      max_threads=102
      thread_count=9
      It is possible that mysqld could use up to
      key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 760255 K bytes of memory
      Hope that's ok; if not, decrease some variables in the equation.
      Thread pointer: 0x7f3740000c08
      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 = 0x7f37b83c0dd8 thread_stack 0x49000
      mysqld(my_print_stacktrace+0x2e)[0x5579faee8e8e]
      mysqld(handle_fatal_signal+0x515)[0x5579fa964915]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f37d4e42890]
      mysqld(my_charset_latin1+0x0)[0x5579fb88d4c0]
      Trying to get some variables.
      Some pointers may be invalid and cause the dump to abort.
      Query (0x7f374000fff0): alter table person_principal add column if not exists date_mask tinyint null
      Connection ID (thread ID): 10
      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=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=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 /var/lib/mysql
      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 unlimited unlimited bytes
      Max resident set unlimited unlimited bytes
      Max processes unlimited unlimited processes
      Max open files 1048576 1048576 files
      Max locked memory 65536 65536 bytes
      Max address space unlimited unlimited bytes
      Max file locks unlimited unlimited locks
      Max pending signals 30725 30725 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: |/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c ...

      The MariaDB-Docker-Image is derived from Ubuntu:bionic, it is the official image from Docker Hub.

      Maybe relates to MDEV-21663, MDEV-21800, or MDEV-21787

      Version 10.4.12 is not affected, if that helps.

      Best regars, Jan

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              midenok Aleksey Midenkov
              Reporter:
              jankoh Jan Kohnert
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: