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

Assertion `root->weight >= (1 + (key->next_key_part ? key->next_key_part->weight : 0))' failed in SEL_ARG::tree_delete

    XMLWordPrintable

Details

    Description

      SELECT * FROM mysql.help_relation WHERE NOT (help_topic_id != 8 AND help_keyword_id != 0 OR help_keyword_id = 2 OR help_topic_id < 1900);
      

      10.5 a70a47f2f33

      mariadbd: /data/src/10.5-bug/sql/opt_range.cc:11016: SEL_ARG* SEL_ARG::tree_delete(SEL_ARG*): Assertion `root->weight >= (1 + (key->next_key_part ? key->next_key_part->weight : 0))' failed.
      210129 20:24:16 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fb72ca36f36 in __GI___assert_fail (assertion=0x555cf45ae6b0 "root->weight >= (1 + (key->next_key_part ? key->next_key_part->weight : 0))", file=0x555cf45ac630 "/data/src/10.5-bug/sql/opt_range.cc", line=11016, function=0x555cf45ae700 "SEL_ARG* SEL_ARG::tree_delete(SEL_ARG*)") at assert.c:101
      #8  0x0000555cf3adb978 in SEL_ARG::tree_delete (this=0x7fb70c1a7000, key=0x7fb70c1a7000) at /data/src/10.5-bug/sql/opt_range.cc:11016
      #9  0x0000555cf3ad932d in and_all_keys (param=0x7fb72838e9b0, key1=0x7fb70c1a7000, key2=0x7fb70c1a6d98, clone_flag=1) at /data/src/10.5-bug/sql/opt_range.cc:9797
      #10 0x0000555cf3ad9528 in key_and (param=0x7fb72838e9b0, key1=0x7fb70c1a7000, key2=0x7fb70c1a6d98, clone_flag=1) at /data/src/10.5-bug/sql/opt_range.cc:9860
      #11 0x0000555cf3ad9bf4 in key_and_with_limit (param=0x7fb72838e9b0, keyno=0, key1=0x7fb70c1a6aa8, key2=0x7fb70c1a6d98, clone_flag=1) at /data/src/10.5-bug/sql/opt_range.cc:10037
      #12 0x0000555cf3ad7b54 in and_range_trees (param=0x7fb72838e9b0, tree1=0x7fb70c1a6998, tree2=0x7fb70c1a6f78, result=0x7fb70c1a6ef0) at /data/src/10.5-bug/sql/opt_range.cc:9136
      #13 0x0000555cf3ac1247 in SEL_IMERGE::and_sel_tree (this=0x7fb70c1a6928, param=0x7fb72838e9b0, tree=0x7fb70c1a6d08, new_imerge=0x7fb70c1a6e80) at /data/src/10.5-bug/sql/opt_range.cc:624
      #14 0x0000555cf3ac1f66 in imerge_list_and_tree (param=0x7fb72838e9b0, merges=0x7fb70c1a6540, tree=0x7fb70c1a6d08, replace=true) at /data/src/10.5-bug/sql/opt_range.cc:1168
      #15 0x0000555cf3ad7d99 in tree_and (param=0x7fb72838e9b0, tree1=0x7fb70c1a6510, tree2=0x7fb70c1a6d08) at /data/src/10.5-bug/sql/opt_range.cc:9245
      #16 0x0000555cf3ad49d2 in Item_cond_and::get_mm_tree (this=0x7fb70c016c30, param=0x7fb72838e9b0, cond_ptr=0x7fb70c019b60) at /data/src/10.5-bug/sql/opt_range.cc:8315
      #17 0x0000555cf3ac6701 in SQL_SELECT::test_quick_select (this=0x7fb70c019b58, thd=0x7fb70c000db8, keys_to_use=..., prev_tables=0, limit=18446744073709551615, force_quick_range=false, ordered_output=false, remove_false_parts_of_where=true, only_single_index_range_scan=false) at /data/src/10.5-bug/sql/opt_range.cc:2879
      #18 0x0000555cf361227f in get_quick_record_count (thd=0x7fb70c000db8, select=0x7fb70c019b58, table=0x7fb70c1e2ed8, keys=0x7fb70c0188a8, limit=18446744073709551615) at /data/src/10.5-bug/sql/sql_select.cc:4763
      #19 0x0000555cf3614c12 in make_join_statistics (join=0x7fb70c017670, tables_list=..., keyuse_array=0x7fb70c017960) at /data/src/10.5-bug/sql/sql_select.cc:5494
      #20 0x0000555cf360905e in JOIN::optimize_inner (this=0x7fb70c017670) at /data/src/10.5-bug/sql/sql_select.cc:2255
      #21 0x0000555cf3606b4b in JOIN::optimize (this=0x7fb70c017670) at /data/src/10.5-bug/sql/sql_select.cc:1627
      #22 0x0000555cf3611f5e in mysql_select (thd=0x7fb70c000db8, tables=0x7fb70c014818, fields=..., conds=0x7fb70c016c30, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb70c017648, unit=0x7fb70c004f60, select_lex=0x7fb70c014210) at /data/src/10.5-bug/sql/sql_select.cc:4705
      #23 0x0000555cf3601a75 in handle_select (thd=0x7fb70c000db8, lex=0x7fb70c004e98, result=0x7fb70c017648, setup_tables_done_option=0) at /data/src/10.5-bug/sql/sql_select.cc:417
      #24 0x0000555cf35c444b in execute_sqlcom_select (thd=0x7fb70c000db8, all_tables=0x7fb70c014818) at /data/src/10.5-bug/sql/sql_parse.cc:6281
      #25 0x0000555cf35bb4d5 in mysql_execute_command (thd=0x7fb70c000db8) at /data/src/10.5-bug/sql/sql_parse.cc:3977
      #26 0x0000555cf35c92f2 in mysql_parse (thd=0x7fb70c000db8, rawbuf=0x7fb70c0140a0 "SELECT * FROM mysql.help_relation WHERE NOT (help_topic_id != 8 AND help_keyword_id != 0 OR help_keyword_id = 2 OR help_topic_id < 1900)", length=136, parser_state=0x7fb728390510, is_com_multi=false, is_next_command=false) at /data/src/10.5-bug/sql/sql_parse.cc:8062
      #27 0x0000555cf35b5275 in dispatch_command (command=COM_QUERY, thd=0x7fb70c000db8, packet=0x7fb70c0090b9 "SELECT * FROM mysql.help_relation WHERE NOT (help_topic_id != 8 AND help_keyword_id != 0 OR help_keyword_id = 2 OR help_topic_id < 1900)", packet_length=136, is_com_multi=false, is_next_command=false) at /data/src/10.5-bug/sql/sql_parse.cc:1889
      #28 0x0000555cf35b3a69 in do_command (thd=0x7fb70c000db8) at /data/src/10.5-bug/sql/sql_parse.cc:1370
      #29 0x0000555cf37618eb in do_handle_one_connection (connect=0x555cf6467a58, put_in_cache=true) at /data/src/10.5-bug/sql/sql_connect.cc:1410
      #30 0x0000555cf376164e in handle_one_connection (arg=0x555cf63dad78) at /data/src/10.5-bug/sql/sql_connect.cc:1312
      #31 0x0000555cf3cc14a7 in pfs_spawn_thread (arg=0x555cf64690b8) at /data/src/10.5-bug/storage/perfschema/pfs.cc:2201
      #32 0x00007fb72cf4e609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #33 0x00007fb72cb22293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      The failure appeared in 10.5 after this commit:

      commit c36720388d598ca3aa1c4d2dab2266656c528b50 (HEAD)
      Author: Sergei Petrunia
      Date:   Thu Jan 28 21:43:55 2021 +0300
       
          MDEV-9750: Quick memory exhaustion with 'extended_keys=on' ...
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.