Bug #31778 show binlog events crashes server
Submitted: 23 Oct 2007 9:43 Modified: 8 Feb 2020 18:16
Reporter: Sveta Smirnova Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Replication Severity:S2 (Serious)
Version:4.1 BK, 5.0 BK, 5.1 BK OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: bfsm_2007_10_25

[23 Oct 2007 9:43] Sveta Smirnova
Description:
If one replaced just created 4.1 binary log with one created by 3.23.58 server and then issued " show binlog events in 'replaced.binlog';" command, MySQL 4.1 server crashes:

mysql> show master status;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| apple-bin.000105 |       79 |              |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.01 sec)

mysql> show binlog events in 'apple-bin.000105';
ERROR 2013 (HY000): Lost connection to MySQL server during query

Version: '4.1.24-debug-log'  socket: '/tmp/mysql411.sock'  port: 33411  Source distribution
071023 12:50:20 [ERROR] Failed in send_file() while reading file name
071023 12:51:40 [ERROR] Failed in send_file() while reading file name
071023 12:59:42 - 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=8388600
read_buffer_size=131072
max_used_connections=2
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225791 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

071023 13:00:15  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...
071023 13:00:15  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 71742.
InnoDB: Doing recovery: scanned up to log sequence number 0 71742
InnoDB: Last MySQL binlog file position 0 79, file name ./apple-bin.000105
071023 13:00:15  InnoDB: Flushing modified pages from the buffer pool...
071023 13:00:15  InnoDB: Started; log sequence number 0 71742
/Users/apple/Applications/mysql-4.1/libexec/mysqld: ready for connections.
Version: '4.1.24-debug-log'  socket: '/tmp/mysql411.sock'  port: 33411  Source distribution

How to repeat:
See description.

Binary log will be attached.

$cat /Users/apple/temp/bug31640.txt
user1,foobar
user2,baz
[23 Oct 2007 9:45] Sveta Smirnova
binary log file

Attachment: apple-bin.1637 (application/octet-stream, text), 1.36 KiB.

[23 Oct 2007 10:04] Sveta Smirnova
5.0 dies as well:

Version: '5.0.52-debug-log'  socket: '/tmp/mysql501.sock'  port: 33501  Source distribution
Packets out of order (Found: 0, expected 7)
071023 12:32:06 [ERROR] Failed in send_file() while reading file name
Packets out of order (Found: 0, expected 8)
071023 12:33:08 [ERROR] Failed in send_file() while reading file name
Error: Memory allocated at log_event.cc:1063 was overrun, discovered at 'sql_list.h:471'
071023 14:02:19 - 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=8388572
read_buffer_size=131072
max_used_connections=2
max_connections=100
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 225788 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

071023 14:02:39 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=/Users/apple/Applications/mysql-5.0/data501/mysqld501-apple-bin' to avoid this problem.
071023 14:02:39  InnoDB: Started; log sequence number 0 3609934413
071023 14:02:39 [Note] Recovering after a crash using /Users/apple/Applications/mysql-5.0/data501/mysqld501-apple-bin
071023 14:02:39 [Note] Starting crash recovery...
071023 14:02:39 [Note] Crash recovery finished.
071023 14:02:39 [Note] /Users/apple/Applications/mysql-5.0/libexec/mysqld: ready for connections.
Version: '5.0.52-debug-log'  socket: '/tmp/mysql501.sock'  port: 33501  Source distribution
[23 Oct 2007 10:05] Sveta Smirnova
And 5.1:

Version: '5.1.23-beta-debug-log'  socket: '/tmp/mysql511.sock'  port: 33511  Source distribution
mysqld(18741,0x5867a00) malloc: *** error for object 0x65bdd70: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
mysqld(18741,0x5867a00) malloc: *** set a breakpoint in szone_error to debug
mysqld(18741,0x5867a00) malloc: *** error for object 0x65bde10: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
mysqld(18741,0x5867a00) malloc: *** set a breakpoint in szone_error to debug
mysqld(18741,0x5867a00) malloc: *** error for object 0x65bdaf0: incorrect checksum for freed object - object was probably modified after being freed, break at szone_error to debug
mysqld(18741,0x5867a00) malloc: *** set a breakpoint in szone_error to debug
071023 14:04:55 - 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=8388572
read_buffer_size=131072
max_used_connections=2
max_threads=151
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337617 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

071023 14:04:56 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a master and has his hostname changed!! Please use '--log-bin=/Users/apple/Applications/mysql-5.1/data511/mysqld511-apple-bin' to avoid this problem.
071023 14:04:56  InnoDB: Started; log sequence number 0 60301
071023 14:04:56 [Note] Recovering after a crash using /Users/apple/Applications/mysql-5.1/data511/mysqld511-apple-bin
071023 14:04:56 [Note] Starting crash recovery...
071023 14:04:56 [Note] Crash recovery finished.
071023 14:04:56 [Note] Event Scheduler: Loaded 1 event
071023 14:04:56 [Note] /Users/apple/Applications/mysql-5.1/libexec/mysqld: ready for connections.
Version: '5.1.23-beta-debug-log'  socket: '/tmp/mysql511.sock'  port: 33511  Source distribution
[8 Feb 2020 18:16] MySQL Verification Team
if this is still a problem with modern versions,  please file a new report to keep it simple.  4.1, 5.1 is long time gone.