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

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

    XMLWordPrintable

Details

    Description

      I am not re-opening MDEV-24739 because the patch for it was included into 10.5.9 release.

      SELECT * FROM mysql.help_relation WHERE (help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND help_keyword_id = help_topic_id;
      

      10.5 aa4f76be

      mariadbd: /data/src/10.5/sql/opt_range.cc:11056: SEL_ARG* SEL_ARG::tree_delete(SEL_ARG*): Assertion `root->weight >= (1 + (key->next_key_part ? key->next_key_part->weight : 0))' failed.
      210306  1:44:58 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f0ad5187f36 in __GI___assert_fail (assertion=0x564cb23ee378 "root->weight >= (1 + (key->next_key_part ? key->next_key_part->weight : 0))", file=0x564cb23ec2f8 "/data/src/10.5/sql/opt_range.cc", line=11056, function=0x564cb23ee3c8 "SEL_ARG* SEL_ARG::tree_delete(SEL_ARG*)") at assert.c:101
      #8  0x0000564cb191b128 in SEL_ARG::tree_delete (this=0x7f0ab412c360, key=0x7f0ab412c360) at /data/src/10.5/sql/opt_range.cc:11056
      #9  0x0000564cb19198e7 in key_or (param=0x7f0ad03429b0, key1=0x7f0ab412c360, key2=0x7f0ab412c4b0) at /data/src/10.5/sql/opt_range.cc:10318
      #10 0x0000564cb191937c in key_or_with_limit (param=0x7f0ad03429b0, keyno=0, key1=0x7f0ab412bfb0, key2=0x7f0ab4208e70) at /data/src/10.5/sql/opt_range.cc:10067
      #11 0x0000564cb1900b9a in SEL_IMERGE::or_sel_tree_with_checks (this=0x7f0ab412c170, param=0x7f0ad03429b0, n_trees=2, tree=0x7f0ab412bde8, is_first_check_pass=false, is_last_check_pass=0x7f0ad03424c3) at /data/src/10.5/sql/opt_range.cc:721
      #12 0x0000564cb19014d8 in imerge_list_or_tree (param=0x7f0ad03429b0, merges=0x7f0ad03425f0, tree=0x7f0ab4208ee0) at /data/src/10.5/sql/opt_range.cc:1096
      #13 0x0000564cb19187ef in tree_or (param=0x7f0ad03429b0, tree1=0x7f0ab4208970, tree2=0x7f0ab4208c68) at /data/src/10.5/sql/opt_range.cc:9771
      #14 0x0000564cb191434a in Item_cond::get_mm_tree (this=0x7f0ab4016af0, param=0x7f0ad03429b0, cond_ptr=0x7f0ab4017658) at /data/src/10.5/sql/opt_range.cc:8356
      #15 0x0000564cb19140c5 in Item_cond_and::get_mm_tree (this=0x7f0ab4017530, param=0x7f0ad03429b0, cond_ptr=0x7f0ab401a5a8) at /data/src/10.5/sql/opt_range.cc:8312
      #16 0x0000564cb1905e2d in SQL_SELECT::test_quick_select (this=0x7f0ab401a5a0, thd=0x7f0ab4000db8, 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/sql/opt_range.cc:2880
      #17 0x0000564cb145107d in get_quick_record_count (thd=0x7f0ab4000db8, select=0x7f0ab401a5a0, table=0x7f0ab4156c18, keys=0x7f0ab4019130, limit=18446744073709551615) at /data/src/10.5/sql/sql_select.cc:4764
      #18 0x0000564cb1453a10 in make_join_statistics (join=0x7f0ab4017f90, tables_list=..., keyuse_array=0x7f0ab4018280) at /data/src/10.5/sql/sql_select.cc:5495
      #19 0x0000564cb1447e5c in JOIN::optimize_inner (this=0x7f0ab4017f90) at /data/src/10.5/sql/sql_select.cc:2256
      #20 0x0000564cb1445949 in JOIN::optimize (this=0x7f0ab4017f90) at /data/src/10.5/sql/sql_select.cc:1628
      #21 0x0000564cb1450d5c in mysql_select (thd=0x7f0ab4000db8, tables=0x7f0ab4015bb0, fields=..., conds=0x7f0ab4017530, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f0ab4017f68, unit=0x7f0ab4004f60, select_lex=0x7f0ab40155a8) at /data/src/10.5/sql/sql_select.cc:4706
      #22 0x0000564cb1440873 in handle_select (thd=0x7f0ab4000db8, lex=0x7f0ab4004e98, result=0x7f0ab4017f68, setup_tables_done_option=0) at /data/src/10.5/sql/sql_select.cc:417
      #23 0x0000564cb1403237 in execute_sqlcom_select (thd=0x7f0ab4000db8, all_tables=0x7f0ab4015bb0) at /data/src/10.5/sql/sql_parse.cc:6282
      #24 0x0000564cb13fa2c1 in mysql_execute_command (thd=0x7f0ab4000db8) at /data/src/10.5/sql/sql_parse.cc:3978
      #25 0x0000564cb14080de in mysql_parse (thd=0x7f0ab4000db8, rawbuf=0x7f0ab4015430 "SELECT * FROM mysql.help_relation WHERE (help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND help_keyword_id = help_topic_id", length=140, parser_state=0x7f0ad0344510, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:8063
      #26 0x0000564cb13f4043 in dispatch_command (command=COM_QUERY, thd=0x7f0ab4000db8, packet=0x7f0ab400b589 "SELECT * FROM mysql.help_relation WHERE (help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND help_keyword_id = help_topic_id", packet_length=140, is_com_multi=false, is_next_command=false) at /data/src/10.5/sql/sql_parse.cc:1889
      #27 0x0000564cb13f2837 in do_command (thd=0x7f0ab4000db8) at /data/src/10.5/sql/sql_parse.cc:1370
      #28 0x0000564cb15a0a4d in do_handle_one_connection (connect=0x564cb4ee5c58, put_in_cache=true) at /data/src/10.5/sql/sql_connect.cc:1410
      #29 0x0000564cb15a07b0 in handle_one_connection (arg=0x564cb4def678) at /data/src/10.5/sql/sql_connect.cc:1312
      #30 0x0000564cb1b014e5 in pfs_spawn_thread (arg=0x564cb4ee5888) at /data/src/10.5/storage/perfschema/pfs.cc:2201
      #31 0x00007f0ad569f609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #32 0x00007f0ad5273293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      No obvious immediate problem on a non-debug build.
      Not reproducible on 10.4.
      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:
              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.