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

Assertion `(buff[7] & 7) == HEAD_PAGE || (buff[7] & 7) == UNALLOCATED_PAGE' failed in _ma_read_block_record

    XMLWordPrintable

Details

    Description

      # mysqld options required for replay:  --max_allowed_packet=33554432
      CREATE TABLE t1 ENGINE=ARIA SELECT REPEAT(1,3355443) AS b ;
      SET @@session.tmp_disk_table_size=1024;
      SELECT STD(b) OVER(ROWS BETWEEN 2 FOLLOWING AND 1 FOLLOWING) as EXP FROM t1;
      

      Leads to:

      11.5.1 b2fc885469a7db2c25eab67fbc8e220dc2f805f8 (Debug)

      mariadbd: /test/11.5_dbg/storage/maria/ma_blockrec.c:5206: _ma_read_block_record: Assertion `(buff[7] & 7) == HEAD_PAGE || (buff[7] & 7) == UNALLOCATED_PAGE' failed.
      

      11.5.1 b2fc885469a7db2c25eab67fbc8e220dc2f805f8 (Debug)

      Core was generated by `/test/MD270524-mariadb-11.5.1-linux-x86_64-dbg/bin/mariadbd --no-defaults --max'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14ab28069700 (LWP 3231228))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014ab2a768859 in __GI_abort () at abort.c:79
      #2  0x000014ab2a768729 in __assert_fail_base (fmt=0x14ab2a8fe588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c3ce155d38 "(buff[7] & 7) == HEAD_PAGE || (buff[7] & 7) == UNALLOCATED_PAGE", file=0x55c3ce1553c8 "/test/11.5_dbg/storage/maria/ma_blockrec.c", line=5206, function=<optimized out>) at assert.c:92
      #3  0x000014ab2a779fd6 in __GI___assert_fail (assertion=assertion@entry=0x55c3ce155d38 "(buff[7] & 7) == HEAD_PAGE || (buff[7] & 7) == UNALLOCATED_PAGE", file=file@entry=0x55c3ce1553c8 "/test/11.5_dbg/storage/maria/ma_blockrec.c", line=line@entry=5206, function=function@entry=0x55c3ce156b70 <__PRETTY_FUNCTION__.24299> "_ma_read_block_record") at assert.c:101
      #4  0x000055c3cd7cc5a4 in _ma_read_block_record (info=0x14aae03b77f8, record=0x14aae03af8b0 "\377", record_pos=39936) at /test/11.5_dbg/storage/maria/ma_blockrec.c:5206
      #5  0x000055c3cd7c35fa in maria_rrnd (info=0x14aae03b77f8, buf=buf@entry=0x14aae03af8b0 "\377", filepos=39936) at /test/11.5_dbg/storage/maria/ma_rrnd.c:44
      #6  0x000055c3cd782bfc in ha_maria::rnd_pos (this=0x14aae03afae0, buf=0x14aae03af8b0 "\377", pos=0x14aae03b0318 "\234") at /test/11.5_dbg/storage/maria/ha_maria.cc:2662
      #7  0x000055c3cd552484 in handler::ha_rnd_pos (this=0x14aae03afae0, buf=0x14aae03af8b0 "\377", pos=0x14aae03b0318 "\234") at /test/11.5_dbg/sql/handler.cc:3707
      #8  0x000055c3cd1078f6 in rr_from_pointers (info=0x14ab28066fc0) at /test/11.5_dbg/sql/records.h:82
      #9  0x000055c3cd488ed9 in READ_RECORD::read_record (this=0x14ab28066fc0) at /test/11.5_dbg/sql/records.h:81
      #10 compute_window_func (thd=thd@entry=0x14aae0000d48, window_functions=@0x14aae001e318: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14aae001e338, last = 0x14aae001e338, elements = 1}, <No data fields>}, cursor_managers=@0x14ab280670b0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14aae0078998, last = 0x14aae0078998, elements = 1}, <No data fields>}, tbl=tbl@entry=0x14aae03ae810, filesort_result=filesort_result@entry=0x14aae03bcb60) at /test/11.5_dbg/sql/sql_window.cc:2892
      #11 0x000055c3cd489256 in Window_func_runner::exec (this=this@entry=0x14aae001e310, thd=thd@entry=0x14aae0000d48, tbl=0x14aae03ae810, filesort_result=0x14aae03bcb60) at /test/11.5_dbg/sql/sql_window.cc:3046
      #12 0x000055c3cd48937b in Window_funcs_sort::exec (this=0x14aae001e308, join=join@entry=0x14aae001c478, keep_filesort_result=<optimized out>) at /test/11.5_dbg/sql/sql_window.cc:3074
      #13 0x000055c3cd489af4 in Window_funcs_computation::exec (this=0x14aae001e2e8, join=join@entry=0x14aae001c478, keep_last_filesort_result=keep_last_filesort_result@entry=true) at /test/11.5_dbg/sql/sql_window.cc:3203
      #14 0x000055c3cd298766 in AGGR_OP::end_send (this=this@entry=0x14aae001e198) at /test/11.5_dbg/sql/sql_select.cc:32634
      #15 0x000055c3cd298c42 in sub_select_postjoin_aggr (join=0x14aae001c478, join_tab=0x14aae00778c0, end_of_records=<optimized out>) at /test/11.5_dbg/sql/sql_select.cc:23312
      #16 0x000055c3cd2a5994 in do_select (procedure=<optimized out>, join=0x14aae001c478) at /test/11.5_dbg/sql/sql_select.cc:23147
      #17 JOIN::exec_inner (this=this@entry=0x14aae001c478) at /test/11.5_dbg/sql/sql_select.cc:5010
      #18 0x000055c3cd2a5ed2 in JOIN::exec (this=this@entry=0x14aae001c478) at /test/11.5_dbg/sql/sql_select.cc:4796
      #19 0x000055c3cd2a3d22 in mysql_select (thd=thd@entry=0x14aae0000d48, tables=0x14aae001b398, fields=@0x14aae001ac10: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14aae001b338, last = 0x14aae001b338, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x14aae001c450, unit=0x14aae00051e0, select_lex=0x14aae001a958) at /test/11.5_dbg/sql/sql_select.cc:5326
      #20 0x000055c3cd2a454b in handle_select (thd=thd@entry=0x14aae0000d48, lex=lex@entry=0x14aae0005100, result=result@entry=0x14aae001c450, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/11.5_dbg/sql/sql_select.cc:628
      #21 0x000055c3cd20005e in execute_sqlcom_select (thd=thd@entry=0x14aae0000d48, all_tables=0x14aae001b398) at /test/11.5_dbg/sql/sql_parse.cc:6140
      #22 0x000055c3cd208752 in mysql_execute_command (thd=thd@entry=0x14aae0000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.5_dbg/sql/sql_parse.cc:3949
      #23 0x000055c3cd1f95f4 in mysql_parse (thd=thd@entry=0x14aae0000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14ab28068270) at /test/11.5_dbg/sql/sql_parse.cc:7862
      #24 0x000055c3cd210648 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14aae0000d48, packet=packet@entry=0x14aae000b1e9 "", packet_length=packet_length@entry=75, blocking=blocking@entry=true) at /test/11.5_dbg/sql/sql_class.h:1618
      #25 0x000055c3cd21311d in do_command (thd=0x14aae0000d48, blocking=blocking@entry=true) at /test/11.5_dbg/sql/sql_parse.cc:1405
      #26 0x000055c3cd399ce7 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c3d0db5ba8, put_in_cache=put_in_cache@entry=true) at /test/11.5_dbg/sql/sql_connect.cc:1445
      #27 0x000055c3cd39a29c in handle_one_connection (arg=arg@entry=0x55c3d0db5ba8) at /test/11.5_dbg/sql/sql_connect.cc:1347
      #28 0x000055c3cd820d36 in pfs_spawn_thread (arg=0x55c3d0d08f08) at /test/11.5_dbg/storage/perfschema/pfs.cc:2201
      #29 0x000014ab2ac79609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #30 0x000014ab2a865133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.34 (dbg), 10.5.26 (dbg), 10.6.18 (dbg), 10.11.8 (dbg), 11.0.6 (dbg), 11.1.5 (dbg), 11.2.4 (dbg), 11.3.3 (dbg), 11.4.2 (dbg), 11.5.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.34 (opt), 10.5.26 (opt), 10.6.18 (opt), 10.11.8 (opt), 11.0.6 (opt), 11.1.5 (opt), 11.2.4 (opt), 11.3.3 (opt), 11.4.2 (opt), 11.5.1 (opt)

      Attachments

        Activity

          People

            monty Michael Widenius
            ramesh Ramesh Sivaraman
            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.