Bug #28755 Truncating disk-based table crashes data nodes
Submitted: 29 May 2007 16:38 Modified: 21 Aug 2007 8:28
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S2 (Serious)
Version:5.1.18 OS:Any
Assigned to: Pekka Nousiainen CPU Architecture:Any
Tags: disk-based, ndb, truncate

[29 May 2007 16:38] Geert Vanderkelen
Description:
Truncating a disk-based table could crash a data nodes. It gives following error while importing data after truncating the table:

Status: Temporary error, restart node
Message: Internal program error (failed ndbrequire) (Internal error, programming error or missing error message, please report a bug)
Error: 2341
Error data: pgman.cpp
Error object: PGMAN (Line: 556) 0x0000000a
Program: ./bin/ndbd
Pid: 10045
Trace: /data1/cluster/ndb_4_trace.log.1
Version: Version 5.1.18 (beta)

Starting the failing again is not working, even with initial.

How to repeat:
CREATE LOGFILE GROUP lg1 ADD UNDOFILE 'undo001.dat' UNDO_BUFFER_SIZE 2M ENGINE NDB;
ALTER LOGFILE GROUP lg1 ADD UNDOFILE 'undo002.dat' ENGINE NDB;

CREATE TABLESPACE ts1 ADD DATAFILE 'data001.dat' USE LOGFILE GROUP lg1 INITIAL_SIZE 1024M ENGINE NDB;
ALTER TABLESPACE ts1 ADD DATAFILE 'data002.dat' INITIAL_SIZE 1024M ENGINE NDB;

CREATE TABLE t1 ( `id` bigint(20) NOT NULL AUTO_INCREMENT,
c1 varchar(32) NOT NULL DEFAULT '', c2 timestamp
NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c3
int(11) DEFAULT '0', c4 varchar(50) DEFAULT NULL, c5
varchar(50) DEFAULT NULL, c6 bigint(20) DEFAULT NULL, UNIQUE
KEY (c1), KEY `id` (`id`), KEY (c3) ) TABLESPACE ts1 STORAGE DISK ENGINE=NDB DEFAULT
CHARSET=latin1;

shell> ./hugoLoad --database=test --batch=50 --records=1000000 --loops=0 t1
mysql> TRUNCATE t1;
shell> ./hugoLoad --database=test --batch=50 --records=1000000 --loops=0 t1

(Might need to repeat that a few times.)
[29 May 2007 16:43] Geert Vanderkelen
NDB Logs

Attachment: bug28755_logs.tar.gz (application/x-gzip, text), 15.15 KiB.

[29 May 2007 16:44] Geert Vanderkelen
Verified using MySQL 5.1.18.
[18 Jun 2007 12:38] Pekka Nousiainen
the context here probably:

   555      // enters queue at bind
   556      jam();
   557      ndbrequire(state & Page_entry::REQUEST);

with release line number diff
[3 Jul 2007 14:45] Jonas Oreland
this has most likely been fixed

can you please retest?

/Jonas
[3 Aug 2007 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[20 Aug 2007 8:40] Geert Vanderkelen
Using 5.1.20 I had still issues where the data nodes could not be restarted after a temporary error. The error was triggered just inserting data (not even doing the truncate).

Testing 5.1 from bk  works much better and I haven't seen the problem still.