MySQL Tips and Tricks
InnoDB: Error: Write to file ./database/table.ibd failed at offset 0 0
During our last update, we had the following happen
110627 17:01:34 InnoDB: Error: Write to file ./database/table.ibd failed at offset 0 0. InnoDB: 16384 bytes should have been written, only -1 were written. InnoDB: Operating system error number 9. 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 9 means 'Bad file descriptor'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html 110627 17:01:34 InnoDB: Assertion failure in thread 1182525760 in file os/os0file.c line 4254 InnoDB: Failing assertion: ret InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html InnoDB: about forcing recovery.
One of our stages during a release is a full reload of a bunch of static tables. We've never had this problem before, but it was related to the dropping of tables and then creation of new ones right away.
After a lot of thinking, I remembered I enabled lazy table drops! Disabling this feature fixed the issue. I loved the feature, but it wasn't worth a hard crash (nothing is!).
This was with Percona Server 5.1.56-rel12.7-log
.