Bug #40428 core dumped when restore backup log file(redo log)
Submitted: 30 Oct 2008 12:07 Modified: 14 Sep 2009 10:22
Reporter: li zhou Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql-5.1-telco-6.3 OS:Any
Assigned to: Martin Skold CPU Architecture:Any
Tags: mysql-5.1.22-ndb-6.3.6, REDO Log, restore

[30 Oct 2008 12:07] li zhou
Description:
When i try to restore a backup with "--print", ndb_restore will Segmentation fault (core dumped). If remove "--print", restore works well.

How to repeat:
Try to do some operation during backup, and restore it with "--print".

1: start a backup
2: do insert/delete/update operation during backup. Make sure log file will record these operations.
3: restore the backup files with '--print'

or Using my backup file to restore will reproduct the bug.

1: untar BACKUP-1.tar.gz.
2: $> NDB_CONNECTSTRING=localhost:9311 ndb_restore -b 1 -n 1 -m -r  --print --print_meta path/to/BACKUP-1
3: $> NDB_CONNECTSTRING=localhost:9311 ndb_restore -b 1 -n 2 -r  --print --print_meta path/to/BACKUP-1

4: core dumped.
[30 Oct 2008 12:09] li zhou
backup file tarball

Attachment: BACKUP-1.tar.gz (application/x-gzip, text), 10.16 KiB.

[30 Oct 2008 12:32] li zhou
core file

Virus scan engine found a threat. This file might be infected. Attachment: core.tar.gz (application/x-gzip, text), 146.78 KiB.

[30 Oct 2008 13:06] li zhou
Seems dupicate with Bug#33040.
[30 Oct 2008 14:48] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/57475

2707 Leonard Zhou	2008-10-28
      BUG#40428 Set the right length of log attribute when restore with '--print'
[8 Sep 2009 10:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82666

2983 Martin Skold	2009-09-08
      Bug#40428 core dumped when restore backup log file(redo log): set the correct length of log attribute when restore with '--print'
      modified:
        storage/ndb/tools/restore/Restore.cpp
[8 Sep 2009 10:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82668

2984 Martin Skold	2009-09-08
      Bug#40428  core dumped when restore backup log file(redo log): added test case
      modified:
        mysql-test/suite/ndb/r/ndb_restore.result
        mysql-test/suite/ndb/t/ndb_restore.test
[8 Sep 2009 11:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82672

2986 Martin Skold	2009-09-08
      Bug#40428  core dumped when restore backup log file(redo log): modified test cases to redirect output
      modified:
        mysql-test/suite/ndb/r/ndb_restore.result
        mysql-test/suite/ndb/t/ndb_restore.test
[8 Sep 2009 11:24] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82673

3036 Martin Skold	2009-09-08 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_restore.result
        mysql-test/suite/ndb/t/ndb_restore.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster.h
        storage/ndb/include/ndbapi/NdbBlob.hpp
        storage/ndb/src/ndbapi/NdbBlob.cpp
        storage/ndb/tools/restore/Restore.cpp
[8 Sep 2009 11:39] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82676

3037 Martin Skold	2009-09-08 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/r/ndb_restore.result
        mysql-test/suite/ndb/t/ndb_restore.test
[8 Sep 2009 12:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82680

2989 Martin Skold	2009-09-08 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/t/ndb_restore.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster.h
        storage/ndb/include/ndbapi/NdbBlob.hpp
        storage/ndb/src/ndbapi/NdbBlob.cpp
        storage/ndb/tools/restore/Restore.cpp
[8 Sep 2009 12:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/82684

2988 Martin Skold	2009-09-08 [merge]
      Merge
      modified:
        mysql-test/suite/ndb/t/ndb_restore.test
        sql/ha_ndbcluster.cc
        sql/ha_ndbcluster.h
        storage/ndb/include/ndbapi/NdbBlob.hpp
        storage/ndb/src/ndbapi/NdbBlob.cpp
        storage/ndb/tools/restore/Restore.cpp
[8 Sep 2009 13:16] Bugs System
Pushed into 5.1.35-ndb-7.1.0 (revid:martin.skold@mysql.com-20090908124652-0bd68u3ku34xqg8f) (version source revid:martin.skold@mysql.com-20090908124652-0bd68u3ku34xqg8f) (merge vers: 5.1.35-ndb-7.1.0) (pib:11)
[8 Sep 2009 13:18] Bugs System
Pushed into 5.1.37-ndb-6.3.27 (revid:martin.skold@mysql.com-20090908113951-flbnamy45l5dscw1) (version source revid:martin.skold@mysql.com-20090908113951-flbnamy45l5dscw1) (merge vers: 5.1.37-ndb-6.3.27) (pib:11)
[8 Sep 2009 13:18] Bugs System
Pushed into 5.1.37-ndb-7.0.8 (revid:martin.skold@mysql.com-20090908121053-yst2g625jf8v1kms) (version source revid:martin.skold@mysql.com-20090908121053-yst2g625jf8v1kms) (merge vers: 5.1.37-ndb-7.0.8) (pib:11)
[8 Sep 2009 13:19] Bugs System
Pushed into 5.1.37-ndb-6.2.19 (revid:martin.skold@mysql.com-20090908112403-4md7hwxrp8rm2qx4) (version source revid:martin.skold@mysql.com-20090908112403-4md7hwxrp8rm2qx4) (merge vers: 5.1.37-ndb-6.2.19) (pib:11)
[14 Sep 2009 10:22] Jon Stephens
Documented bugfix in the NDB-6.2.19, 6.3.27, and 7.0.8 changelogs, as follows:

        Running ndb_restore with the --print or --print_log option could
        cause it to crash.

Closed.