Bug #42046 MySQL Cluster : Too many BIT columns causes cluster failure
Submitted: 12 Jan 2009 11:20 Modified: 9 Dec 2009 19:31
Reporter: Frazer Clement Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Martin Skold CPU Architecture:Any
Tags: regression

[12 Jan 2009 11:20] Frazer Clement
Description:
Tested on mysql-5.1-telco-6.4.

Creating an Ndb table with lots of large BIT columns (127 BIT(64) columns) results in a cluster failure.

How to repeat:
mysql> create table bigbits ( k int unsigned primary key, c1 bit(64), c2 bit(64), c3 bit(64), c4 bit(64), c5 bit(64), c6 bit(64), c7 bit(64), c8 bit(64), c9 bit(64), c10 bit(64), c11 bit(64), c12 bit(64), c13 bit(64), c14 bit(64), c15 bit(64), c16 bit(64), c17 bit(64), c18 bit(64), c19 bit(64), c20 bit(64), c21 bit(64), c22 bit(64), c23 bit(64), c24 bit(64), c25 bit(64), c26 bit(64), c27 bit(64), c28 bit(64), c29 bit(64), c30 bit(64), c31 bit(64), c32 bit(64), c33 bit(64), c34 bit(64), c35 bit(64), c36 bit(64), c37 bit(64), c38 bit(64), c39 bit(64), c40 bit(64), c41 bit(64), c42 bit(64), c43 bit(64), c44 bit(64), c45 bit(64), c46 bit(64), c47 bit(64), c48 bit(64), c49 bit(64), c50 bit(64), c51 bit(64), c52 bit(64), c53 bit(64), c54 bit(64), c55 bit(64), c56 bit(64), c57 bit(64), c58 bit(64), c59 bit(64), c60 bit(64), c61 bit(64), c62 bit(64), c63 bit(64), c64 bit(64), c65 bit(64), c66 bit(64), c67 bit(64), c68 bit(64), c69 bit(64), c70 bit(64), c71 bit(64), c72 bit(64), c73 bit(64), c74 bit(64), c75 bit(64), c76 bit(64), c77 bit(64), c78 bit(64), c79 bit(64), c80 bit(64), c81 bit(64), c82 bit(64), c83 bit(64), c84 bit(64), c85 bit(64), c86 bit(64), c87 bit(64), c88 bit(64), c89 bit(64), c90 bit(64), c91 bit(64), c92 bit(64), c93 bit(64), c94 bit(64), c95 bit(64), c96 bit(64), c97 bit(64), c98 bit(64), c99 bit(64), c100 bit(64), c101 bit(64), c102 bit(64), c103 bit(64), c104 bit(64), c105 bit(64), c106 bit(64), c107 bit(64), c108 bit(64), c109 bit(64), c110 bit(64), c111 bit(64), c112 bit(64), c113 bit(64), c114 bit(64), c115 bit(64), c116 bit(64), c117 bit(64), c118 bit(64), c119 bit(64), c120 bit(64), c121 bit(64), c122 bit(64), c123 bit(64), c124 bit(64), c125 bit(64), c126 bit(64)) engine=ndb;
ERROR 1005 (HY000): Can't create table 'test.bigbits' (errno: 157)
mysql> show warnings;
+-------+------+--------------------------------------------------------------------------------------------------+
| Level | Code | Message                                                                                          |
+-------+------+--------------------------------------------------------------------------------------------------+
| Error | 1296 | Got error 4009 'Cluster Failure' from NDB                                                        | 
| Error | 1005 | Can't create table 'test.bigbits' (errno: 157)                                                   | 
| Error | 1296 | Got error 4025 'Node failure caused abort of transaction' from ndb. Releasing global schema lock | 
+-------+------+--------------------------------------------------------------------------------------------------+
3 rows in set (0.00 sec)

mysql>

Output from ndbd nodes : 

