Bug #39158 MgmtSrvr::allocNodeId leaves mutex locked after "Ambiguity for node if %d" error
Submitted: 1 Sep 2008 14:39 Modified: 5 Oct 2008 16:34
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:6.2 OS:Any
Assigned to: Magnus Blåudd CPU Architecture:Any

[1 Sep 2008 14:39] Magnus Blåudd
Description:
msvensson@pilot:~/mysql/6.2/storage/ndb/src/mgmsrv$ bzr diff
=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-07-29 09:39:57 +0000
+++ storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2008-09-01 14:38:15 +0000
@@ -2339,6 +2339,7 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId,
 			  "or specifying unique host names in config file,\n"
 			  "or specifying just one mgmt server in config file.",
 			  tmp);
+      NdbMutex_Unlock(m_configMutex);
       error_code = NDB_MGM_ALLOCID_CONFIG_MISMATCH;
       DBUG_RETURN(false);
     }

How to repeat:
MCI

Suggested fix:
Unlock the mutex before leaving function
[1 Sep 2008 14:41] 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/53008

2643 Magnus Svensson	2008-09-01
      Bug#39158  MgmtSrvr::allocNodeId leaves mutex locked after 'Ambiguity for node if %d' error
[2 Sep 2008 9:30] Magnus Blåudd
Pused to 6.2, 6.3 and 6.4
[3 Sep 2008 7:00] 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/53107

2641 Magnus Svensson	2008-09-02
      Bug#39158 MgmtSrvr::allocNodeId leaves mutex locked after "Ambiguity for node if %d" error
[3 Sep 2008 7:05] 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/53108

2745 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[3 Sep 2008 7:05] 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/53109

2745 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[3 Sep 2008 7:45] 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/53117

2682 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[3 Sep 2008 7:45] 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/53118

2673 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[3 Sep 2008 7:45] 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/53119

2673 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[3 Sep 2008 7:45] 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/53120

2682 Magnus Svensson	2008-09-02 [merge]
      Merge bug#39158
[12 Sep 2008 8:28] Jon Stephens
Documented bugfix in the NDB 6.2.16 and 6.3.17 changelogs as follows:

        MgmtSrvr::allocNodeId left a mutex locked following an Ambiguity for
        node if %d error.
[5 Oct 2008 16:34] Jon Stephens
Appears to have been merged to NDB 6.2/6.3/6.4; closed.
[12 Dec 2008 23:27] Bugs System
Pushed into 6.0.7-alpha  (revid:msvensson@mysql.com-20080902092709-bgyt04qui9jr5oda) (version source revid:tomas.ulin@sun.com-20080902154454-pvi3xa61d2wtxtbg) (pib:5)