Bug #26720 Infinite loop on unknown signal in logging function
Submitted: 28 Feb 2007 14:46 Modified: 9 Mar 2007 1:18
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1 5.0 5.1 OS:Linux (Linux)
Assigned to: Tomas Ulin
Tags: cluster

[28 Feb 2007 14:46] Geert Vanderkelen
Description:
We saw a case where trace logs are going over 80GB filling up with 'Unknown signal type'.

--------- Begin Packed Signals --------
--------------- Signal ----------------
r.bn: 247 "DBLQH", length: 4 "COMMIT"
Signal data: H'0000947c H'000044ad H'00800800 H'00360004
--------------- Signal ----------------
r.bn: 247 "DBLQH", length: 4 "COMMIT"
Signal data: H'0000000b H'00370004 H'00000001 H'00380004
--------------- Signal ----------------
r.bn: 247 "DBLQH", length: 4 "COMMIT"
Signal data: H'00000001 H'00390015 H'ffffff00 H'ffffffff
Unknown signal type
Unknown signal type
Unknown signal type

This looks like an infinite loop and indeed, it is:

In ./storage/ndb/src/common/debugger/signaldata/PackedSignal.cpp, function printPACKED_SIGNAL(), the for-loop contains a switch where the default case doesn't increment the variable i.

The reason why it goes in this loop is an other problem which is not identified yet, but it should not fill up the harddrives..

How to repeat:
No idea. But the code shows that it can go in an infinite loop and this has happened.

Suggested fix:
    default:
      fprintf(output, "Unknown signal type\n");
    }

Print the Unknown signal only ones and bail out probably setting some flag and check each loop.. Can't really return as there is some output afterwards.
[28 Feb 2007 16:01] Geert Vanderkelen
Cluster development acknowledged the problem with the FOR-loop. Setting this bug to Verified.
[2 Mar 2007 1:57] 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/20966
[8 Mar 2007 16:39] Tomas Ulin
fixed in 5.0.38 5.1.17 ndb-6.1.5
[9 Mar 2007 1:18] 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 in 5.0.38, 5.1.17, and ndb-6.1.14 changelogs (assuming that 6.1.14 was intended, not 6.1.5).
[13 Mar 2007 0:38] Jon Stephens
Fix for telco was actually documented in changelog for mysql-5.1.16-ndb-6.2.0.
[16 Mar 2007 3:05] Jon Stephens
Disregard previous comment - change was documented for ndb-6.1.4.