Bug #624 Crash with RAID causing corruption
Submitted: 9 Jun 2003 13:15 Modified: 8 Feb 2005 19:45
Reporter: Richard Gabriel Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.0.13-Max OS:Linux (RedHat Linux 8.0)
Assigned to: CPU Architecture:Any

[9 Jun 2003 13:15] Richard Gabriel
Description:
mysqld-max crashes randomly causing table corruption.  This seems to have something to do with RAID:

mysqld-max: raid.cc:160: my_off_t my_raid_seek(int, long long unsigned int, int, int): Assertion `pos != (~(my_off_t) 0)' failed.

How to repeat:
I have not found a set pattern on this issue, but it has happened about 10 times in 30 days.  It usually surrounds table with lots of INSERTs and UPDATEs, but not always the same table.  Tables with few UPDATEs, but very many SELECTs seem to be less vulnerable.  This leads me to believe it's related to UPDATEs.
[9 Jun 2003 13:16] Richard Gabriel
Also, it does not seem to happen with InnoDB table, only MyISAM.
[3 Jul 2003 6:22] Michael Widenius
Are you 100 % sure that you are running 4.0.13 and not 4.0.12 or earlier.

In 4.0.13 we moved the assert down two lines to line 162 to not affect tables that doesn't use the RAID feature)

I did an extra check and unpacked our source archive and the patch was correctly done in it.
[3 Jul 2003 6:31] Richard Gabriel
I am using the RedHat RPM for MySQL 4.0.13-Max on the server, but running a 4.0.12 client.  Do you think that could have something to do with it?

I will be working to try to find a query that reproduces this soon, but it will be pretty tough.  Let me know if you need any more info.
[3 Jul 2003 6:38] Richard Gabriel
Ah, after looking deeper, I did copy the error from the log when I was running MySQL 4.0.12-Max.  So you are correct that at the time of the error, the server was running 4.0.12-Max.  I have gotten crashes and corruption after upgrading to 4.0.13-Max and assumed it was the same problem, but it is possible that it is not.  If you are very sure that you have taken care of this issue in 4.0.13, I will run a full mysqlcheck to fix any current problems and I will see how it goes.  Please let me know.  Thanks!
[26 Aug 2003 3:25] Michael Widenius
Yes, I am sure that we have taken care of the assert in 4.0.13, so please run a check of all tables an open a new bug ticket if you still have problems.

Sorry for the delayed reaply, but we didn't notice the answer because the ticket was left in a 'need-feedback' state which we don't actively monitor.
[26 Aug 2003 5:41] Richard Gabriel
This turned out to be a kernel 2.4.18 issue that was only noticed after upgrading to MySQL 4.0.  Sorry about that.
[8 Feb 2005 19:45] Sergei Golubchik
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.