Bug #22672 Commit on operation on nonexisting tuple brings down one data node
Submitted: 25 Sep 2006 15:47 Modified: 2 Nov 2006 14:27
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: NDB API Severity:S3 (Non-critical)
Version:4.1,5.0,5.1 OS:Linux (linux)
Assigned to: Jonas Oreland CPU Architecture:Any

[25 Sep 2006 15:47] Hartmut Holzgraefe
Description:
Running the code snippet below on a table where no row with id=1 exists leads to a "Tuple did not exist" error on NdbTransaction::execute() on the client side which is expected.

A NoCommit execute() works just fine, a Commit execute() brings down one node though (i assume it is the transaction coordinator that is gowing down but haven't checked for that yet). Doing this statement of sequence in a loop kills the whole cluster pretty fast.

How to repeat:
 ( error checking removed for readability )

   transaction = ndb->startTransaction();
   operation = transaction->getNdbOperation(TABLE);
   operation->readTuple());
   operation->equal("id", 1);
   result = operation->getValue("value", static_cast<char*>(NULL));
   transaction->execute(Commit, AO_IgnoreError, g_force); // fails with "Tuple did not exist"
   transaction->close();
[25 Sep 2006 15:48] Hartmut Holzgraefe
verified with both the latest 5.0-ndb tree and a 5.0-new build from early august
[25 Sep 2006 15:50] Hartmut Holzgraefe
Current byte-offset of file-pointer is: 568

Time: Monday 25 September 2006 - 16:43:18
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: DbtcMain.cpp
Error object: DBTC (Line: 10351) 0x0000000a
Program: /data1/mysql/5.0-ndb/libexec/ndbd
Pid: 3996
Trace: /data1/csc/11621/cluster/ndb_1_trace.log.1
Version: Version 5.0.25
***EOM***
[26 Sep 2006 13:09] Jonas Oreland
Note: This was "only" an incorrect assertion...i.e should be ok in release build
[26 Sep 2006 13:13] 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/12524

ChangeSet@1.2547, 2006-09-26 15:04:44+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#22672
    handle also CS_CONNECTED as "abort" in handleFailedApi to keep from falling on assertion in releaseApiCon
      in case of committed dirtyRead
[10 Oct 2006 18:47] Jonas Oreland
pushed into 5.1.12
[19 Oct 2006 9:18] 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/13952

ChangeSet@1.2311, 2006-10-19 11:18:04+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#22672
    fix another incorrect assertion
[20 Oct 2006 12:23] 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/14056

ChangeSet@1.2306, 2006-10-20 14:23:00+02:00, jonas@perch.ndb.mysql.com +1 -0
  ndb - bug#22672
      fix another incorrect assertion
[25 Oct 2006 6:56] Jonas Oreland
pushed another incorrect assertion into 5.1-ndb
[1 Nov 2006 14:27] Jonas Oreland
pushed into 4.1.22
[1 Nov 2006 14:48] Jonas Oreland
pushed into 5.0.29
[2 Nov 2006 14:27] 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 bugfix for 4.1.22/5.0.29/5.1.12.