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

Server crashes in PlugDup (storage/connect/plugutil.c:542) on a debug build

    XMLWordPrintable

Details

    Description

      Stack trace from 10.1 commit 7e29f2d64fb463559a7c

      #3  <signal handler called>
      #4  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
      #5  0x00007f4cca4f9c2f in PlugDup (g=0x7f4cba617000, str=0xa5a5a5a5a5a5a5a5 <Address 0xa5a5a5a5a5a5a5a5 out of bounds>) at storage/connect/plugutil.c:542
      #6  0x00007f4cca531788 in RELDEF::GetStringCatInfo (this=0x7f4cb60004d0, g=0x7f4cba617000, what=0x7f4cca5b2dac "Catfunc", sdef=0x0) at storage/connect/reldef.cpp:165
      #7  0x00007f4cca531a32 in TABDEF::Define (this=0x7f4cb60004d0, g=0x7f4cba617000, cat=0x7f4cba4bfaa0, name=0x7f4cb6000398 "pets", am=0x7f4cca5b7fd7 "MYPRX") at storage/connect/reldef.cpp:226
      #8  0x00007f4cca4f6985 in MYCAT::MakeTableDesc (this=0x7f4cba4bfaa0, g=0x7f4cba617000, name=0x7f4cb6000398 "pets", am=0x7f4cca5b7fd7 "MYPRX") at storage/connect/mycat.cc:577
      #9  0x00007f4cca4f65fb in MYCAT::GetTableDesc (this=0x7f4cba4bfaa0, g=0x7f4cba617000, name=0x7f4cb6000398 "pets", type=0x7f4cca5b7fd7 "MYPRX") at storage/connect/mycat.cc:521
      #10 0x00007f4cca4f6c54 in MYCAT::GetTable (this=0x7f4cba4bfaa0, g=0x7f4cba617000, tablep=0x7f4cb60003a0, mode=MODE_READ, type=0x7f4cca5b7fd7 "MYPRX") at storage/connect/mycat.cc:596
      #11 0x00007f4cca563429 in TDBPRX::GetSubTable (this=0x7f4cb60003d8, g=0x7f4cba617000, tabp=0x7f4cb60003a0, b=true) at storage/connect/tabutil.cpp:416
      #12 0x00007f4cca558b93 in TDBOCCUR::InitTable (this=0x7f4cb60003d8, g=0x7f4cba617000) at storage/connect/taboccur.cpp:332
      #13 0x00007f4cca563803 in TDBPRX::Cardinality (this=0x7f4cb60003d8, g=0x7f4cba617000) at storage/connect/tabutil.cpp:489
      #14 0x00007f4cca4f30a0 in CntInfo (g=0x7f4cba617000, tp=0x7f4cb60003d8, info=0x7f4cba63b030) at storage/connect/connect.cc:169
      #15 0x00007f4cca4e786a in ha_connect::info (this=0x7f4cba63a888, flag=18) at storage/connect/ha_connect.cc:3852
      #16 0x00007f4cd336685d in TABLE_LIST::fetch_number_of_rows (this=0x7f4cba59a260) at sql/table.cc:7269
      #17 0x00007f4cd32b1e01 in make_join_statistics (join=0x7f4cba59a938, tables_list=..., keyuse_array=0x7f4cba59ac68) at sql/sql_select.cc:3576
      #18 0x00007f4cd32a9ebe in JOIN::optimize_inner (this=0x7f4cba59a938) at sql/sql_select.cc:1359
      #19 0x00007f4cd32a8d4e in JOIN::optimize (this=0x7f4cba59a938) at sql/sql_select.cc:1021
      #20 0x00007f4cd32b16ed in mysql_select (thd=0x7f4cc6dd5070, rref_pointer_array=0x7f4cc6dd93d8, tables=0x7f4cba59a260, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f4cba59a918, unit=0x7f4cc6dd8a70, select_lex=0x7f4cc6dd9160) at sql/sql_select.cc:3427
      #21 0x00007f4cd32a6f3d in handle_select (thd=0x7f4cc6dd5070, lex=0x7f4cc6dd89a8, result=0x7f4cba59a918, setup_tables_done_option=0) at sql/sql_select.cc:371
      #22 0x00007f4cd3277538 in execute_sqlcom_select (thd=0x7f4cc6dd5070, all_tables=0x7f4cba59a260) at sql/sql_parse.cc:5867
      #23 0x00007f4cd326d617 in mysql_execute_command (thd=0x7f4cc6dd5070) at sql/sql_parse.cc:2962
      #24 0x00007f4cd327ac4f in mysql_parse (thd=0x7f4cc6dd5070, rawbuf=0x7f4cba59a088 "select * from xpet", length=18, parser_state=0x7f4cd2cec1a0) at sql/sql_parse.cc:7265
      #25 0x00007f4cd32697b6 in dispatch_command (command=COM_QUERY, thd=0x7f4cc6dd5070, packet=0x7f4cc8fc0071 "select * from xpet", packet_length=18) at sql/sql_parse.cc:1488
      #26 0x00007f4cd32684dc in do_command (thd=0x7f4cc6dd5070) at sql/sql_parse.cc:1110
      #27 0x00007f4cd339ea5d in do_handle_one_connection (thd_arg=0x7f4cc6dd5070) at sql/sql_connect.cc:1350
      #28 0x00007f4cd339e7ae in handle_one_connection (arg=0x7f4cc6dd5070) at sql/sql_connect.cc:1262
      #29 0x00007f4cd396c193 in pfs_spawn_thread (arg=0x7f4cc8fd1470) at storage/perfschema/pfs.cc:1860
      #30 0x00007f4cd292db50 in start_thread (arg=<optimized out>) at pthread_create.c:304
      #31 0x00007f4cd07b995d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112

      Test case

      --source include/have_innodb.inc
       
      install soname 'ha_connect';
       
      create table pets
       (name varchar(20),
        dog int,
        cat int,
        rabbit int,
        bird int,
        fish int
       ) engine=InnoDB;
       
      insert into pets(name, dog, cat, rabbit, bird, fish)
       values
        ('John', 2, 0, 0, 0, 0),
        ('Bill',        0,      1,      0,      0,      0),
        ('Mary',        1,      1,      0,      0,      0),
        ('Lisbeth', 0,  0,      2,      0,      0),
        ('Kevin',       0,      2,      0,      6,      0),
        ('Donald',      1, 0,   0,      0,      3);
       
      create table xpet (
       name varchar(12) not null,
       race char(6) not null,
       number int not null)
       engine=connect table_type=occur tabname=pets
       option_list='OccurCol=number,RankCol=race'
       Colist='dog,cat,rabbit,bird,fish';
       
      select * from xpet;

      (test case from MDEV-8927)

      Attachments

        Activity

          People

            bertrandop Olivier Bertrand
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.