ndbd: dbtup/AttributeOffset.hpp:88: static void AttributeOffset::setNullFlagPos(Uint32&, Uint32): Assertion `(pos) <= (0xfff)' failed.
2009-01-12 11:10:31 [ndbd] INFO     -- Received signal 6. Running error handler.
2009-01-12 11:10:31 [ndbd] INFO     -- Signal 6 received; Aborted
2009-01-12 11:10:31 [ndbd] INFO     -- main.cpp
2009-01-12 11:10:31 [ndbd] INFO     -- Error handler signal shutting down system
2009-01-12 11:10:31 [ndbd] INFO     -- Error handler shutdown completed - aborting
2009-01-12 11:10:31 [ndbd] ALERT    -- Node 2: Forced node shutdown completed. Initiated by signal 6. Caused by error 6000: 'Error OS signal received(Internal error, programming error or missing error message, please report a bug). Temporary error, restart node'.

ndbd backtrace : 

#0  0x008f5410 in __kernel_vsyscall ()
(gdb) bt
#0  0x008f5410 in __kernel_vsyscall ()
#1  0x009b5ee9 in raise () from /lib/libc.so.6
#2  0x009b74f1 in abort () from /lib/libc.so.6
#3  0x08107e44 in childAbort (code=Could not find the frame base for "childAbort(int, unsigned int)".
) at main.cpp:107
#4  0x083d298f in NdbShutdown (type=NST_ErrorHandlerSignal, 
    restartType=NRT_Default) at Emulator.cpp:289
#5  0x083e1ffc in ErrorReporter::handleError (messageID=6000, 
    problemData=0xbfcf71a4 "Signal 6 received; Aborted", 
    objRef=0x84870e0 "main.cpp", nst=NST_ErrorHandlerSignal)
    at ErrorReporter.cpp:235
#6  0x08108003 in handler_error (signum=6) at main.cpp:846
#7  <signal handler called>
#8  0x008f5410 in __kernel_vsyscall ()
#9  0x009b5ee9 in raise () from /lib/libc.so.6
#10 0x009b74f1 in abort () from /lib/libc.so.6
#11 0x009af859 in __assert_fail () from /lib/libc.so.6
#12 0x082edf05 in AttributeOffset::setNullFlagPos (desc=@0xbfcf76bc, pos=4160)
    at dbtup/AttributeOffset.hpp:88
#13 0x082ecf4a in Dbtup::execTUP_ADD_ATTRREQ (this=0xa8d6f008, 
    signal=0x85fcafc) at dbtup/DbtupMeta.cpp:211
#14 0x0813680d in SimulatedBlock::executeFunction (this=0xa8d6f008, gsn=417, 
    signal=0x85fcafc) at SimulatedBlock.hpp:824
#15 0x083e4c0d in FastScheduler::doJob (this=0x8606420)
---Type <return> to continue, or q <return> to quit---
    at FastScheduler.cpp:134
#16 0x083e35cf in ThreadConfig::ipControlLoop (this=0x9f0d038, thread_index=3)
    at ThreadConfig.cpp:249
#17 0x08108cbd in main (argc=Cannot access memory at address 0x39dd
) at main.cpp:679

 

Suggested fix:
Define and enforce or remove any built in limits on BIT columns.
[12 Jan 2009 11:29] Frazer Clement
See also bug#42047
[13 Jan 2009 7:42] Sveta Smirnova
Thank you for the report.

Verified as described using mysql-5.1-telco-6.4 tree. Bug is not repeatable with version mysql-cluster-gpl-6.3.20
[3 Dec 2009 13:05] Jonas Oreland
ok for 6.3 and up
[7 Dec 2009 10:07] 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/93034

3180 Martin Skold	2009-12-07
      Bug#42046 MySQL Cluster : Too many BIT columns causes cluster failure: Added check and return new error code
      modified:
        mysql-test/suite/ndb/r/ndb_bitfield.result
        mysql-test/suite/ndb/t/ndb_bitfield.test
        storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
        storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
        storage/ndb/src/ndbapi/ndberror.c
[7 Dec 2009 10:57] 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/93036

3180 Martin Skold	2009-12-07
      Bug#42046 MySQL Cluster : Too many BIT columns causes cluster failure: Added check and return new error code
      modified:
        mysql-test/suite/ndb/r/ndb_bitfield.result
        mysql-test/suite/ndb/t/ndb_bitfield.test
        storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
        storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
        storage/ndb/src/ndbapi/ndberror.c
[8 Dec 2009 13:26] 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/93187

3266 Martin Skold	2009-12-08 [merge]
      Bug#42046 MySQL Cluster : Too many BIT columns causes cluster failure: Added check and return new error code
      modified:
        mysql-test/suite/ndb/r/ndb_bitfield.result
        mysql-test/suite/ndb/t/ndb_bitfield.test
        storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
        storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
        storage/ndb/src/ndbapi/ndberror.c
[8 Dec 2009 13:34] 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/93190

3183 Martin Skold	2009-12-08 [merge]
      Bug#42046 MySQL Cluster : Too many BIT columns causes cluster failure: Added check and return new error code
      modified:
        mysql-test/suite/ndb/r/ndb_bitfield.result
        mysql-test/suite/ndb/t/ndb_bitfield.test
        storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
        storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
        storage/ndb/src/ndbapi/ndberror.c
[8 Dec 2009 13:44] Bugs System
Pushed into 5.1.39-ndb-7.1.0 (revid:martin.skold@mysql.com-20091208133336-9z136987vdoav05n) (version source revid:martin.skold@mysql.com-20091208133336-9z136987vdoav05n) (merge vers: 5.1.39-ndb-7.1.0) (pib:13)
[8 Dec 2009 13:45] Bugs System
Pushed into 5.1.39-ndb-7.0.10 (revid:martin.skold@mysql.com-20091208132622-dposxcfopeadyf05) (version source revid:martin.skold@mysql.com-20091208132622-dposxcfopeadyf05) (merge vers: 5.1.39-ndb-7.0.10) (pib:13)
[9 Dec 2009 19:31] Jon Stephens
Documented bugfix in the NDB-6.3.29 and 7.0.10 changelogs as follows:

        Creating an NDB table with an excessive number of large BIT
        columns caused the cluster to fail. Now, an attempt to create
        such a table is rejected with error 791 (Too many total bits in
        bitfields).
      
Closed.