Bug #117210 MySQL 8.0.39/40 crashed due to Assertion failure error when running TRUNCATE
Submitted: 15 Jan 12:45 Modified: 15 Jan 18:27
Reporter: IVAN HO Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: DDL Severity:S3 (Non-critical)
Version:8.0.40 OS:Any (8)
Assigned to: CPU Architecture:Any
Tags: assertion failure, ha_innodb.cc, MY-013183

[15 Jan 12:45] IVAN HO
Description:
MySQL 8.0.39/40 crashed with "signal 6" error due to Assertion failure error when running TRUNCATE TABLE. We have many customers encountered this crash event due to TRUNCATE TABLE recently. This problem has never happened when we were using 8.0.36 or before. Our customers have used the platform many years, starting from 5.6 and 5.7. 

How to repeat:
NIL

Suggested fix:
There are 2 suggested fix :
1. Run 'OPTIMIZE TABLE' first, then run 'TRUNCATE TABLE'
2. Run 'create table table1_dummy like table1' , then run 'drop table table1' , finally run 'rename table table1_dummy to table1'
[15 Jan 12:46] IVAN HO
mysql error log

Attachment: mysqld_errorlog.txt (text/plain), 22.39 KiB.

[15 Jan 13:30] MySQL Verification Team
Hi Mr. HO,

Thank you very much for your bug report.

We have searched our entire bugs database and we have not found a single crash like the one that you describe.

Hence, we can not proceed without a fully reproducible test case. That test case should consist from a set of SQL statements leading always to the crash with a stacktrace like the one that you provided.

Without a test case,  we can not proceed.

Can't repeat.
[15 Jan 18:27] IVAN HO
I cannot provide test case for you because the crash events happened on some existing innodb tables only. When we re-create the tables using the above suggested fix, the new tables do not have problems. Therefore, we suspect whether the tables have corrupted pages. I've used innochecksum to check the ibd files but no errors come out. Besides, there are no error messages regarding corrupted pages when mysql starts up. Insert/Update/Delete operations on these tables are working properly as well.
[16 Jan 11:29] MySQL Verification Team
Hi Mr. HO,

This is a forum for the reports with fully repeatable test cases.

Hence, without such a test case, we can not proceed.