Bug #26739 ndb_restore segfault on some 64-bit architectures
Submitted: 1 Mar 2007 2:57 Modified: 27 Apr 2007 13:59
Reporter: Tomas Ulin
Status: Can't repeat
Category:Server: Cluster Severity:S3 (Non-critical)
Version:5.0, 5.1 OS:Any
Assigned to: Bugs System Target Version:

[1 Mar 2007 2:57] Tomas Ulin
Description:
found in ndb_restore tescases run on 5.1 on 64 bit sparc and ita2

How to repeat:
ndb_restore segfaults because of unaligned data used

testcases:

ndb_dd_restore
ndb_restore_compat

in 5.1
[1 Mar 2007 2:57] Tomas Ulin
fixed in 5.1.16
[8 Mar 2007 17:51] Tomas Ulin
5.0.38
5.1.16
ndb-6.1.4
[9 Mar 2007 2:22] Jon Stephens
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 bug fix. More information about accessing the source trees is
available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.38, 5.1.16, and ndb-6.1.4 changelogs.
[29 Mar 2007 11:32] Daniel Fischer
Re-opening this bug because bug#26942 is marked a duplicate of this one and still occurs
in 5.1.17. Seen on hosts hpux11 (HP/UX 11.11) and hp3750 (HP/UX 11.00).

--- mtr output ---
ndb_restore_compat             [ fail ]

Errors are (from
/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/mysql-test/var/log/mysqltest-time)
:
Failed to read
/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/mysql-test/std_data/ndb_backup51/BACKUP-1.1.ctl

mysqltest: At line 17: command "$NDB_TOOLS_DIR/ndb_restore --no-defaults -b 1 -n 1 -p 1
-m -r $MYSQL_TEST_DIR/std_data/ndb_backup51 >> $NDB_TOOLS_OUTPUT" failed
(the last lines may be the most important ones)

--- ndb_testrun.log ---
WARNING: terminal is not fully functional
CURRENT_TEST: ndb_restore_compatRETURN)
Backup Id = 1
Nodeid = 1
backup path =
/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/mysql-test/std_data/ndb_backup51

NDBT_ProgramExit: 1 - Failed

--- ndb_restore_compat.log ---
DROP DATABASE IF EXISTS BANK;
CREATE DATABASE BANK default charset=latin1 default collate=latin1_bin;
USE BANK;
exec of
'/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/bin/ndb_restore
--no-defaults -b 1 -n 1 -p 1 -m -r
/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/mysql-test/std_data/ndb_backup51
>>
/home/mysqldev/tmp-200703222001-5.1.17-beta-28948/hp3750/test/mysql-5.1.17-beta-hpux11.00-hppa2.0w/mysql-test/var/log/ndb_testrun.log
failed, error: 256, status: 1, errno: 0
[27 Apr 2007 7:20] li zhou
It seems something wrong when do test in a flatform with big endian.
Can reproduct in spac solaris both 32-bit and 64-bit.
[27 Apr 2007 13:57] li zhou
Above test is based on 5.1.16. 

Test can pass in 5.1.18. Seems the bug has fixed in 5.1.18.

Bug #26942 also base on 5.1.16.