Bug #96224 | The MTR case innodb.innodb_corrupt_bit get a randomly coredump | ||
---|---|---|---|
Submitted: | 17 Jul 2019 3:12 | Modified: | 21 Oct 2019 12:21 |
Reporter: | shangshang yu | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 8.0.16 | OS: | CentOS |
Assigned to: | CPU Architecture: | x86 | |
Tags: | core dump, mtr |
[17 Jul 2019 3:12]
shangshang yu
[17 Jul 2019 10:40]
shangshang yu
change Severity
[18 Jul 2019 9:30]
MySQL Verification Team
Hello Shangshang yu, Thank you for the report. Verified as described with 8.0.16 source build(after patching to reproduce). regards, Umesh
[18 Jul 2019 9:31]
MySQL Verification Team
Test results - 8.0.16
Attachment: 96224_8.0.16.results (application/octet-stream, text), 187.03 KiB.
[12 Aug 2019 14:59]
Daniel Price
Posted by developer: Fixed as of the upcoming 8.0.18 release, and here's the changelog entry: It was possible for a corrupted table to be removed from the table cache before the reference count for the table reached zero.
[21 Oct 2019 12:21]
shangshang yu
I noticed that the solution for tha issue: commit id: 2fa2c6729cce71e616a82fb3156215f6f8ffcc8f /* Optionally remove this corrupted table from cache now if no other thread is still using it. If not, the corrupted bit will keep it from being used.*/ if (ib_table->get_ref_count() == 0) { dict_table_remove_from_cache(ib_table); } I agree the fix, but I have another question: Should we take the partition table into consider? The partition table have the same operations as normal table: Ha_innopart_share::open_one_table_part(...){ ... if (part_table->is_corrupted()) { dict_table_remove_from_cache(part_table); part_table = nullptr; } else if (part_table->discard_after_ddl) { btr_drop_ahi_for_table(part_table); dict_table_remove_from_cache(part_table); part_table = nullptr; cached = false; } else { if (!dd_table_match(part_table, dd_part)) { dict_set_corrupted(part_table->first_index()); dict_table_remove_from_cache(part_table); part_table = NULL; } else { part_table->acquire_with_lock(); } } ... }
[13 May 2022 6:43]
chengqing hu
Hi shangshang, I'm getting an error in 8.0.21, that looks like a problem with the partition table you said at the end. the error log: 2022-03-04T00:52:09.901886+08:00 602854 [ERROR] [MY-013183] [InnoDB] Assertion failure: dict0dict.cc:1888:table->get_ref_count() == 0 thread 140501494646528 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 16:52:09 UTC - mysqld got signal 6 ; Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware. Thread pointer: 0x7fc4740197f0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7fc90dadbdc0 thread_stack 0x40000 /usr/local/mysql/bin/mysqld(my_print_stacktrace(unsigned char const*, unsigned long)+0x2e) [0x1f40a3e] /usr/local/mysql/bin/mysqld(handle_fatal_signal+0x323) [0xfd02b3] /lib64/libpthread.so.0(+0xf630) [0x7fd23e3cc630] /lib64/libc.so.6(gsignal+0x37) [0x7fd23c3e3387] /lib64/libc.so.6(abort+0x148) [0x7fd23c3e4a78] /usr/local/mysql/bin/mysqld() [0xd4787a] /usr/local/mysql/bin/mysqld() [0x22e0330] /usr/local/mysql/bin/mysqld(dict_partitioned_table_remove_from_cache(char const*)+0xe9) [0x22e0929] /usr/local/mysql/bin/mysqld() [0x2015046] /usr/local/mysql/bin/mysqld() [0xf31164] /usr/local/mysql/bin/mysqld(mysql_alter_table(THD*, char const*, char const*, HA_CREATE_INFO*, TABLE_LIST*, Alter_info*)+0x707f) [0xf45b5f] /usr/local/mysql/bin/mysqld(Sql_cmd_alter_table::execute(THD*)+0x481) [0x12c2a61] /usr/local/mysql/bin/mysqld(mysql_execute_command(THD*, bool)+0x18ac) [0xea28cc] /usr/local/mysql/bin/mysqld(mysql_parse(THD*, Parser_state*)+0x348) [0xea69e8] /usr/local/mysql/bin/mysqld(dispatch_command(THD*, COM_DATA const*, enum_server_command)+0x15eb) [0xea844b] /usr/local/mysql/bin/mysqld(do_command(THD*)+0x174) [0xea99c4] /usr/local/mysql/bin/mysqld() [0xfc2058] /usr/local/mysql/bin/mysqld() [0x245661c] /lib64/libpthread.so.0(+0x7ea5) [0x7fd23e3c4ea5] /lib64/libc.so.6(clone+0x6d) [0x7fd23c4ab8dd] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (7fc474055f68): ALTER TABLE DTF_TRUNK_INFO ADD PARTITION (PARTITION p20220305 VALUES LESS THAN (UNIX_TIMESTAMP('2022-03-06'))) Connection ID (thread ID): 602854 Status: KILL_QUERY
[16 Jun 2022 3:01]
chengqing hu
./mtr my1 result
Attachment: my1.result (application/octet-stream, text), 6.90 KiB.