Bug #44069 ndb_restore crash from bus error when restoring packed data

Submitted: 3 Apr 2009 8:31 Modified: 15 Apr 2009 3:01
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:mysql-5.1-telco-7.0 OS:Solaris (sparc)
Assigned to: Magnus Blåudd CPU Architecture:Any

[3 Apr 2009 8:31] Magnus Blåudd
Description:
ndb_restore run on big endian machine get a bus error when trying to swap the byte order of data read from backup file.

The files have bee previously recorded on little endian machine.

How to repeat:
 ./ndb_restore  --no-defaults -b 1 -n 2 -r ~/magnus/mysql-5.1.32-ndb-7.0.5-pb558/mysql-test/std_data/ndb_backup51_undolog_le

t@1 (l@1) terminated by signal BUS (invalid address alignment)
Current function is BackupFile::Twiddle
   77       attr_data->u_int32_value[0] = Twiddle32(attr_data->u_int32_value[0]);
(dbx) p attr_desc
attr_desc = 0x10041f1e8
(dbx) p attr_desc
attr_desc = 0x10041f1e8
(dbx) p *attr_desc
*attr_desc = {
    size           = 8U
    arraySize      = 4U
    attrId         = 4U
    m_column       = 0x1004a5d38
    m_nullBitIndex = 0
    convertFunc    = (nil)
    parameter      = (nil)
}
(dbx) where
current thread: t@1
=>[1] BackupFile::Twiddle(this = 0xffffffff7fffe138, attr_desc = 0x10041f1e8, attr_data = 0x100412048, arraySize = 0), line 77 in "Restore.cpp"
  [2] RestoreDataIterator::readTupleData_packed(this = 0xffffffff7fffe138, buf_ptr = 0x10051de10, dataLength = 9U), line 919 in "Restore.cpp"
  [3] RestoreDataIterator::getNextTuple(this = 0xffffffff7fffe138, res = 1), line 782 in "Restore.cpp"
  [4] main(argc = 1, argv = 0x1004bc150), line 1179 in "restore_main.cpp"
[8 Apr 2009 13:49] 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/71654
[9 Apr 2009 11:14] 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/71772
[9 Apr 2009 15:27] 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/71797
[9 Apr 2009 15:43] Bugs System
Pushed into 5.1.32-ndb-7.0.5 (revid:magnus.blaudd@sun.com-20090409152826-rfdukhsmek5cez8h) (version source revid:magnus.blaudd@sun.com-20090409152826-rfdukhsmek5cez8h) (merge vers: 5.1.32-ndb-7.0.5) (pib:6)
[9 Apr 2009 16:17] Bugs System
Pushed into 5.1.32-ndb-6.3.25 (revid:magnus.blaudd@sun.com-20090409154847-gaqvdnjj5tm5ua5h) (version source revid:magnus.blaudd@sun.com-20090409154847-gaqvdnjj5tm5ua5h) (merge vers: 5.1.32-ndb-6.3.25) (pib:6)
[14 Apr 2009 16:51] 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/72035
[14 Apr 2009 17:22] Bugs System
Pushed into 5.1.32-ndb-7.0.6 (revid:magnus.blaudd@sun.com-20090414171116-ctlsz5z1oxeagkc8) (version source revid:magnus.blaudd@sun.com-20090414171116-ctlsz5z1oxeagkc8) (merge vers: 5.1.32-ndb-7.0.6) (pib:6)
[15 Apr 2009 3:01] Jon Stephens
Documented in the NDB-6.3.25 and 7.0.6 changelogs as follows:

        ndb_restore failed when trying to restore data on a big-endian
        machine from a backup file created on a little-endian machine.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.057 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.