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

Assertion `marked_for_read()' failure coming from Regexp_processor_pcre::compile

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.3, 10.4
    • 10.4
    • Server

    Description

      We have lots of failures of these two assertions in different places, including the latest releases, so I don't really expect the one which affects 10.3-10.4 only to be fixed. But I need it filed, as it doesn't seem to match any already filed and still open ones.

      CREATE TABLE t (k DATE DEFAULT '2000-01-01', v BIGINT GENERATED ALWAYS AS (1));
      ALTER TABLE t MODIFY v BIGINT GENERATED ALWAYS AS (DATE_FORMAT(k, '%W %M %Y') RLIKE (k));
      SHOW CREATE TABLE t;
       
      # Cleanup
      DROP TABLE t;
      

      10.4 c6ef9b1c

      mysqld: /data/src/10.4/sql/field.cc:6672: virtual String* Field_newdate::val_str(String*, String*): Assertion `marked_for_read()' failed.
      230508 14:36:01 [ERROR] mysqld got signal 6 ;
       
      #8  0x00007f504c245395 in __assert_fail_base (fmt=0x7f504c3b9a70 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x561997db0400 "marked_for_read()", file=file@entry=0x561997daf780 "/data/src/10.4/sql/field.cc", line=line@entry=6672, function=function@entry=0x561997db5aa0 "virtual String* Field_newdate::val_str(String*, String*)") at ./assert/assert.c:92
      #9  0x00007f504c253df2 in __GI___assert_fail (assertion=0x561997db0400 "marked_for_read()", file=0x561997daf780 "/data/src/10.4/sql/field.cc", line=6672, function=0x561997db5aa0 "virtual String* Field_newdate::val_str(String*, String*)") at ./assert/assert.c:101
      #10 0x000056199612636a in Field_newdate::val_str (this=0x619000086200, val_buffer=0x7f504461d260, val_ptr=0x619000086938) at /data/src/10.4/sql/field.cc:6672
      #11 0x00005619961f048f in Item_field::val_str (this=0x619000086908, str=0x7f504461d260) at /data/src/10.4/sql/item.cc:3246
      #12 0x0000561996284c1e in Regexp_processor_pcre::compile (this=0x61d000202770, item=0x619000086908, send_error=true) at /data/src/10.4/sql/item_cmpfunc.cc:5873
      #13 0x00005619962858fd in Regexp_processor_pcre::fix_owner (this=0x61d000202770, owner=0x61d0002026a8, subject_arg=0x6190000867e8, pattern_arg=0x619000086908) at /data/src/10.4/sql/item_cmpfunc.cc:6052
      #14 0x0000561996285bdf in Item_func_regex::fix_length_and_dec (this=0x61d0002026a8) at /data/src/10.4/sql/item_cmpfunc.cc:6079
      #15 0x00005619962dd7c3 in Item_func::fix_fields (this=0x61d0002026a8, thd=0x62b00005b208, ref=0x619000086a30) at /data/src/10.4/sql/item_func.cc:373
      #16 0x0000561996285a61 in Item_func_regex::fix_fields (this=0x61d0002026a8, thd=0x62b00005b208, ref=0x619000086a30) at /data/src/10.4/sql/item_cmpfunc.cc:6068
      #17 0x0000561995d04b8b in Virtual_column_info::fix_expr (this=0x619000086a20, thd=0x62b00005b208) at /data/src/10.4/sql/table.cc:3281
      #18 0x0000561995d04ff4 in Virtual_column_info::fix_session_expr (this=0x619000086a20, thd=0x62b00005b208) at /data/src/10.4/sql/table.cc:3307
      #19 0x0000561995d05b20 in TABLE::vcol_fix_expr (this=0x62000003d088, thd=0x62b00005b208) at /data/src/10.4/sql/table.cc:3393
      #20 0x000056199585e294 in open_table (thd=0x62b00005b208, table_list=0x62b000062328, ot_ctx=0x7f504461e590) at /data/src/10.4/sql/sql_base.cc:2233
      #21 0x0000561995866b7f in open_and_process_table (thd=0x62b00005b208, tables=0x62b000062328, counter=0x7f504461e750, flags=1024, prelocking_strategy=0x7f504461e670, has_prelocking_list=false, ot_ctx=0x7f504461e590) at /data/src/10.4/sql/sql_base.cc:3909
      #22 0x000056199586963b in open_tables (thd=0x62b00005b208, options=..., start=0x7f504461e760, counter=0x7f504461e750, flags=1024, prelocking_strategy=0x7f504461e670) at /data/src/10.4/sql/sql_base.cc:4390
      #23 0x000056199583eecd in open_tables (thd=0x62b00005b208, tables=0x7f504461e760, counter=0x7f504461e750, flags=1024) at /data/src/10.4/sql/sql_base.h:473
      #24 0x0000561995b9ee7a in mysqld_show_create_get_fields (thd=0x62b00005b208, table_list=0x62b000062328, field_list=0x7f504461eb40, buffer=0x7f504461eb80) at /data/src/10.4/sql/sql_show.cc:1321
      #25 0x0000561995b9fd44 in mysqld_show_create (thd=0x62b00005b208, table_list=0x62b000062328) at /data/src/10.4/sql/sql_show.cc:1428
      #26 0x00005619959f1a0f in mysql_execute_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:4401
      #27 0x0000561995a0b2fb in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "SHOW CREATE TABLE t", length=19, parser_state=0x7f5044621860, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7998
      #28 0x00005619959e17a7 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x62900023f209 "SHOW CREATE TABLE t", packet_length=19, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1857
      #29 0x00005619959de320 in do_command (thd=0x62b00005b208) at /data/src/10.4/sql/sql_parse.cc:1378
      #30 0x0000561995ddc31c in do_handle_one_connection (connect=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1420
      #31 0x0000561995ddbc33 in handle_one_connection (arg=0x6080000009a8) at /data/src/10.4/sql/sql_connect.cc:1324
      #32 0x0000561996a4674c in pfs_spawn_thread (arg=0x615000003508) at /data/src/10.4/storage/perfschema/pfs.cc:1869
      #33 0x00007f504c2a7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #34 0x00007f504c3285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      10.3 55a53949

      mysqld: /data/src/10.3/sql/field.cc:6579: virtual String* Field_newdate::val_str(String*, String*): Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))' failed.
      230508 14:41:59 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f9c50c53df2 in __GI___assert_fail (assertion=0x55e14bd67d40 "!table || (!table->read_set || bitmap_is_set(table->read_set, field_index) || (!(ptr >= table->record[0] && ptr < table->record[0] + table->s->reclength)))", file=0x55e14bd671e0 "/data/src/10.3/sql/field.cc", line=6579, function=0x55e14bd6c9e0 "virtual String* Field_newdate::val_str(String*, String*)") at ./assert/assert.c:101
      #10 0x000055e14a429b7f in Field_newdate::val_str (this=0x619000083f00, val_buffer=0x7f9c47e29550, val_ptr=0x619000084638) at /data/src/10.3/sql/field.cc:6579
      #11 0x000055e14a4f1655 in Item_field::val_str (this=0x619000084608, str=0x7f9c47e29550) at /data/src/10.3/sql/item.cc:3480
      #12 0x000055e14a5809da in Regexp_processor_pcre::compile (this=0x61d000192968, item=0x619000084608, send_error=true) at /data/src/10.3/sql/item_cmpfunc.cc:5603
      #13 0x000055e14a5816a9 in Regexp_processor_pcre::fix_owner (this=0x61d000192968, owner=0x61d0001928a8, subject_arg=0x6190000844e8, pattern_arg=0x619000084608) at /data/src/10.3/sql/item_cmpfunc.cc:5782
      #14 0x000055e14a58198b in Item_func_regex::fix_length_and_dec (this=0x61d0001928a8) at /data/src/10.3/sql/item_cmpfunc.cc:5809
      #15 0x000055e14a5d4600 in Item_func::fix_fields (this=0x61d0001928a8, thd=0x62a000060208, ref=0x619000084730) at /data/src/10.3/sql/item_func.cc:370
      #16 0x000055e14a58180d in Item_func_regex::fix_fields (this=0x61d0001928a8, thd=0x62a000060208, ref=0x619000084730) at /data/src/10.3/sql/item_cmpfunc.cc:5798
      #17 0x000055e14a01729d in Virtual_column_info::fix_expr (this=0x619000084720, thd=0x62a000060208) at /data/src/10.3/sql/table.cc:2966
      #18 0x000055e14a0176bc in Virtual_column_info::fix_session_expr (this=0x619000084720, thd=0x62a000060208) at /data/src/10.3/sql/table.cc:2992
      #19 0x000055e14a0181dd in TABLE::vcol_fix_expr (this=0x61f000045288, thd=0x62a000060208) at /data/src/10.3/sql/table.cc:3080
      #20 0x000055e149bb946f in open_table (thd=0x62a000060208, table_list=0x62b000000328, ot_ctx=0x7f9c47e2a880) at /data/src/10.3/sql/sql_base.cc:2057
      #21 0x000055e149bc1d39 in open_and_process_table (thd=0x62a000060208, tables=0x62b000000328, counter=0x7f9c47e2aa40, flags=1024, prelocking_strategy=0x7f9c47e2a960, has_prelocking_list=false, ot_ctx=0x7f9c47e2a880) at /data/src/10.3/sql/sql_base.cc:3733
      #22 0x000055e149bc4296 in open_tables (thd=0x62a000060208, options=..., start=0x7f9c47e2aa50, counter=0x7f9c47e2aa40, flags=1024, prelocking_strategy=0x7f9c47e2a960) at /data/src/10.3/sql/sql_base.cc:4208
      #23 0x000055e149c84549 in open_tables (thd=0x62a000060208, tables=0x7f9c47e2aa50, counter=0x7f9c47e2aa40, flags=1024) at /data/src/10.3/sql/sql_base.h:473
      #24 0x000055e149ec682b in mysqld_show_create_get_fields (thd=0x62a000060208, table_list=0x62b000000328, field_list=0x7f9c47e2ae30, buffer=0x7f9c47e2ae70) at /data/src/10.3/sql/sql_show.cc:1319
      #25 0x000055e149ec7705 in mysqld_show_create (thd=0x62a000060208, table_list=0x62b000000328) at /data/src/10.3/sql/sql_show.cc:1426
      #26 0x000055e149d30832 in mysql_execute_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:4304
      #27 0x000055e149d4a180 in mysql_parse (thd=0x62a000060208, rawbuf=0x62b000000228 "SHOW CREATE TABLE t", length=19, parser_state=0x7f9c47e2d9b0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7855
      #28 0x000055e149d20faf in dispatch_command (command=COM_QUERY, thd=0x62a000060208, packet=0x6290000dc209 "SHOW CREATE TABLE t", packet_length=19, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1852
      #29 0x000055e149d1db47 in do_command (thd=0x62a000060208) at /data/src/10.3/sql/sql_parse.cc:1398
      #30 0x000055e14a0e5f5c in do_handle_one_connection (connect=0x6080000006a8) at /data/src/10.3/sql/sql_connect.cc:1404
      #31 0x000055e14a0e5889 in handle_one_connection (arg=0x6080000006a8) at /data/src/10.3/sql/sql_connect.cc:1309
      #32 0x000055e14b6ccbd5 in pfs_spawn_thread (arg=0x615000003008) at /data/src/10.3/storage/perfschema/pfs.cc:1869
      #33 0x00007f9c50ca7fd4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #34 0x00007f9c50d285bc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Reproducible on 10.3/10.4 (different assertions, as described above).
      Could not reproduce on 10.5. It stopped failing there in early versions, I could not find what exactly fixed (or hid) it.

      Attachments

        Activity

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.