| Bug #26662 | mysqld assertion when creating temporary (InnoDB) table on a tmpfs filesystem | ||
|---|---|---|---|
| Submitted: | 27 Feb 2007 4:33 | Modified: | 30 Apr 2007 16:42 |
| Reporter: | Arjen Lentz | ||
| Status: | Closed | ||
| Category: | Server: InnoDB | Severity: | S2 (Serious) |
| Version: | 5.0, 5.1 | OS: | Linux (linux) |
| Assigned to: | Vasil Dimov | Target Version: | |
| Tags: | assertion, temporary table, innodb, tmpfs, crash | ||
[27 Feb 2007 4:33]
Arjen Lentz
[27 Feb 2007 15:17]
Sveta Smirnova
Thank you for the report. Bug is not repeatable on virtual 32-bit Ubuntu. Please provide output of SHOW TABLE STATUS account;
[27 Feb 2007 22:31]
Arjen Lentz
Sveta, another possible relevant setting is innodb_flush_method = O_DIRECT Sinisa reckons the assert fail may be due to that - the OS open() call might report O_DIRECT to be the invalid parameter for tmpfs. In that case, a possible fix could be to catch this specific error, and try again without O_DIRECT - for a smart fix, anything with the same path could be handled that way in the future. InnoDB could keep track of the flag separately for tmpdir and datadir, there should not be any other paths.
[28 Feb 2007 9:05]
Sveta Smirnova
Thank you for the additional comment. Verified as described with option "innodb_flush_method = O_DIRECT"
[28 Feb 2007 9:06]
Sveta Smirnova
Verified using empty table and 5.0.34 server.
[9 Mar 2007 16:54]
Heikki Tuuri
Hmm... the retry fix of http://bugs.mysql.com/bug.php?id=9709 could also test a non-O_DIRECT open if O_DIRECT fails.
[12 Mar 2007 1:06]
Arjen Lentz
Heikki, if it is related then the open call should immediately be re-tried without O_DIRECT, not sleep one second first.
[14 Mar 2007 17:32]
Vasil Dimov
Grab
[29 Mar 2007 22:42]
Vasil Dimov
Fix for this bug has been committed to the 5.0 and 5.1 InnoDB svn trees. Generally it calls open(2) without O_DIRECT and then tries to set it using fcntl(2), this way an error caused by O_DIRECT not being supported can easily be distinguished by other errors and skipped. Additionally, on Solaris directio() is called instead of fcntl(). Thus "innodb_flush_method = O_DIRECT" should now work on Solaris too.
[19 Apr 2007 4:57]
Timothy Smith
Patch queued into 5.0- and 5.1-maint, will be merged up to top repos as soon as possible.
[20 Apr 2007 11:55]
Vasil Dimov
http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html currently reads: If O_DIRECT is specified (available on some GNU/Linux versions), InnoDB uses O_DIRECT to open the data files it should be changed to something like: If O_DIRECT is specified (available on some GNU/Linux versions, FreeBSD and Solaris), InnoDB uses O_DIRECT (or directio() on Solaris) to open the data files
[26 Apr 2007 13:34]
Bugs System
Pushed into 5.0.42
[26 Apr 2007 13:35]
Bugs System
Pushed into 5.1.18-beta
[30 Apr 2007 16:42]
MC Brown
A note has been added to the 5.0.42 and 5.1.18 changelogs. The documentation has also been updated to show the change in open() method.
