Bug #96577 InnoDB monitor can fill disk and crash MySQL
Submitted: 16 Aug 2019 20:41 Modified: 19 Aug 2019 10:52
Reporter: Carlos Tutte Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.6 , 5.7 and 8.0 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[16 Aug 2019 20:41] Carlos Tutte
Description:
As per the documentation: https://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html 

```InnoDB temporarily enables standard InnoDB Monitor output under the following conditions:

A long semaphore wait

InnoDB cannot find free blocks in the buffer pool

Over 67% of the buffer pool is occupied by lock heaps or the adaptive hash index```

Monitor will be printed on error.log indefinitely which can fill disk space and crash the server.

 

How to repeat:
This can be reproduced by setting a very small innodb_buffer_pool_size and generating very high load on the server with sysbench.

Suggested fix:
A suggested fix can be to print the outputs in a exponentially decay manner, like a few outputs in @15 seconds interval, it starts printing @30 seconds interval, then @60 second interval and so on, until a limit in which it will continue to be printed indefinitely but less often.
[19 Aug 2019 10:52] MySQL Verification Team
Hi,

I do not consider this a bug. MySQL is behaving as expected and as documented. HDD space is cheap, and any decent system admin will monitor disk space, rotate logs and react way before disk space becomes critical.