Bug #19185 Crash on out of DataMemory running DBT2 on NDBDD
Submitted: 19 Apr 2006 6:51 Modified: 22 Jun 2006 8:19
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.1.10bk OS:
Assigned to: Jonas Oreland CPU Architecture:Any

[19 Apr 2006 6:51] Stewart Smith
ndbd and mysqld crash while loading 'customer' table in DBT2 ndbdd test just after DataMemory becomes full.

ndbd node 2 (2nd, not master) is hitting an assert in Dbtup::getRealpid() (in DbtupPageMan.cpp). 

for where it's called from

I added the following debug code to help:

===== storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp 1.5 vs edited =====
--- 1.5/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp    2006-01-13 01:38:30 +11:00
+++ edited/storage/ndb/src/kernel/blocks/dbtup/DbtupPageMap.cpp 2006-04-12 17:51:40 +10:00
@@ -114,6 +114,7 @@
   Uint32 loopLimit;
   Uint32 loopCount = 0;
   Uint32 pageRangeLimit = cnoOfPageRangeRec;
+  ndbout << "getRealpid " << logicalPageId << " < " << getNoOfPages(regFragPtr) << " from " << regFragPtr << endl;
   ndbassert(logicalPageId < getNoOfPages(regFragPtr));
   grpPageRangePtr.i = regFragPtr->rootPageRange;
   while (true) {

and the output in the node 2 log is (crash on last entry)
getRealpid 41 < 42 from 0x85d9228
getRealpid 41 < 42 from 0x85d9228
getRealpid 524287 < 46 from 0x85d933c

Before the crash, we were in ACC. So there's something going on in there. I'm just not sure what (and lack the ACC knowledge)
Logs will be attached.

For mysqld, we hit the assert:
mysqld: NdbEventOperationImpl.cpp:1868: int NdbEventBuffer::merge_data(const SubTableData*, LinearSectionPtr*, EventBufData*): Assertion `tp != 0 && tp->t3 != Ev_t::enum_ERR' failed.

How to repeat:
$ ./mysql-test-run.pl --with-ndbcluster --do-test=ndb --start-and-exit
$ sh mysql_load_db.sh -d test -f /tmp/dbt2data/ -c /home/stewart/MySQL/5.1/bug18798/client/mysql -s /home/stewart/MySQL/5.1/bug18798/mysql-test/var/tmp/master.sock -e NDBDD -n -x -m ORIG  -g LOG_1 -i 1 -j 100 -t MY_TS -a 1 -b 250 -u root

With DBT2 downloaded from the dbt2 website and the mysql_load_db.sh script from the mysql-test-extra bk repo.

I have recreated this with yesterday's BK tree many times.

Suggested fix:
don't crash. Instead, have errors.
World Peace is also a valid fix.
[19 Apr 2006 7:00] Stewart Smith
logs for ndbd and mysqld

Attachment: bug19185_logs.tar.gz (application/x-gzip, text), 153.84 KiB.

[23 Apr 2006 6:17] Jonas Oreland
Stewart, can you pass your config.ini
  so I can be sure when to get full...
[24 Apr 2006 16:57] Stewart Smith
i was using the default one generated by mysql-test-run.pl

i can try and grab it again though... currently have different bugs being found in that tree (and different config.ini)
[5 May 2006 8:16] Jonas Oreland
TUPKEYREF (via job buffer)
[17 May 2006 20:46] Jonathan Miller
More information can be found @ http://bugs.mysql.com/bug.php?id=19743
[21 Jun 2006 12:20] Jonas Oreland
this is fixed and pushed...
in changeset 1.2119.344.83
[22 Jun 2006 8:19] 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 bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Documented in 5.1.12 changelog. Closed.