[MDEV-20090] mysqld: dict0dict.ic:879: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `pos < index->n_def' failed. Created: 2019-07-18  Updated: 2019-10-29  Resolved: 2019-10-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4.7
Fix Version/s: 10.4.9

Type: Bug Priority: Critical
Reporter: Matthias Leich Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: File 000000.log     File MDEV-20090.cfg     File MDEV-20090.sh     File MDEV-20090.yy    
Issue Links:
Relates
relates to MDEV-18519 0x7f0118195700 InnoDB: Assertion fai... Closed
relates to MDEV-20117 Assertion `0' failed in row_sel_get_c... Closed

 Description   

Problem hit during RQG testing on
10.4.7 commit 5a95a33e309d0b2c6bc0f938ad925e3f74b0f921 2019-07-18
compiled with debug.
No replay on actual 10.3.
 
Version: '10.4.7-MariaDB-debug-log'  ...
mysqld: /work/10.4/storage/innobase/include/dict0dict.ic:879: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `pos < index->n_def' failed.
mysqld: /work/10.4/storage/innobase/include/dict0dict.ic:879: dict_field_t* dict_index_get_nth_field(const dict_index_t*, ulint): Assertion `pos < index->n_def' failed.
190718 13:19:53 [ERROR] mysqld got signal 6 ;
 
Some IMHO important characteristics of that problem
- neither FOREIGN KEYs nor FULLTEXT indexes nor virtual columns nor blobs are involved
- certain InnoDB system variables which are known to cause sometimes trouble are switched to "harmless" values
- only three concurrent sessions/threads are involved
 
Simplified RQG grammar MDEV-20090.yy (just for illustration, please use the uploaded file when trying to replay).
thread1:
    INSERT INTO t1 (col1, col_int) VALUES ( 4 , 4); ROLLBACK ;
thread1_connect:
     ;
thread1_init:
    CREATE TABLE IF NOT EXISTS t1 ( col1 INT PRIMARY KEY, col_int INTEGER ) ENGINE = InnoDB ROW_FORMAT = Dynamic ;
 
thread2:
    DELETE FROM t1 WHERE col1 = 4 OR col1 IS NULL ; COMMIT ;
thread2_connect:
     ;
thread2_init:
     ;
 
thread3:
    ALTER TABLE t1 ADD UNIQUE INDEX `uidx3` ( col_int ) , ALGORITHM = NOCOPY , LOCK = NONE |
    ALTER TABLE t1 ADD UNIQUE INDEX `uidx3` ( col_int ) , ALGORITHM = NOCOPY , LOCK = NONE |
    ALTER TABLE t1 ADD UNIQUE INDEX `uidx3` ( col_int ) , ALGORITHM = NOCOPY , LOCK = NONE |
    ALTER TABLE t1 ADD UNIQUE INDEX `uidx3` ( col_int ) , ALGORITHM = NOCOPY , LOCK = NONE |
    ALTER TABLE t1 ADD COLUMN col_int_copy INTEGER FIRST , ALGORITHM = NOCOPY , LOCK = NONE ; ALTER TABLE t1 DROP COLUMN IF EXISTS col_int , ALGORITHM = NOCOPY , LOCK = NONE ; ALTER TABLE t1 CHANGE COLUMN IF EXISTS col_int_copy col_int INTEGER , ALGORITHM = NOCOPY , LOCK = NONE ;
thread3_connect:
     ;
thread3_init:
     ;



 Comments   
Comment by Matthias Leich [ 2019-07-18 ]

Uploaded files:
000000.log - Protocol of my RQG run (includes backtrace)
MDEV-20090.yy - Simplified RQG grammar
MDEV-20090.cfg - Configuration file for rqg_batch.pl
MDEV-20090.sh - Shellscript
 
How to replay:
I had no luck with some MTR based brute force test.
So using RQG is currently required.
     Please show up because I have the required RQG infrastructure
or
     git clone https://github.com/mleich1/rqg --branch experimental RQG_mleich1
    cd RQG_mleich1
    Place the files MDEV-20090.* into that directory.
    ./SIMP.sh big_simplify.cfg <path to your binaries>
    

Comment by Marko Mäkelä [ 2019-08-21 ]

This could be duplicated by MDEV-20117. I posted a deterministic test case there.

Comment by Eugene Kosov (Inactive) [ 2019-10-29 ]

I wasn't able to reproduce this bug with up to date 10.4. I see no other crashes too.

Comment by Matthias Leich [ 2019-10-29 ]

No replay when testing with the simplified grammar (MDEV-20090.yy) and the full grammar (conf/mariadb/table_stress_innodb_nocopy.yy)
on 10.4 commit 576c96a9385f20cf4b6fe685e079dcf8026c3a24 2019-10-29.

Comment by Eugene Kosov (Inactive) [ 2019-10-29 ]

Most probably if was fixed in https://github.com/mariadb/server/commit/1f4ee3fa5a80e9715b0dc77b72fabb95a4045745

Generated at Thu Feb 08 08:56:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.