Bug #35279 Cluster crash in DBTUP with disk data
Submitted: 13 Mar 2008 20:57 Modified: 13 Mar 2008 21:42
Reporter: David Shrewsbury Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.23 OS:Linux
Assigned to: Assigned Account CPU Architecture:Any

[13 Mar 2008 20:57] David Shrewsbury
Description:
Simple 2 data node cluster running 5.1.23:

NDB error file
----
Time: Thursday 13 March 2008 - 16:45:00
Status: Temporary error, restart node
Message: Internal program error (failed ndbassert) (Internal error, programming error or missing error message, please report a bug)
Error: 2343
Error data: dbtup/DbtupDiskAlloc.cpp
Error object: DBTUP (Line: 1067) 0x0000000a
Program: ndbd
Pid: 28118
Trace: /var/lib/mysql-cluster/ndb_2_trace.log.1
Version: Version 5.1.23 (rc)

How to repeat:
CREATE LOGFILE GROUP lg_1 ADD UNDOFILE 'lg_1_undo_1.dat' ENGINE=NDB;
CREATE TABLESPACE ts_1 ADD DATAFILE 'ts_1_data_1.dat' USE LOGFILE GROUP lg_1 ENGINE=NDB;

CREATE TABLE `t1` (
`id` bigint(20) NOT NULL DEFAULT '0',
`subType` varchar(100) NOT NULL DEFAULT '',
`ejbParent_key` bigint(20) DEFAULT NULL,
`ejbParent_subType` varchar(100) DEFAULT NULL,
`childrenCount` int(11) NOT NULL DEFAULT '0',
`name` varchar(80) DEFAULT NULL,
PRIMARY KEY (`id`,`subType`),
KEY `tree_parent` (`ejbParent_key`,`ejbParent_subType`),
KEY `tree_subtype` (`subType`)
) /*!50100 TABLESPACE ts_1 STORAGE DISK */ ENGINE=ndbcluster;

set autocommit=0;
INSERT INTO t1 (id, subType, childrenCount, name, ejbParent_key, ejbParent_subType) VALUES (132, 'tsp_sc.SERVICEDATA', 0, null, null, null);
commit;
INSERT INTO t1 (id, subType, childrenCount, name, ejbParent_key, ejbParent_subType) VALUES (132, 'tsp_sc.ALIASFOLDER', 0, null, null, null);
commit;
INSERT INTO t1 (id, subType, childrenCount, name, ejbParent_key, ejbParent_subType) VALUES (132, 'tsp_sc.DATASETFOLDER', 0, null, null, null);
commit;
INSERT INTO t1 (id, subType, childrenCount, name, ejbParent_key, ejbParent_subType) VALUES (132, 'tsp_sc.SERVICEDATAFOLDER', 0, null, null, null);
commit;
INSERT INTO t1 (id, subType, childrenCount, name, ejbParent_key, ejbParent_subType) VALUES (100008, 'JOBFOLDER', 0, null, null, null);
commit;

SET autocommit=0;
UPDATE t1 SET ejbParent_key=null, ejbParent_subType=null WHERE id=100008 AND subType='JOBFOLDER';
UPDATE t1 SET ejbParent_key=null, ejbParent_subType=null WHERE id=132 AND subType='tsp_sc.DATASETFOLDER';
UPDATE t1 SET ejbParent_key=null, ejbParent_subType=null WHERE id=132 AND subType='tsp_sc.ALIASFOLDER';
UPDATE t1 SET ejbParent_key=null, ejbParent_subType=null WHERE id=132 AND subType='tsp_sc.SERVICEDATAFOLDER';
DELETE FROM t1 WHERE id=132 AND subType='tsp_sc.SERVICEDATA';
DELETE FROM t1 WHERE id=100008 AND subType='JOBFOLDER';
DELETE FROM t1 WHERE id=132 AND subType='tsp_sc.DATASETFOLDER';
DELETE FROM t1 WHERE id=132 AND subType='tsp_sc.ALIASFOLDER';
DELETE FROM t1 WHERE id=132 AND subType='tsp_sc.SERVICEDATAFOLDER';
commit;
[13 Mar 2008 21:13] Jonas Oreland
please check patch for bug#33619
[13 Mar 2008 21:39] Bogdan Kecman
Tried the patch:

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

it solves the problem