Bug #67606 | MySQL crashes with segmentation fault when disk quota is reached | ||
---|---|---|---|
Submitted: | 16 Nov 2012 10:15 | Modified: | 28 Dec 2012 23:47 |
Reporter: | Ovais Tariq | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.5.28 | OS: | Linux (CentOS 5.8) |
Assigned to: | CPU Architecture: | Any |
[16 Nov 2012 10:15]
Ovais Tariq
[16 Nov 2012 10:16]
Ovais Tariq
The gdb backtrace of the crash is attached. The section to look at is "Thread 1 (Thread 0x4987c940 (LWP 5669)):"
Attachment: gdb_backtrace_mysql_5528.txt (text/plain), 38.05 KiB.
[16 Nov 2012 11:25]
MySQL Verification Team
Thank you for the bug report. The error log file has a message is out of space before to crash?. Thanks.
[16 Nov 2012 11:37]
Ovais Tariq
Error log file of crashed MySQL
Attachment: mysql_5528_error_log.log (application/octet-stream, text), 6.12 KiB.
[16 Nov 2012 13:27]
MySQL Verification Team
Thank you for the feedback. Looks like duplicate with http://bugs.mysql.com/bug.php?id=66683 . Please check.
[16 Nov 2012 13:53]
MySQL Verification Team
and check http://bugs.mysql.com/bug.php?id=54430 also :)
[17 Nov 2012 7:24]
Ovais Tariq
Miguel, This does not look similar to 66683 as the traces are different, also InnoDB crashes but comes back up unlikes 66683 where I think it keeps crashing?
[17 Nov 2012 7:36]
Ovais Tariq
Shane, Indeed the messages reported in the error log are similar to what is mentioned in 54430. However, according to the fix suggested in that bug InnoDB is still going to crash after the read/write is tried a couple of times. I think more correct behaviour would be to emit the message "Table is full" and not proceed any further with a write query instead of crashing. This is the behaviour that happens under normal circumstances when there is no space available on disk: 121110 8:06:14 InnoDB: Error: Write to file ./ibdata1 failed at offset 0 113246208. InnoDB: 1048576 bytes should have been written, only 983040 were written. InnoDB: Operating system error number 122. 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 122 means 'Disk quota exceeded'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.5/en/operating-system-error-codes.html 121110 8:06:14 [ERROR] /usr/sbin/mysqld: The table 't1' is full 121110 8:06:24 [ERROR] /usr/sbin/mysqld: The table 't1' is full 121110 8:06:29 [ERROR] /usr/sbin/mysqld: The table 't1' is full 121110 8:07:08 [ERROR] /usr/sbin/mysqld: The table 't1' is full See how InnoDB did not crash but just emitted messages to the error log notifying that table is full. I think for my test case the behaviour should be similar, instead of InnoDB crashing.
[28 Dec 2012 23:47]
Sveta Smirnova
Thank you for the feedback. But version 5.7 does not crash in this case anymore: mysql> CREATE TABLE `t1` ( `i` int(11) not null auto_increment primary key, c char(255) default 'dummy_text' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.01 sec) mysql> insert into t1(i) values (null); Query OK, 1 row affected (0.00 sec) ... mysql> insert into t1 select null, c from t1; ERROR 1114 (HY000): The table 't1' is full Content of the error log file: Version: '5.7.1-m11-debug-log' socket: '/home/sveta/src/mysql-trunk/mysql-test/var/tmp/mysqld.1.sock' port: 13000 Source distribution 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 1048576 bytes should have been written. Only 385024 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 663552 bytes should have been written. Only 4096 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 659456 bytes should have been written. Only 4096 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 655360 bytes should have been written. Only 4096 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 651264 bytes should have been written. Only 4096 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: InnoDB: 647168 bytes should have been written. Only 4096 bytes written. Retrying again to write the remaining bytes. 2012-12-29 02:45:23 30915 [Warning] InnoDB: Retry attempts for writing partial data failed. 2012-12-29 02:45:23 7fa018353700 InnoDB: Error: Write to file ./ibdata1 failed at offset 12582912. InnoDB: 1048576 bytes should have been written, only 405504 were written. InnoDB: Operating system error number 28. 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 28 means 'No space left on device'. InnoDB: Some operating system error numbers are described at InnoDB: http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html 2012-12-29 02:45:23 30915 [ERROR] /home/sveta/src/mysql-trunk/sql/mysqld: The table 't1' is full 2012-12-29 02:45:24 30915 [Warning] InnoDB: InnoDB: 1048576 bytes should have been written. Only 12288 bytes written. Retrying So I am closing this report as duplicate of bug #54430