Bug #58421 | InnoDB temporary table crash when tmpdir on Linux tmpfs | ||
---|---|---|---|
Submitted: | 23 Nov 2010 16:37 | Modified: | 6 Feb 2012 20:44 |
Reporter: | Mark Robson | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S1 (Critical) |
Version: | 5.5.7 | OS: | Linux (Centos 5.5 x86_64) |
Assigned to: | Inaam Rana | CPU Architecture: | Any |
Tags: | linux tmpfs aio |
[23 Nov 2010 16:37]
Mark Robson
[23 Nov 2010 16:58]
Peter Laursen
There was another report about same recently. Somebody replied that you will need to use Kernel > some specific version to use TEMPFS asychroneously like this.
[23 Nov 2010 19:32]
Sveta Smirnova
Thank you for the report. This is duplicate of bug #58282 Workaround: use option innodb_use_native_aio
[3 Dec 2010 9:45]
Bjørn Munch
This is not a duplicate of Bug #58282, it's related. This bug is about fixing the server, the other bug is about a (partial) workaround for mtr. That will of course not fix the problem for a server not started via mtr.
[7 Dec 2010 13:50]
Marko Mäkelä
For what it is worth, I have not seen this bug on my laptop, even though I always run InnoDB on tmpfs. Suggested fix: When InnoDB opens a file, it should post an aio operation to read something from the file. If it fails, attempt synchronous I/O and set a flag in the fil_space_t object so that synchronous I/O will be used for this file in the future.
[30 Dec 2010 12:47]
Bjørn Munch
Any fix for this also needs to undo the workaround in Bug #58282 (just delete the added lines), otherwise it won't get tested when run with mtr.
[28 Nov 2011 15:20]
James Kesser
I have experienced these crashes in both Centos 5.5 and RHEL 5.6. Turning off innodb_use_native_aio fixed it in both cases.
[6 Feb 2012 20:44]
John Russell
Added to changelog for 5.5.21 / 5.6.5: The server could crash when creating an InnoDB temporary table under Linux, if the $TMPDIR setting points to a tmpfs filesystem and innodb_use_native_aio is enabled, as it is by default in MySQL 5.5.4 and higher. The entry in the error log looked like: 101123 2:10:59 InnoDB: Operating system error number 22 in a file operation. InnoDB: Error number 22 means Invalid argument. The crash occurred because asynchronous I/O is not supported on tmpfs in some Linux kernel versions. The workaround was to turn off the innodb_use_native_aio setting or use a different temporary directory. The fix causes InnoDB to turn off the innodb_use_native_aio setting automatically if it detects that the temporary file directory does not support asynchronous I/O.