Bug #58277 dropping busy ordered index can crash data node
Submitted: 18 Nov 2010 8:40 Modified: 17 Jan 2011 11:05
Reporter: Pekka Nousiainen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:any OS:Any
Assigned to: Pekka Nousiainen CPU Architecture:Any
Triage: Triaged: D2 (Serious) / R3 (Medium) / E3 (Medium)

[18 Nov 2010 8:40] Pekka Nousiainen
Description:
Release-compiled shows "ArrayPool" crash
which comes from tuxReadAttrs() at:
  while (opPtr.i != RNIL) { c_operation_pool.getPtr(opPtr);

Cause is that correct tuple version does not exist.

Debug-compiled shows 2 types of crashes:

Error data: dbtux/DbtuxScan.cpp
Error object: DBTUX (Line: 668)
// scan position should already have been moved (assert only)

Error data: dbacc/DbaccMain.cpp
Error object: DBACC (Line: 1767)
vlqrequire(orlockmode == 0);

How to repeat:
Drop ordered index while using it to run scan updates.

Suggested fix:
Refuse scan ops before dropping index trigger.
[2 Dec 2010 18:08] 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/125840

3359 Pekka Nousiainen	2010-12-02
      bug#58277 a01_test.diff
      testDict
[2 Dec 2010 18:08] 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/125841

3360 Pekka Nousiainen	2010-12-02
      bug#58277 a02_meta.diff
      drop trigger in TUP sets index to Dropping
[2 Dec 2010 18:11] 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/125842

3361 Pekka Nousiainen	2010-12-02
      bug#58277 a03_scan.diff
      fix known crashes and return error to user
[3 Dec 2010 20:35] 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/126016

3362 Pekka Nousiainen	2010-12-03
      bug#58277 a04_fix1.diff
      fix a typo
[5 Dec 2010 13:01] 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/126056

3363 Pekka Nousiainen	2010-12-05
      bug#58277 a05_fix2.diff
      remove state assert in drop index
[5 Dec 2010 16:33] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.21 (revid:pekka@mysql.com-20101205162912-elkrs6irz4pqqdbl) (version source revid:pekka@mysql.com-20101205162912-elkrs6irz4pqqdbl) (merge vers: 5.1.51-ndb-7.0.21) (pib:23)
[5 Dec 2010 16:41] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.40 (revid:pekka@mysql.com-20101205163637-4f55s2burds7k3td) (version source revid:pekka@mysql.com-20101205163637-4f55s2burds7k3td) (merge vers: 5.1.51-ndb-6.3.40) (pib:23)
[5 Dec 2010 19:02] Jonas Oreland
pushed to 6.3.40, 7.0.21 and 7.1.10
[13 Dec 2010 3:19] Jon Stephens
Documented fix in the NDB-6.3.40, 7.0.21, and 7.1.10 changelogs as follows:

        Trying to drop an index while it was being used to perform a
        scan caused data nodes to crash.

Closed.
[1 Jan 2011 15:43] Pekka Nousiainen
Re-opened since there is a stored proc memory leak.
A similar leak (but not related to index drop) occurs
in bug#57057.
[3 Jan 2011 10:58] 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/127769

3373 Pekka Nousiainen	2011-01-03
      bug#58277,bug#57057 a06_fix3.diff
      MRR scan and drop or delete fail to release stored proc
[3 Jan 2011 11:03] 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/127770

3374 Pekka Nousiainen	2011-01-03
      bug#58277,bug#57057 a07_fix4.diff
      ifdef on ERROR_INSERT, add to daily-basic-tests
[3 Jan 2011 16:01] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.21 (revid:pekka@mysql.com-20110103150841-7tgh4tfp10wsvz9k) (version source revid:pekka@mysql.com-20110103150841-7tgh4tfp10wsvz9k) (merge vers: 5.1.51-ndb-7.0.21) (pib:24)
[3 Jan 2011 16:02] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.40 (revid:pekka@mysql.com-20110103110242-3wsx0gxnnnoa0ue0) (version source revid:pekka@mysql.com-20110103110242-3wsx0gxnnnoa0ue0) (merge vers: 5.1.51-ndb-6.3.40) (pib:24)
[3 Jan 2011 18:09] 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/127814

3375 Pekka Nousiainen	2011-01-03
      bug#58277 a08_fix5.diff
      signed vs unsigned warning
[3 Jan 2011 18:18] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.21 (revid:pekka@mysql.com-20110103181025-2ai4olh4c4ugfq9n) (version source revid:pekka@mysql.com-20110103181025-2ai4olh4c4ugfq9n) (merge vers: 5.1.51-ndb-7.0.21) (pib:24)
[3 Jan 2011 18:19] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.40 (revid:pekka@mysql.com-20110103180706-dqlg8zkaj1ldzgrb) (version source revid:pekka@mysql.com-20110103180706-dqlg8zkaj1ldzgrb) (merge vers: 5.1.51-ndb-6.3.40) (pib:24)