Bug #61565 MySQL Randomly Crashes when Loading a Blob
Submitted: 20 Jun 2011 0:58 Modified: 20 Jul 2011 11:26
Reporter: Damian Nave Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:5.5.12 OS:Any
Assigned to: CPU Architecture:Any

[20 Jun 2011 0:58] Damian Nave
Description:
Mysql Ramdonly Crashes with Error below

InnoDB: Operating system error number 6 in a file operation.

Error has occured with the following versions :
5.1.46
5.1.57
5.5.12

Server is :
Windows 2008 Server SP2 64bit
16 vCPUs, 3GB RAM
Vmware ESX 4.1

Error has occured in two different ways.

1. While the application is running, randomly when a user uploads a BLOB object into a table
2. When objects containing blobs were loaded from backup (see how to repeat).

Note I could not recreate the load error on the same MYSQL version with the same data running on Windows 7. Therefore i would suggest this is an issue between mysql and windows server 2008.

Error log dump below

110614 11:46:50 [Note] Plugin 'FEDERATED' is disabled.
110614 11:46:50  InnoDB: Initializing buffer pool, size = 513.0M
110614 11:46:50  InnoDB: Completed initialization of buffer pool
110614 11:46:51  InnoDB: Started; log sequence number 2 4186512692
110614 11:46:51 [Note] Event Scheduler: Loaded 0 events
110614 11:46:51 [Note] C:\MySQL5\bin\mysqld: ready for connections.
Version: '5.1.57-community'  socket: ''  port: 3306  MySQL Community Server (GPL)
110620 10:22:35  InnoDB: Operating system error number 6 in a file operation.
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 operation call: 'flush'.
InnoDB: Cannot continue operation.

How to repeat:
I was able to cause this issue by doing the following :

I installed version 5.5.12 on the server and reloaded all tables in my database with the exception of 2.

The two not loaded were large tables (2GB+) and contained BLOB fields which contain images and pdf files.

On attempting to load each of these tables (using mysql workbench) the mysql service would fail with the error listed above.

Suggested fix:
Unknown
[20 Jun 2011 9:43] MySQL Verification Team
From winerror.h:
#define ERROR_INVALID_HANDLE             6L

I'd start by disabling antivirus scanners, preventing sharing of the volume,  disabling filesystem backups while mysqld runs, stopping indexing services etc..
[20 Jun 2011 11:26] MySQL Verification Team
Please see last comment from Shane. Thanks.
[20 Jul 2011 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".