Bug #111044 Assertion failure in buf0buf.cc::Buf_fetch<T>::read_page()
Submitted: 16 May 2023 13:12 Modified: 16 May 2023 15:20
Reporter: Oleksandr Kachan Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:8.0.33 OS:Fedora (36)
Assigned to: CPU Architecture:x86

[16 May 2023 13:12] Oleksandr Kachan
Description:
Server crashes in buf0buf.cc::Buf_fetch<T>::read_page()

[Note] [MY-011878] [InnoDB] Uncompressed page, stored checksum in field1 3735928559, calculated checksums for field1: crc32 2644368923/2862660124, innodb 3520823716, none 3735928559, stored checksum in field2 3735928559, calculated checksums for field2: crc32 2644368923/2862660124, innodb 3937884171, none 3735928559,  page LSN 0 0, low 4 bytes of LSN at page end 19226262, page number (if stored to page already) 0, space id (if created with >= MySQL-4.1.1 and stored already) 4243767290
InnoDB: Page may be a freshly allocated page
[Note] [MY-011907] [InnoDB] It is also possible that your operating system has corrupted its own file cache and rebooting your computer removes the error. If the corrupt page is an index page. You can also try to fix the corruption by dumping, dropping, and reimporting the corrupt table. You can use CHECK TABLE to scan your table for corruption. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
[ERROR] [MY-011899] [InnoDB] [FATAL] Unable to read page [page id: space=4243767290, page number=0] into the buffer pool after 100 attempts. The most probable cause of this error may be that the table has been corrupted. Or, the table was compressed with with an algorithm that is not supported by this instance. If it is not a decompress failure, you can try to fix this problem by using innodb_force_recovery. Please see http://dev.mysql.com/doc/refman/8.0/en/ for more details. Aborting...
[ERROR] [MY-013183] [InnoDB] Assertion failure: buf0buf.cc:4054:ib::fatal triggered thread 139924658505280

Backtrace:

#9  0x0000000004c39bb7 in my_abort () at mysys/my_init.cc:258
#10 0x000000000503c117 in ut_dbg_assertion_failed (expr=0x730c7a8 "ib::fatal triggered", file=0x734dd20 "storage/innobase/buf/buf0buf.cc", line=4054) at storage/innobase/ut/ut0dbg.cc:99
#11 0x00000000050492b9 in ib::fatal::~fatal (this=0x7f42bf907dc0, __in_chrg=<optimized out>) at storage/innobase/ut/ut0ut.cc:522
#12 0x00000000050ff5e2 in Buf_fetch<Buf_fetch_other>::read_page (this=0x7f42bf9080a0) at storage/innobase/buf/buf0buf.cc:4054
#13 0x00000000050ebae2 in Buf_fetch_other::get (this=0x7f42bf9080a0, block=@0x7f42bf908000: 0x0) at storage/innobase/buf/buf0buf.cc:3722
#14 0x00000000050ffebe in Buf_fetch<Buf_fetch_other>::single_page (this=0x7f42bf9080a0) at storage/innobase/buf/buf0buf.cc:4220
#15 0x00000000050ebf59 in buf_page_get_gen (page_id=..., page_size=..., rw_latch=4, guess=0x0, mode=Page_fetch::NORMAL, location=..., mtr=0x7f42bf908640, dirty_with_no_latch=false) at storage/innobase/buf/buf0buf.cc:4428
#16 0x0000000004cd90dd in buf_page_get (id=..., size=..., latch=4, location=..., mtr=0x7f42bf908640) at storage/innobase/include/buf0buf.h:428
#17 0x00000000052ad157 in xdes_get_descriptor (space_id=4243767290, offset=3, page_size=..., mtr=0x7f42bf908640) at storage/innobase/fsp/fsp0fsp.cc:625
#18 0x00000000052b829c in fseg_free_step (header=0x7f42bd3ec04a "\374\362\277", <incomplete sequence \372>, ahi=true, mtr=0x7f42bf908640) at storage/innobase/fsp/fsp0fsp.cc:3626
#19 0x000000000509fae6 in btr_free_but_not_root (block=0x7f42bc50f9e0, log_mode=MTR_LOG_NO_REDO) at storage/innobase/btr/btr0btr.cc:978
#20 0x000000000509fd85 in btr_free (page_id=..., page_size=...) at storage/innobase/btr/btr0btr.cc:1035
#21 0x00000000051aca7d in dict_drop_temporary_table_index (index=0x7f423c550628, root_page_no=3) at storage/innobase/dict/dict0crea.cc:466
#22 0x0000000004f065de in row_drop_table_for_mysql (name=0x7f42bf909ad0 "mysqld.1/#sql181736_2_a", trx=0x7f42be602818, nonatomic=true, handler=0x7f423c408c58) at storage/innobase/row/row0mysql.cc:4020
#23 0x0000000004ce36fb in innobase_basic_ddl::delete_impl<dd::Table> (thd=0xb6a67f0, name=0x7f423c54e670 "cmake-build-debug/mysql-test/var/tmp/mysqld.1/#sql181736_2_a", dd_tab=0x0, td=0x0)
    at storage/innobase/handler/ha_innodb.cc:14262
