Bug #97697 MySQL Crash during query from query cache
Submitted: 20 Nov 2019 3:48 Modified: 21 Nov 2019 8:04
Reporter: Fengchun Hua Email Updates:
Status: Can't repeat Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.7.25 OS:Any
Assigned to: CPU Architecture:Any

[20 Nov 2019 3:48] Fengchun Hua
When we do Alter Table modify column(Innodb rebuilt this table). MySQL server crashed(sig 11). Here is the stack(line number may not accurate).


MySQL crashed at lock-lock.cc:lock_table_get_n_locks 
//line: n_table_locks = UT_LIST_GET_LEN(table->locks);

sig 11 means table pointer which from table_cache is invalid(should not be a null pointer).

According to my analysis, at the end of this DDL, table in cache should be invalid, but somehow, this query still get the invalid table pointer, and this invalid pointer lead to this crash. Maybe due to some race conditions.

How to repeat:
I have no idea how to repeat it.

Suggested fix:
No suggested fix.
[20 Nov 2019 12:26] MySQL Verification Team
Hi Mr. Hua,

Thank you for your bug report.

However, we can not repeat it , nor can we fix it, for several reasons.

First of all, from the stacktrace it is quite evident that you are not using our binary. You are using a binary from some of our forks. We do not fix other people's bugs.

Second of all, you are using query cache, which is deprecated and we do not fix its bugs in 5.7. 8.0 does not have any query cache, because as I wrote , it is deprecated.

Third, if you manage to repeat the cache with our binary and without query cache, then we would need. a repeatable test case.
[21 Nov 2019 8:04] Fengchun Hua
Thank you for your reply. We will disable query_cache.
[21 Nov 2019 13:00] MySQL Verification Team
You are welcome.