Bug #8661 Crash recovery fails after recent XA modifications
Submitted: 21 Feb 2005 20:20 Modified: 21 Feb 2005 23:36
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S1 (Critical)
Version:5.0.3-bk OS:Linux (GNU/Linux)
Assigned to: Sergei Golubchik CPU Architecture:Any

[21 Feb 2005 20:20] Marko Mäkelä
After working around Bug #8646, I inserted a long dump consisting of one CREATE TABLE and some 250 one-megabyte multi-row INSERT statements. If I remember correctly, I shut down the database cleanly by sending SIGQUIT to the mysqld process. Also, InnoDB doesn't display any crash recovery messages. However, mysqld refuses to start:

(gdb) Starting program: /home/marko/mysql-5.0/sql/mysqld --gdb
[New Thread 16384 (LWP 19536)]
[New Thread 32769 (LWP 19538)]
[New Thread 16386 (LWP 19539)]
[New Thread 32771 (LWP 19540)]
[New Thread 49156 (LWP 19541)]
[New Thread 65541 (LWP 19542)]
[New Thread 81926 (LWP 19543)]
[New Thread 98311 (LWP 19544)]
[New Thread 114696 (LWP 19545)]
[New Thread 131081 (LWP 19546)]
050221 21:23:44  InnoDB: Started; log sequence number 0 1409535211
/home/marko/mysql-5.0/sql/mysqld: Out of memory at line 195, 'my_alloc.c'
/home/marko/mysql-5.0/sql/mysqld: needed -56 byte (0k), memory in use: 2151689 bytes (2102k)
050221 21:23:44 [ERROR] Crash recovery failed. Either correct the problem (if it's, for example, out of memory error) and restart, or delete (or rename) binary log and start mysqld with --tc-heuristic-recover={commit|rollback}
050221 21:23:44 [ERROR] Can't init tc log
050221 21:23:44 [ERROR] Aborting

How to repeat:
I don't know. Maybe create a big enough transaction, and then restart mysqld.

Suggested fix:
Make it possible to essentially disable XA at runtime if you cannot figure out the cause of this bug by the 5.0.3 deadline. I tried both suggested values of --tc-heuristic-recover, but the database refused to start up.
[21 Feb 2005 23:36] Sergei Golubchik
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at