[MDEV-25107] Check TABLE .. EXTENDED returns Warning InnoDB: The B-tree of index ... is corrupted Created: 2021-03-10  Updated: 2021-03-11  Resolved: 2021-03-11

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: N/A
Fix Version/s: 10.4.19, 10.5.10, 10.6.0

Type: Bug Priority: Critical
Reporter: Matthias Leich Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: rr-profile

Attachments: File TBR-757.yy     File simp_TBR-757.cfg    
Issue Links:
Relates
relates to MDEV-24748 [ERROR] InnoDB: Field <wrong len>, As... Closed

 Description   

 
The server error log shows
[rr 1127005 47893]2021-03-11  2:42:46 15 [Note] InnoDB: Record in index `PRIMARY` of table `test`.`t1`, page [page id: space=6, page number=33], at offset 10656
[rr 1127005 47897]2021-03-11  2:42:46 15 [ERROR] InnoDB: Field 7 len is 499, should be 4; COMPACT RECORD(info_bits=0, 8 fields): {[4]   l(0x8000006C),[6]     %(0x000000000025),[7]    ?  (0x8C0000013F02CC),[4]   l(0x8000006C),NULL,[0+20](0x)(0x0000000000000000000000000000000000000000),[4]   l(0x8000006C),[499]1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111(0x31313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131
follwed by the SIGKILL sent by RQG because one connection had harvested a 
Warning InnoDB: The B-tree of index PRIMARY is corrupted
for a CHECK TABLE t1 EXTENDED.
sdp:/home/mleich/RQG_O/storage/1615459353/TBR-757/dev/shm/vardir/1615459353/1/1/rr
_RR_TRACE_DIR="." rr replay --mark-stdio
 
RQG
===
git clone https://github.com/mleich1/rqg --branch experimental RQG
 
perl rqg.pl \
--duration=300 \
--queries=10000000 \
--no_mask \
--seed=random \
--gendata=conf/mariadb/table_stress.zz \
--gendata_sql=conf/mariadb/table_stress.sql \
--rpl_mode=none \
--engine=InnoDB \
--mysqld=--log-output=none \
--mysqld=--net_write_timeout=60 \
--mysqld=--innodb-buffer-pool-size=64M \
--mysqld=--loose-debug_assert_on_not_freed_memory=0 \
--mysqld=--loose-idle_write_transaction_timeout=0 \
--mysqld=--wait_timeout=28800 \
--mysqld=--innodb-lock-wait-timeout=50 \
--mysqld=--net_read_timeout=30 \
--mysqld=--lock-wait-timeout=86400 \
--mysqld=--loose_innodb_lock_schedule_algorithm=fcfs \
--mysqld=--interactive_timeout=28800 \
--mysqld=--file-key-management-filename=$RQG_HOME/conf/mariadb/encryption_keys.txt \
--mysqld=--connect_timeout=60 \
--mysqld=--loose-max-statement-time=30 \
--mysqld=--slave_net_timeout=60 \
--mysqld=--plugin-load-add=file_key_management.so \
--mysqld=--loose-idle_readonly_transaction_timeout=0 \
--mysqld=--log_bin_trust_function_creators=1 \
--mysqld=--log-bin \
--mysqld=--loose-idle_transaction_timeout=0 \
--mysqld=--loose-table_lock_wait_timeout=50 \
--reporters=Backtrace,Deadlock1,ErrorLog \
--validators=None \
--grammar=TBR-757.yy \
--threads=3 \
--workdir=<local settings> \
--vardir=<local settings> \
--mtr-build-thread=<local settings> \
--basedir1=<local settings> \
--script_debug=_nix_ \
--rr=Server \
--rr_options=--chaos
 
      
The simplified RQG grammar contains
fill_end:
    AS CHAR),1,1), @fill_amount) ;
 
my_int:
    { $my_int= $prng->int( 65, 512) } ;
 
string_fill:
    REPEAT(SUBSTR(CAST( $my_int AS CHAR),1,1), 10) ;
 
thread1:
    CHECK TABLE t1 EXTENDED ;
 
thread1_connect:
    ;
 
thread1_init:
    CREATE TABLE t1 ( col1 INT PRIMARY KEY, col_int INTEGER , col_string INTEGER , col_text TEXT , col_int_g INTEGER GENERATED ALWAYS AS (col_int) PERSISTENT , col_text_g TEXT GENERATED ALWAYS AS (SUBSTR(col_text,1,499)) PERSISTENT ) ENGINE = InnoDB ROW_FORMAT = Dynamic ;
 
thread2:
    INSERT INTO t1 (col1, col_int, col_text) VALUES ( my_int , $my_int, REPEAT(SUBSTR(CAST( $my_int fill_end ) ;
 
thread2_connect:
    SET AUTOCOMMIT = 0; SET @fill_amount = (@@innodb_page_size / 2 ) + 1 ;
 
thread2_init:
    ;
 
 
 
No failure on check table in case of
- PERSISTENT replaced with VIRTUAL
- 10.5.9 or older 10.6 used
- InnoDB replaced with ARIA



 Comments   
Comment by Marko Mäkelä [ 2021-03-11 ]

This was a merge error that I made. Thanks to thiru for fixing it. I am resetting affected version to N/A, because no release was affected by this.

Generated at Thu Feb 08 09:35:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.