#24 0x0000000004cba78c in ha_innobase::delete_table (this=0x7f423c5a57b8, name=0x7f423c54e670 "cmake-build-debug/mysql-test/var/tmp/mysqld.1/#sql181736_2_a", table_def=0x0)
    at storage/innobase/handler/ha_innodb.cc:15305
#25 0x000000000399592d in handler::drop_table (this=0x7f423c5a57b8, name=0x7f423c54e670 "cmake-build-debug/mysql-test/var/tmp/mysqld.1/#sql181736_2_a") at sql/handler.cc:4643
#26 0x000000000399673d in handler::ha_drop_table (this=0x7f423c5a57b8, name=0x7f423c54e670 "cmake-build-debug/mysql-test/var/tmp/mysqld.1/#sql181736_2_a") at sql/handler.cc:5018
#27 0x00000000036e0aa0 in close_tmp_table (table=0x7f423c54d870) at sql/sql_tmp_table.cc:2446
#28 0x00000000036f4de8 in cleanup_tmp_tables (list=0x7f423c5996d8) at sql/sql_union.cc:2017
#29 0x00000000036f50dd in Query_block::cleanup (this=0x7f423c5884e8, full=true) at sql/sql_union.cc:2075
#30 0x00000000036f4691 in Query_expression::cleanup (this=0x7f423c588400, full=true) at sql/sql_union.cc:1850
#31 0x00000000036f516f in Query_block::cleanup (this=0x7f423c585578, full=true) at sql/sql_union.cc:2086
#32 0x00000000036f4691 in Query_expression::cleanup (this=0x7f423c585490, full=true) at sql/sql_union.cc:1850
#33 0x00000000034829f1 in LEX::cleanup (this=0x7f423c584b28, full=true) at sql/sql_lex.h:4080
#34 0x000000000392b64a in View_metadata_updater_context::~View_metadata_updater_context (this=0x7f42bf90a140, __in_chrg=<optimized out>) at sql/dd_sql_view.cc:109
#35 0x0000000003927fdd in open_views_and_update_metadata (thd=0xb6a67f0, views=0x7f42bf90b4c0, commit_dd_changes=false, uncommitted_tables=0x7f42bf90b650) at sql/dd_sql_view.cc:625
#36 0x0000000003928d28 in update_view_metadata<dd::View_table> (thd=0xb6a67f0, db=0x64eb220 "information_schema", tbl_or_sf_name=0x71fac5a "INNODB_TRX", commit_dd_changes=false, uncommitted_tables=0x7f42bf90b650) at sql/dd_sql_view.cc:752
#37 0x0000000003928518 in update_referencing_views_metadata (thd=0xb6a67f0, db=0x64eb220 "information_schema", table_name=0x71fac5a "INNODB_TRX", new_db=0x0, new_table_name=0x0, commit_dd_changes=false, uncommitted_tables=0x7f42bf90b650)
    at sql/dd_sql_view.cc:769
#38 0x000000000392877e in update_referencing_views_metadata (thd=0xb6a67f0, db_name=0x64eb220 "information_schema", table_name=0x71fac5a "INNODB_TRX", commit_dd_changes=false, uncommitted_tables=0x7f42bf90b650) at sql/dd_sql_view.cc:808
#39 0x0000000004bece3e in (anonymous namespace)::store_plugin_and_referencing_views_metadata (thd=0xb6a67f0, plugin=0x7f42bf90b818, arg=0x7f42bf90b990) at sql/dd/info_schema/metadata.cc:330
#40 0x00000000035ecd62 in plugin_foreach_with_mask (thd=0xb6a67f0, funcs=0x7f42bf90b8b0, type=4, state_mask=4294967287, arg=0x7f42bf90b990) at sql/sql_plugin.cc:2760
#41 0x00000000035ece39 in plugin_foreach_with_mask (thd=0xb6a67f0, func=0x4becc8c <(anonymous namespace)::store_plugin_and_referencing_views_metadata(THD*, plugin_ref, void*)>, type=4, state_mask=8, arg=0x7f42bf90b990) at sql/sql_plugin.cc:2773
#42 0x0000000004bed3bc in (anonymous namespace)::update_plugins_I_S_metadata (thd=0xb6a67f0) at sql/dd/info_schema/metadata.cc:417
#43 0x0000000004bee001 in dd::info_schema::update_I_S_metadata (thd=0xb6a67f0) at sql/dd/info_schema/metadata.cc:633
#44 0x0000000003920f1e in bootstrap::handle_bootstrap (arg=0x7ffcbb041ac0) at sql/bootstrap.cc:327
#45 0x00000000057f556d in pfs_spawn_thread (arg=0xb59d680) at storage/perfschema/pfs.cc:3042
#46 0x00007f42c5a8cdcd in start_thread (arg=<optimized out>) at pthread_create.c:442

How to repeat:
Run innodb.check_sector_size MTR test.
[16 May 2023 15:20] MySQL Verification Team
Hi Mr. Kachan,

Thank you for your bug report.

We must inform you that we have never got a report with a stacktrace like this. That means that this is a completely new bug.

However, in order to process this report, we need a fully repeatable test case.

Let us know when you have that test case for us.

Can't repeat.