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

Assertion `(length % 4) == 0' failed in my_well_formed_len_utf32

    XMLWordPrintable

Details

    Description

      Setting to Minor because it's a debug-only assertion failure which seems to only affect 10.1.

      --source include/have_sequence.inc
       
      CREATE TABLE t1 (a INT);
      INSERT INTO t1 SELECT seq FROM seq_1_to_163;
      SET SESSION character_set_connection= utf32;
      SELECT GROUP_CONCAT(@var := a) AS f FROM t1;
       
      # Cleanup
      DROP TABLE t1;
      

      10.1 c400ef25

      mysqld: /data/src/10.1/strings/ctype-ucs2.c:2401: my_well_formed_len_utf32: Assertion `(length % 4) == 0' failed.
      200719 17:28:58 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fcdc32cef12 in __GI___assert_fail (assertion=0x55d8425cf493 "(length % 4) == 0", file=0x55d8425cf320 "/data/src/10.1/strings/ctype-ucs2.c", line=2401, function=0x55d8425cfb40 <__PRETTY_FUNCTION__.11925> "my_well_formed_len_utf32") at assert.c:101
      #8  0x000055d84222a53b in my_well_formed_len_utf32 (cs=0x55d842b8e120 <my_charset_utf32_general_ci>, b=0x7fcdba4e686e "", e=0x7fcdba4e6870 "", nchars=1029, error=0x7fcdc4ef8c24) at /data/src/10.1/strings/ctype-ucs2.c:2401
      #9  0x000055d841c0d57b in dump_leaf_key (key_arg=0x7fcdba49cb49, count=1, item_arg=0x7fcdba442420) at /data/src/10.1/sql/item_sum.cc:3078
      #10 0x000055d841c0e89d in Item_func_group_concat::add (this=0x7fcdba442420) at /data/src/10.1/sql/item_sum.cc:3429
      #11 0x000055d841c0ff97 in Aggregator_simple::add (this=0x7fcdba444ef0) at /data/src/10.1/sql/item_sum.h:672
      #12 0x000055d841992295 in Item_sum::aggregator_add (this=0x7fcdba442420) at /data/src/10.1/sql/item_sum.h:521
      #13 0x000055d84198898a in update_sum_func (func_ptr=0x7fcdba443668) at /data/src/10.1/sql/sql_select.cc:23682
      #14 0x000055d84197f7b5 in end_send_group (join=0x7fcdba442fb8, join_tab=0x7fcdba444348, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:19938
      #15 0x000055d84197cb2c in evaluate_join_record (join=0x7fcdba442fb8, join_tab=0x7fcdba444000, error=0) at /data/src/10.1/sql/sql_select.cc:18816
      #16 0x000055d84197c5cd in sub_select (join=0x7fcdba442fb8, join_tab=0x7fcdba444000, end_of_records=false) at /data/src/10.1/sql/sql_select.cc:18632
      #17 0x000055d84197bc75 in do_select (join=0x7fcdba442fb8, fields=0x7fcdba4433b8, table=0x0, procedure=0x0) at /data/src/10.1/sql/sql_select.cc:18248
      #18 0x000055d841955886 in JOIN::exec_inner (this=0x7fcdba442fb8) at /data/src/10.1/sql/sql_select.cc:3277
      #19 0x000055d841952bb1 in JOIN::exec (this=0x7fcdba442fb8) at /data/src/10.1/sql/sql_select.cc:2564
      #20 0x000055d8419560a7 in mysql_select (thd=0x7fcdbc3cb070, rref_pointer_array=0x7fcdbc3cf568, tables=0x7fcdba4428c0, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fcdba442f98, unit=0x7fcdbc3cebb8, select_lex=0x7fcdbc3cf2c0) at /data/src/10.1/sql/sql_select.cc:3501
      #21 0x000055d84194b816 in handle_select (thd=0x7fcdbc3cb070, lex=0x7fcdbc3ceaf8, result=0x7fcdba442f98, setup_tables_done_option=0) at /data/src/10.1/sql/sql_select.cc:377
      #22 0x000055d84191b2d3 in execute_sqlcom_select (thd=0x7fcdbc3cb070, all_tables=0x7fcdba4428c0) at /data/src/10.1/sql/sql_parse.cc:5682
      #23 0x000055d841911f9f in mysql_execute_command (thd=0x7fcdbc3cb070) at /data/src/10.1/sql/sql_parse.cc:3029
      #24 0x000055d84191ede0 in mysql_parse (thd=0x7fcdbc3cb070, rawbuf=0x7fcdba442088 "SELECT GROUP_CONCAT(@var := a) AS f FROM t1", length=43, parser_state=0x7fcdc4efa5f0) at /data/src/10.1/sql/sql_parse.cc:7200
      #25 0x000055d84190dfb7 in dispatch_command (command=COM_QUERY, thd=0x7fcdbc3cb070, packet=0x7fcdbe3ee071 "", packet_length=43) at /data/src/10.1/sql/sql_parse.cc:1491
      #26 0x000055d84190ce9c in do_command (thd=0x7fcdbc3cb070) at /data/src/10.1/sql/sql_parse.cc:1123
      #27 0x000055d841a4ad3b in do_handle_one_connection (thd_arg=0x7fcdbc3cb070) at /data/src/10.1/sql/sql_connect.cc:1331
      #28 0x000055d841a4aa6c in handle_one_connection (arg=0x7fcdbc3cb070) at /data/src/10.1/sql/sql_connect.cc:1242
      #29 0x000055d841e68ed4 in pfs_spawn_thread (arg=0x7fcdc2839ef0) at /data/src/10.1/storage/perfschema/pfs.cc:1868
      #30 0x00007fcdc4b7d4a4 in start_thread (arg=0x7fcdc4efb700) at pthread_create.c:456
      #31 0x00007fcdc338bd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
      

      Reproducible on 10.1 with at least InnoDB and MyISAM.
      No obvious effect on a non-debug build.
      Couldn't reproduce on 10.2+, even with group_concat_max_len=1024.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              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.