Bug #92187 | [InnoDB] InnoDB: Assertion failure: btr0btr.ic:133:level <= 50 | ||
---|---|---|---|
Submitted: | 25 Aug 2018 7:16 | Modified: | 9 May 2019 13:28 |
Reporter: | Roel Van de Paar | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S6 (Debug Builds) |
Version: | 8.0.12 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[25 Aug 2018 7:16]
Roel Van de Paar
[25 Aug 2018 7:18]
Roel Van de Paar
Rest of stack entry=0x7f056ac94eb8, rec=0x7f057f7ca438, big_rec=0x7f057f7ca430, n_ext=0, thr=0x0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0cur.cc:3041 #27 0x0000564cb5c9a84b in btr_insert_on_non_leaf_level_func (flags=7, index=0x7f056acf3db8, level=46, tuple=0x7f056ac94eb8, file=0x564cb6eebf28 "/git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc", line=2109, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:1998 #28 0x0000564cb5c9af09 in btr_attach_half_pages (flags=7, index=0x7f056acf3db8, block=0x7f057436b740, split_rec=0x7f0576b2008b "\200", new_block=0x7f0574375838, direction=112, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2109 #29 0x0000564cb5c9c4e2 in btr_page_split_and_insert (flags=7, cursor=0x7f057f7cb3a0, offsets=0x7f057f7cb398, heap=0x7f057f7cb390, tuple=0x7f056ac944b8, n_ext=0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2469 #30 0x0000564cb5cb600c in btr_cur_pessimistic_insert (flags=7, cursor=0x7f057f7cb3a0, offsets=0x7f057f7cb398, heap=0x7f057f7cb390, entry=0x7f056ac944b8, rec=0x7f057f7cb388, big_rec=0x7f057f7cb380, n_ext=0, thr=0x0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0cur.cc:3041 ... #200 0x0000564cb5c9af09 in btr_attach_half_pages (flags=7, index=0x7f056acf3db8, block=0x7f0574362f88, split_rec=0x7f0576a7408b "\200", new_block=0x7f057436d080, direction=112, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2109 #201 0x0000564cb5c9c4e2 in btr_page_split_and_insert (flags=7, cursor=0x7f057f7f4610, offsets=0x7f057f7f4608, heap=0x7f057f7f4600, tuple=0x7f056ac5b5b8, n_ext=0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2469 #202 0x0000564cb5cb600c in btr_cur_pessimistic_insert (flags=7, cursor=0x7f057f7f4610, offsets=0x7f057f7f4608, heap=0x7f057f7f4600, entry=0x7f056ac5b5b8, rec=0x7f057f7f45f8, big_rec=0x7f057f7f45f0, n_ext=0, thr=0x0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0cur.cc:3041 #203 0x0000564cb5c9a84b in btr_insert_on_non_leaf_level_func (flags=7, index=0x7f056acf3db8, level=2, tuple=0x7f056ac5b5b8, file=0x564cb6eebf28 "/git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc", line=2109, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:1998 #204 0x0000564cb5c9af09 in btr_attach_half_pages (flags=7, index=0x7f056acf3db8, block=0x7f0574362c60, split_rec=0x7f0576a7008b "\200", new_block=0x7f057436cd58, direction=112, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2109 #205 0x0000564cb5c9c4e2 in btr_page_split_and_insert (flags=7, cursor=0x7f057f7f5560, offsets=0x7f057f7f5558, heap=0x7f057f7f5550, tuple=0x7f056ac5a6b8, n_ext=0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2469 #206 0x0000564cb5cb600c in btr_cur_pessimistic_insert (flags=7, cursor=0x7f057f7f5560, offsets=0x7f057f7f5558, heap=0x7f057f7f5550, entry=0x7f056ac5a6b8, rec=0x7f057f7f5548, big_rec=0x7f057f7f5540, n_ext=0, thr=0x0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0cur.cc:3041 #207 0x0000564cb5c9a84b in btr_insert_on_non_leaf_level_func (flags=3, index=0x7f056acf3db8, level=1, tuple=0x7f056ac5a6b8, file=0x564cb6eebf28 "/git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc", line=2109, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:1998 #208 0x0000564cb5c9af09 in btr_attach_half_pages (flags=3, index=0x7f056acf3db8, block=0x7f0574362938, split_rec=0x7f0576a6c094 "\200", new_block=0x7f057436ca30, direction=112, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2109 #209 0x0000564cb5c9c4e2 in btr_page_split_and_insert (flags=3, cursor=0x7f057f7f64f0, offsets=0x7f057f7f6498, heap=0x7f057f7f6490, tuple=0x7f056acf3a38, n_ext=0, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0btr.cc:2469 #210 0x0000564cb5cb600c in btr_cur_pessimistic_insert (flags=3, cursor=0x7f057f7f64f0, offsets=0x7f057f7f6498, heap=0x7f057f7f6490, entry=0x7f056acf3a38, rec=0x7f057f7f64a0, big_rec=0x7f057f7f6488, n_ext=0, thr=0x7f056ad569b8, mtr=0x7f057f7f6aa0) at /git/MS-8.0.12_dbg/storage/innobase/btr/btr0cur.cc:3041 #211 0x0000564cb5b54ed6 in row_ins_clust_index_entry_low (flags=3, mode=33, index=0x7f056acf3db8, n_uniq=1, entry=0x7f056acf3a38, n_ext=0, thr=0x7f056ad569b8, dup_chk_only=false) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:2531 #212 0x0000564cb5b56f48 in row_ins_clust_index_entry (index=0x7f056acf3db8, entry=0x7f056acf3a38, thr=0x7f056ad569b8, n_ext=0, dup_chk_only=false) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:3156 #213 0x0000564cb5b572d4 in row_ins_index_entry (index=0x7f056acf3db8, entry=0x7f056acf3a38, thr=0x7f056ad569b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:3261 #214 0x0000564cb5b578e1 in row_ins_index_entry_step (node=0x7f056ad566d8, thr=0x7f056ad569b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:3395 #215 0x0000564cb5b57c8f in row_ins (node=0x7f056ad566d8, thr=0x7f056ad569b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:3517 #216 0x0000564cb5b582cb in row_ins_step (thr=0x7f056ad569b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0ins.cc:3683 #217 0x0000564cb5b75eff in row_insert_for_mysql_using_ins_graph (mysql_rec=0x7f056acb0028 "\377\200", prebuilt=0x7f056ad560b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0mysql.cc:1556 #218 0x0000564cb5b76566 in row_insert_for_mysql (mysql_rec=0x7f056acb0028 "\377\200", prebuilt=0x7f056ad560b8) at /git/MS-8.0.12_dbg/storage/innobase/row/row0mysql.cc:1685 #219 0x0000564cb59a2f4e in ha_innobase::write_row (this=0x7f056ad54028, record=0x7f056acb0028 "\377\200") at /git/MS-8.0.12_dbg/storage/innobase/handler/ha_innodb.cc:7629 #220 0x0000564cb475ea54 in handler::ha_write_row (this=0x7f056ad54028, buf=0x7f056acb0028 "\377\200") at /git/MS-8.0.12_dbg/sql/handler.cc:7478 #221 0x0000564cb44e1424 in copy_data_between_tables (thd=0x7f056ac23000, psi=0x7f0593d331b8, from=0x7f056acc1c20, to=0x7f056acc2a20, create=..., copied=0x7f057f7f8400, deleted=0x7f057f7f8408, keys_onoff=Alter_info::LEAVE_AS_IS, alter_ctx=0x7f057f7faec0) at /git/MS-8.0.12_dbg/sql/sql_table.cc:14797 #222 0x0000564cb44de4c5 in mysql_alter_table (thd=0x7f056ac23000, new_db=0x7f056ad031a0 "test", new_name=0x7f056ad02a20 "t1", create_info=0x7f057f7fbe40, table_list=0x7f056ad02c18, alter_info=0x7f057f7fbf30) at /git/MS-8.0.12_dbg/sql/sql_table.cc:13970 #223 0x0000564cb49ae80e in Sql_cmd_create_or_drop_index_base::execute (this=0x7f056ad032d0, thd=0x7f056ac23000) at /git/MS-8.0.12_dbg/sql/sql_cmd_ddl_table.cc:378 #224 0x0000564cb4420536 in mysql_execute_command (thd=0x7f056ac23000, first_level=true) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:3228 #225 0x0000564cb4425f94 in mysql_parse (thd=0x7f056ac23000, parser_state=0x7f057f7fd330) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:4925 #226 0x0000564cb441baeb in dispatch_command (thd=0x7f056ac23000, com_data=0x7f057f7fdc90, command=COM_QUERY) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1607 #227 0x0000564cb441a3c6 in do_command (thd=0x7f056ac23000) at /git/MS-8.0.12_dbg/sql/sql_parse.cc:1232 #228 0x0000564cb45ba678 in handle_connection (arg=0x7f05823904c0) at /git/MS-8.0.12_dbg/sql/conn_handler/connection_handler_per_thread.cc:308 #229 0x0000564cb5f29422 in pfs_spawn_thread (arg=0x7f05883e7720) at /git/MS-8.0.12_dbg/storage/perfschema/pfs.cc:2836 #230 0x00007f05962686db in start_thread (arg=0x7f057f7fe700) at pthread_create.c:463 #231 0x00007f059495d88f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
[25 Aug 2018 7:35]
MySQL Verification Team
Hello Roel, Thank you for the report and test case. Observed that 8.0.12 debug build is affected. regards, Umesh
[9 May 2019 13:19]
Daniel Price
Posted by developer: commit 50e758ffddd70bc3363ee65a58e15a5b8bc1963d Author: Darshan M N <darshan.m.n@oracle.com> Date: Thu May 9 15:46:23 2019 +0530 Bug#28552330 - [INNODB] INNODB: ASSERTION FAILURE: BTR0BTR.IC:133:LEVEL <= 50 Issue ===== The case is that in case of a table with a primary key if we insert records in a descending manner (say 100, 99, 98, 97, etc), with optimistic_insert_debug set to 2, we see that for 104 records 52 levels are created which crosses the current limit of 51 levels. This seems to be a natural behaviour of btree and not really a production bug as it's reproducible only in the case when debug variable optimistic_insert_debug is set to 2 (i.e, max 2 records in a page) and to see such a scenario in production is unlikely. Fix === Return an error in such a case instead of a debug assert.
[9 May 2019 13:28]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.17 release, and here's the changelog entry: Under specific circumstances, setting the innodb_limit_optimistic_insert_debug variable to 2 raised a debug assertion when it should have reported an error.