Bug #80029 [ERROR] InnoDB: Cannot allocate 0 bytes: Success weird error message
Submitted: 18 Jan 2016 10:26 Modified: 10 Mar 2016 9:35
Reporter: Shahriyar Rzayev Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.10 OS:CentOS (7)
Assigned to: CPU Architecture:Any

[18 Jan 2016 10:26] Shahriyar Rzayev
Description:
After recovering from backup after first start, there is an Error message with Success status:

2016-01-18T09:48:05.386981Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-01-18T09:48:05.387104Z 0 [ERROR] InnoDB: Cannot allocate 0 bytes: Success

Also there is a [NOTE] (just a note):

2016-01-18T09:48:05.387180Z 0 [Note] InnoDB: not started

But in fact it is started i can even query InnoDB table:

mysql> select count(*) from sbtest1;
+----------+
| count(*) |
+----------+
|  1705515 |
+----------+
1 row in set (0,42 sec)

2016-01-18T09:48:05.386981Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2016-01-18T09:48:05.387104Z 0 [ERROR] InnoDB: Cannot allocate 0 bytes: Success
2016-01-18T09:48:05.387110Z 0 [Note] Plugin 'FEDERATED' is disabled.
2016-01-18T09:48:05.387180Z 0 [Note] InnoDB: not started
2016-01-18T09:48:05.394209Z 0 [Note] Salting uuid generator variables, current_pid: 19912, server_start_time: 1453110484, bytes_sent: 0, 

How to repeat:
The test tree for Xtrabackup based on MySQL 5.7.10:

https://github.com/gl-sergei/percona-xtrabackup/tree/xb-5.7.9

Just take full backup, prepare and restore.

Suggested fix:
[root@mysql-57 mysql]# ls -l /var/lib/mysql/ib_buffer_pool
-rw-r-----. 1 mysql mysql 0 янв 18 04:25 /var/lib/mysql/ib_buffer_pool

As @Valerii suggests:

if (dump == NULL) {
               fclose(f);
               buf_load_status(STATUS_ERR,
                               "Cannot allocate " ULINTPF " bytes: %s",
                               (ulint) (dump_n * sizeof(*dump)),
                               strerror(errno));
               return;
       }

Allocating 0 bytes returned NULL successfully
[20 Jan 2016 9:33] Shahriyar Rzayev
The tree for XB based on MySQL 5.7.10 updated:

https://github.com/percona/percona-xtrabackup/tree/2.4
[21 Jan 2016 18:34] MySQL Verification Team
Hi,

We do not use Xtrabackup. We also do not support Xtrabackup. We support our tools only.

Can you simply make a test case which would just include your data and which would cause the error that is presented in this bug ????
[22 Feb 2016 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".
[9 Mar 2016 10:38] Gustaf Thorslund
Hi Shahriyar,

Despite what's already been said regarding us not using nor supporting Xtrabackup I tried to reproduce this bug. What I did was to:

1) Create a test database 'test'
2) Populate it with a table 't1'
3) Inserted two rows
4) Ran xtrabackup
5) Prepared a the backup
6) Packed up the test database in a tar-file
7) Removed the test database from the filesystem
8) Stopped mysqld
9) Unpacked the tar-file and set file permissions 
10) Started mysqld
11) Tried to find the reported note in the error log

If you can reproduce the bug with a similar scenario and attach a backup you can share, please do so. If not, I'm afraid this bug will be closed as "Can't repeat" or "Not a bug".

/Gustaf
[9 Mar 2016 12:08] Shahriyar Rzayev
Hi Gustaf,

In fact I could not reproduce same issue anymore, accidentally i have removed my test VM while doing host upgrade :(