Skip to content

Commit 0434d7c

Browse files
committed
Bug#37140331 MySQL NDB Cluster is crushing with Signal 8 error (Floating Point Exception) 2/2
Backport to 7.6 Problem: When a scan on ndbinfo table FRAG_MEM_USE or FRAG_OPERATIONS is performed, a DBINFO_SCANREQ signal is sent to LQH. during the handling of that signal, LHQ asks TUP about fragStats of all tables defined in the cluster. If in 'parallel' with the ndbinfo scan a create (or drop) table operation is on going, there could be a discrepancy between the view LHQ has of new table fragments and TUP view about those fragments, that can lead to a crash in both TUP/ACC or LQH. In particular, if DBINFO_SCANREQ finds the new table with status ADD_TABLE_ONGOING it could be impossible to TUP/ACC to get the status of the new table fragments since at that point, fragments information in TUP/ACC is not yet updated. In similar way, during drop table if the status of the target table in LQH is DROP_TABLE_* or PREP_DROP_* there could be differences between the view that LQH and TUP/ACC have of the fragments of that table. Solution: During scan of ndbinfo FRAG_MEM_USE or FRAG_OPERATIONS table, ignore all fragments from tables that could be in a transient state at that moment -- tables being created or dropped. There are more ndbinfo tables related to fragments that, theoretically, could have the same issue as the 2 fixed in this patch but none of those have a gap between the handling of the add (or release) table and the handling of its fragments in same or in a different block. Change-Id: I9aa6fc605bc31b9ece9e53f98bdfcbc21ea670e9
1 parent ac1d889 commit 0434d7c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31407,7 +31407,8 @@ void Dblqh::execDBINFO_SCANREQ(Signal *signal)
3140731407
TablerecPtr tabPtr;
3140831408
tabPtr.i = tableid;
3140931409
ptrAss(tabPtr, tablerec);
31410-
if (tabPtr.p->tableStatus != Tablerec::NOT_DEFINED)
31410+
if (tabPtr.p->tableStatus == Tablerec::TABLE_DEFINED ||
31411+
tabPtr.p->tableStatus == Tablerec::TABLE_READ_ONLY)
3141131412
{
3141231413
jam();
3141331414
// Loop over all fragments for this table.
@@ -31495,7 +31496,8 @@ void Dblqh::execDBINFO_SCANREQ(Signal *signal)
3149531496
TablerecPtr tabPtr;
3149631497
tabPtr.i = tableid;
3149731498
ptrAss(tabPtr, tablerec);
31498-
if (tabPtr.p->tableStatus != Tablerec::NOT_DEFINED)
31499+
if (tabPtr.p->tableStatus == Tablerec::TABLE_DEFINED ||
31500+
tabPtr.p->tableStatus == Tablerec::TABLE_READ_ONLY)
3149931501
{
3150031502
jam();
3150131503
// Loop over the fragments of this table.

0 commit comments

Comments
 (0)