Bug #21012 Innodb Tablespace Corruption
Submitted: 12 Jul 2006 18:36 Modified: 27 Jul 2006 6:09
Reporter: Edward Walker Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:4.1.18 OS:MacOS (OS X Tiger 10.4)
Assigned to: Heikki Tuuri CPU Architecture:Any
Tags: innodb

[12 Jul 2006 18:36] Edward Walker
Description:
Our master database crashed on an assertion failure.  It was restarted multiple times, and shortly thereafter, as it was processing SQL, it would hit an assertion failure and crash.  We are using the Innodb engine for all our tables.  Our slave databases have been working fine.  We took the master offline and promoted one of the slaves to be the new master.  The former slave is processing the SQL that would crash the old master just fine.  I suspect Innodb tablespace corruption on the old master.

I will attach the .err file for the crashing master.

How to repeat:
Unknown how suspected Innodb tablespace corruption occurred.
[12 Jul 2006 18:41] Edward Walker
.err log for crashing master

Attachment: errfile (application/octet-stream, text), 20.34 KiB.

[12 Jul 2006 20:25] Valeriy Kravchuk
Thank you for a problem report. Please, try to dump all your data, install newer version, 4.1.20, restore and try to repeat with it.

You have yet another assertion failure:

060712 10:21:06InnoDB: Assertion failure in thread 52381696 in file trx0trx.c line 296
InnoDB: Failing assertion: UT_LIST_GET_LEN(trx->signals) == 0

So, it can be hardware failure as well. Please, describe your hardware (how much RAM do you have?) and send your my.cnf content.
[12 Jul 2006 20:50] Edward Walker
The db is running on a PowerMac G5 (dual 2.3 GHz processors) with 8GB of memory.  I will attach the my.cnf file.
[12 Jul 2006 21:52] Marc Bejarano
there won't be an easy way to repeat this because it was probably some rarely seen race condition that caused it.  this machine has been running happily for months.  once restored, i'm guessing it will run happily again for months.  we just figured we'd let you folks know about this in case you'd seen something similar or if that particular assertion gave you any clues.  what does that code do?  what condition would cause it to assert?
[27 Jul 2006 6:10] Heikki Tuuri
Hi!

This is an assertion failure I do not remember seeing before:

InnoDB: Error: thd->transaction.all.innodb_active_trans == 0
InnoDB: but trx->conc_state != TRX_NOT_STARTED

This means that the internal InnoDB data dictionary is corrupt:

060712 10:33:44InnoDB: Assertion failure in thread 51250176 in file dict0load.c line 363
InnoDB: Failing assertion: ut_dulint_cmp(table->id, mach_read_from_8(field)) == 0

It is hard to diagnose this further. One user reported lots of corruption problems from an OS X computer 2 years ago. I guess it was either hardware problems or OS/driver bugs, since we never saw similar problems on other platforms.

I am putting this report to the Can't repeat state. Please add more comments to this bug report if you see more crashes.

Regards,

Heikki