Bug #1340 mysqlbinlog coredumps when reading possibly broken binlog
Submitted: 18 Sep 2003 12:36 Modified: 19 Sep 2003 9:43
Reporter: Dmitry Lenev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:4.0.15 OS:Linux (Linux)
Assigned to: Dmitry Lenev

[18 Sep 2003 12:36] Dmitry Lenev
Description:
Customer wrote:

> When I do a mysqlbinlog on replicatelogs.388 I get the following
> 
> sudo mysqlbinlog /home/mysql/replicatelogs.388 > 388.out 
> Warning: ignoring Append_block as there is no Create_file event for
> file_id: 316
> Warning: ignoring Append_block as there is no Create_file event for
> file_id: 316
> Warning: ignoring Append_block as there is no Create_file event for
> file_id: 316
> Warning: ignoring Append_block as there is no Create_file event for
> file_id: 316
[skip]
> Warning: ignoring Append_block as there is no Create_file event for
> file_id: 316
> Segmentation fault
> 
> Notice it cores. I uploaded the binlog to secret/replicatelogs.388.gz, I
> thought you might be able to tell me what happened here.

We should fix the problem in mysqlbinlog as it is no good to core.

How to repeat:
Just run mysqlbinlog replicatelogs.388 >388.out and you will get a core dump
[18 Sep 2003 12:38] Dmitry Lenev
I was able to repeat this with 4.0 version from bk and customer binlog.
[19 Sep 2003 5:49] Dmitry Lenev
Actually the binlog provided is ok. 
The problem is in mysqlbinlog which coredumps if mets Exec_load_log_event without corresponding Create_file_log_event (which is normal situation if Create_file event is in other binlog file).
[19 Sep 2003 9:43] Dmitry Lenev
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
    http://www.mysql.com/doc/en/Installing_source_tree.html

ChangeSet 1.1578 2003/09/19 20:31:01 dlenev@mysql.com
  Bugfix for bug #1340