Description of problem:
A regression in MySQL 5.0.77 (compared to 5.0.45) can lead to continuous replication crashes when dates or datetimes are compared to the results of a NAME_CONST(), as is common if stored procedures are in use with replication.
Once a slave server reaches such a statement it will sit in a loop where it will run the statement, crash, perform recovery, then start the cycle all over again.
The bug is fixed in MySQL 5.0.78, see:
http://bugs.mysql.com/bug.php?id=42014http://lists.mysql.com/commits/65288
Version-Release number of selected component (if applicable):
mysql-server-5.0.77-3.el5
How reproducible:
Always
Steps to Reproduce:
1. Connect to MySQL
2. Run "SELECT UTC_TIMESTAMP() > NAME_CONST('v_curtime',_binary'2009-10-02 03:05:46' COLLATE 'binary')"
Actual results:
mysql> SELECT CURDATE() < NAME_CONST('v_curtime',_utf8'2009-10-02 03:05:46' COLLATE 'utf8_general_ci');
ERROR 2013 (HY000): Lost connection to MySQL server during query
Expected results:
The MySQL server should not crash
Additional info:
The mysqld.log contains the following
-------------------------------------
091002 13:36:57 - mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=268435456
read_buffer_size=131072
max_used_connections=4
max_connections=768
threads_connected=2
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 1933306 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd=0x195240f0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x40196fb0, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
(nil)
New value of fp=0x195240f0 failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x2aac20c03260 is invalid pointer
thd->thread_id=13610
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Number of processes running now: 0
091002 13:36:57 mysqld restarted
InnoDB: The log sequence number in ibdata files does not match
InnoDB: the log sequence number in the ib_logfiles!
091002 13:36:58 InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: In a MySQL replication slave the last master binlog file
InnoDB: position 0 4105719, file name bin-update-log.000146
InnoDB: Last MySQL binlog file position 0 3993683, file name /var/log/mysql/bin-update-log.000133
091002 13:37:00 InnoDB: Started; log sequence number 0 2654469995
091002 13:37:00 [Note] Recovering after a crash using /var/log/mysql/bin-update-log
091002 13:37:00 [Note] Starting crash recovery...
091002 13:37:00 [Note] Crash recovery finished.
091002 13:37:00 [Note] /usr/libexec/mysqld: ready for connections.
Yeah, this bug is in fact fixed in a z-stream update (see bug #538731) but it's not closed because we haven't issued a regular non-z-stream mysql update since then.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHSA-2013-0121.html