Bug #23430 Node failure in testOperations / DeleteUpdate with new table
Submitted: 18 Oct 2006 17:58 Modified: 4 Dec 2006 5:39
Reporter: Kristian Nielsen
Status: Closed
Category:Server: ClusterDD Severity:S3 (Non-critical)
Version:5.1.13 OS:Linux (Linux)
Assigned to: Jonas Oreland Target Version:

[18 Oct 2006 17:58] Kristian Nielsen
Description:
After adding a new table T15 to test/src/NDBT_Tables.cpp, I see a node failure
in the DeleteUpdate test.

Here is the new table:

> diff -u test/src/NDBT_Tables.cpp{.orig,}
--- test/src/NDBT_Tables.cpp.orig       2006-10-18 17:27:04.000000000 +0200
+++ test/src/NDBT_Tables.cpp    2006-10-18 17:51:46.000000000 +0200
@@ -292,6 +292,26 @@
 const
 NDBT_Table T14("T14", sizeof(T14Attribs)/sizeof(NDBT_Attribute), T14Attribs);
 
+static
+const
+NDBT_Attribute T15Attribs[] = {
+  NDBT_Attribute("KOL1", NdbDictionary::Column::Unsigned, 1, true, false),
+  NDBT_Attribute("KOL2", NdbDictionary::Column::Varbinary, 100, false, true),
+  NDBT_Attribute("KOL3", NdbDictionary::Column::Unsigned, 1, false, true),
+  NDBT_Attribute("KOL4", NdbDictionary::Column::Int, 1, false, false),
+  NDBT_Attribute("KOL5", NdbDictionary::Column::Float, 1, false, true),
+  NDBT_Attribute("KOL6", NdbDictionary::Column::Char, 4, false, true),
+  NDBT_Attribute("KOL7", NdbDictionary::Column::Varbinary, 4, false, true),
+  NDBT_Attribute("KOL30", NdbDictionary::Column::Char, 4, false, true, 0,
NdbDictionary::Column::StorageTypeDisk),
+  NDBT_Attribute("KOL31", NdbDictionary::Column::Char, 4, false, false),
+  /* This one is for update count, needed by hugoScanUpdate. */
+  NDBT_Attribute("KOL99", NdbDictionary::Column::Unsigned, 1, false, false),
+};
+
+static
+const
+NDBT_Table T15("T15", sizeof(T15Attribs)/sizeof(NDBT_Attribute), T15Attribs);
+
 /*
   C2 DHCP TABLES, MAYBE THESE SHOULD BE MOVED TO THE UTIL_TABLES?
 */
@@ -431,6 +451,7 @@
   &T12,
   &T13,
   &T14,
+  &T15,
   &I1,
   &I2,
   &I3,

and here is the error log:

Current byte-offset of file-pointer is: 568                       

Time: Wednesday 18 October 2006 - 17:53:17
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: lgman.cpp
Error object: LGMAN (Line: 3068) 0x00000002
Program: /data0/pushbuild/mysql-5.1-new-ndb-exp/storage/ndb/src/kernel/ndbd
Pid: 8122
Trace: /dev/shm/v/ndbcluster-10045/ndb_2_trace.log.1
Version: Version 5.1.13 (beta)
***EOM***

GDB stack trace:

#6  0x00000000004b97ae in Lgman::validate_logfile_group (this=0xafa590, ptr={p =
0xb88010, i = 16384}, heading=0x74daa8 "free_log_space") at lgman.cpp:3068

How to repeat:
Add the above table T15.

(cd ../../mysql-test && MTR_BUILD_THREAD=4 perl mysql-test-run.pl --timer
--vardir=/dev/shm/v --start-and-exit --skip-im --skip-rpl ndb_basic)
API_SIGNAL_LOG=/dev/null test/ndbapi/create_tab T15
API_SIGNAL_LOG=/dev/null test/ndbapi/testOperations -n DeleteUpdate T15
gdb src/kernel/ndbd /dev/shm/v/ndbcluster-10045/core.*
[18 Oct 2006 20:42] Jonas Oreland
this is fairly newly introduced...maybe by pekka's abort fixes...

anyway, logspace got freed twice, making accounting for logfile group corrupt
[18 Oct 2006 20:43] Jonas Oreland
also, reproducable with D1 or D2
[18 Oct 2006 20:54] 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/13908

ChangeSet@1.2308, 2006-10-18 20:54:25+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#23430
    make sure not to release log buffer twice (or several times) in case of abort of
multi update
[20 Oct 2006 14:21] 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/14054

ChangeSet@1.2304, 2006-10-20 14:21:30+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#23430
      make sure not to release log buffer twice (or several times) in case of abort of
multi update
[25 Oct 2006 8:59] Jonas Oreland
pushed into 5.1-ndb
[1 Nov 2006 15:57] Jonas Oreland
pushed into 5.1.13
[1 Dec 2006 9:40] Jonas Oreland
The error was the "log buffer" for DD was incorrectly handled
(space was freed twice on abort, during some circumstances)

This would cause direct assertion if debug build
  and slow and mysterious death in release build
[4 Dec 2006 5:39] 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 fix for 5.1.13.