Unexpected mysqld crashing in 5.5

An update of MySQL from 5.0 to 5.5 on CentOS 5.5 64bit has not resulted in a good experience. The mysqld process would then crash every few minutes with the following message.

101120 8:29:27 InnoDB: Operating system error number 22 in a file operation.
InnoDB: Error number 22 means ‘Invalid argument’.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
InnoDB: File name /tmpfs/#sql6cf3_5c_0.ibd
InnoDB: File operation call: ‘aio write’.
InnoDB: Cannot continue operation.

The work around was to change the tmpdir=/tmpfs (which was a 16G tmpfs filesystem) to a physical disk.

The referenced URL didn’t provide any more information of help. Unlike Bug #26662 O_DIRECT is not specified as the flush method.


  1. says

    I have reproduced this; steps to reproduce

    1. Set tmpdir to a tmpfs on Linux
    2. Create an innodb temporary table

    Reproducable crash. I don’t want to steal your thunder, you report it.

  2. says

    It seems a shame they did not add this test case to their test suite after Bug #26662 you mentioned above; the same circumstances trigger it.

  3. ronald says

    Thanks Mike@ I can’t contact you.

    Kernel is 2.6.18-194.26.1.el5 so I’ll add that to the list to try with the client. Second new thing I learned today.

  4. says

    That has something to do with the native AIO support in the newer InnoDB shipped with MySQL 5.5, though I have MySQL 5.5 installed on Ubuntu 10.04.1 LTS (Lucid Lynx) and its working perfectly fine,.

  5. says

    This is the kernel shipped with Redhat Enterprise Linux 5, a recent, widely used and well-supported OS. MySQL has the bug and it should be fixed.