Bug #73952 Cannot open './/ib_buffer_pool' for reading
Submitted: 17 Sep 2014 15:08 Modified: 7 Nov 2014 22:55
Reporter: Terry Derks Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.6.x OS:Any
Assigned to: CPU Architecture:Any
Tags: innodb_buffer_pool_load_at_startup

[17 Sep 2014 15:08] Terry Derks
Description:
innodb_buffer_pool_load_at_startup will cause mysqld to be unable to start if innodb_buffer_pool_dump_at_shutdown was not previously specified in the previous running instance due to there being no file to load yet.

Expected behavior:
If there is nothing to load, skip the step and continue gracefully (and logging as a warning, not an error). Next time it restarts, it will have something to load.

How to repeat:
1. Start with a MySQL 5.6 installation which has never had innodb_buffer_pool_dump_at_shutdown enabled
2. Enable both innodb_buffer_pool_dump_at_shutdown AND innodb_buffer_pool_load_at_startup
3. Restart mysqld. Since the previous instance of mysqld did not dump at shutdown, it will fail to start the next instance of mysqld when it attempts to load at startup. Error:
Cannot open './/ib_buffer_pool' for reading: No such file or directory
To fix mysqld once it's in this state:
4. Temporarily comment out innodb_buffer_pool_load_at_startup, but keep innodb_buffer_pool_dump_at_shutdown in there and restart
5. Uncomment innodb_buffer_pool_load_at_startup and restart

Suggested fix:
This shouldn't be too hard to fix. try-catch the part of code reading ib_buffer_pool, and if it cannot read the file, skip loading the pool at startup and continue on after printing a warning.
[7 Oct 2014 22:55] MySQL Verification Team
I couldn't repeat. Any clue why?.

C:\dbs>type my.ini | findstr innodb_buffer_pool
#innodb_buffer_pool_dump_at_shutdown=ON
#innodb_buffer_pool_load_at_startup=ON

C:\dbs>NET START mysqld56
The MySQLD56 service is starting.
The MySQLD56 service was started successfully.

C:\dbs>type my.ini | findstr innodb_buffer_pool
innodb_buffer_pool_dump_at_shutdown=ON
innodb_buffer_pool_load_at_startup=ON

C:\dbs>56

C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 --debug-info --prompt="mysql 5.6 > "
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.22 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.6 > SHOW VARIABLES LIKE '%innodb_buffer_pool%';
+-------------------------------------+----------------+
| Variable_name                       | Value          |
+-------------------------------------+----------------+
| innodb_buffer_pool_dump_at_shutdown | OFF            |
| innodb_buffer_pool_dump_now         | OFF            |
| innodb_buffer_pool_filename         | ib_buffer_pool |
| innodb_buffer_pool_instances        | 8              |
| innodb_buffer_pool_load_abort       | OFF            |
| innodb_buffer_pool_load_at_startup  | OFF            |
| innodb_buffer_pool_load_now         | OFF            |
| innodb_buffer_pool_size             | 134217728      |
+-------------------------------------+----------------+
8 rows in set (0.00 sec)

mysql 5.6 > exit
Bye

C:\dbs>NET STOP mysqld56
The MySQLD56 service is stopping.
The MySQLD56 service was stopped successfully.

C:\dbs>NET START mysqld56
The MySQLD56 service is starting.
The MySQLD56 service was started successfully.

C:\dbs>56

C:\dbs>c:\dbs\5.6\bin\mysql -uroot --port=3560 --debug-info --prompt="mysql 5.6 > "
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.6.22 Source distribution

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql 5.6 > SHOW VARIABLES LIKE '%innodb_buffer_pool%';
+-------------------------------------+----------------+
| Variable_name                       | Value          |
+-------------------------------------+----------------+
| innodb_buffer_pool_dump_at_shutdown | ON             |
| innodb_buffer_pool_dump_now         | OFF            |
| innodb_buffer_pool_filename         | ib_buffer_pool |
| innodb_buffer_pool_instances        | 8              |
| innodb_buffer_pool_load_abort       | OFF            |
| innodb_buffer_pool_load_at_startup  | ON             |
| innodb_buffer_pool_load_now         | OFF            |
| innodb_buffer_pool_size             | 134217728      |
+-------------------------------------+----------------+
8 rows in set (0.00 sec)

mysql 5.6 >
[8 Nov 2014 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".