Please check if ALL_O_DIRECT is ON if InnoDB log I/O fails with errno == 22 "Invalid argument"

Bug #1578604 reported by Sveta Smirnova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.5
Fix Released
Medium
Laurynas Biveinis
5.6
Fix Released
Medium
Laurynas Biveinis
5.7
Fix Released
Medium
Laurynas Biveinis

Bug Description

In case, described in bug #1155156, MySQL Server fails with errno == 22 "Invalid argument", because innodb_flush_method was set to ALL_O_DIRECT and logs became unusable due to bug #1529885.

Issue here is what error message is not clear and does not shed light on what really was going on. Also, even if bug #1155156 will be fixed, suggested error message would not help in case if reason of the error would be ALL_O_DIRECT. Therefore it is better to have one more check in code: for ALL_O_DIRECT and if reason of failure is this add additional message into error log which will ask the user to file a bug with us with innodb-log-block-size/innodb-log-writeahead-area setting depending on the version, the details of filesystem where the log resides, (so we can align our buffers in the source code correctly), and as a
workaround suggest to remove ALL_O_DIRECT.

Tags: xtradb i64171
tags: added: xtradb
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Sveta, a tentative fix produces the following output in the error log, please check if OK (the very first and the very last lines come from context that is likely to be different in the real occurences, this is a simulated testcase error). The line with innodb_log_block_size is only printed if the variable has a non-default value.

InnoDB: Database physically writes the file full: wait...
160506 15:16:43 InnoDB: Error: Write to file ./ib_logfile0 failed at offset 0 0.
InnoDB: 1048576 bytes should have been written, only 0 were written.
InnoDB: Operating system error number 22.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 22 means 'Invalid argument'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html
InnoDB: the error might be caused by redo log I/O not satisfying innodb_flush_method=ALL_O_DIRECT requirements by the underlying file system.
InnoDB: this might be caused by an incompatible non-default innodb_log_block_size value 4096.
InnoDB: please file a bug at https://bugs.percona.com and include this error message, my.cnf settings, and information about the file system where the redo log resides.
InnoDB: a possible workaround is to change innodb_flush_method value to something else than ALL_O_DIRECT.
InnoDB: Error in creating ./ib_logfile0: probably out of disk space
160506 15:16:43 [ERROR] Plugin 'InnoDB' init function returned error.

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Looks good for me

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1709

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.