Bug #38424 Ndb_mgmd resource leak in 'sendStopMgmd' if connection to mgmd fails
Submitted: 29 Jul 2008 11:31 Modified: 5 Oct 2008 18:27
Reporter: Magnus Blaudd
Status: Closed
Category:Server: Cluster Severity:S2 (Serious)
Version:5.1-telco-6.2 OS:Any
Assigned to: Magnus Blaudd Target Version:6.2
Triage: Needs Triage: D3 (Medium)

[29 Jul 2008 11:31] Magnus Blaudd
Description:
In function 'sendStopMgmd' the create mgm handle will not be freed if an error is found
in the function. For example if connect to mgmd fails, call of 'ndb_mgm_stop' fails of if
'ndb_mgm_restart2' fails.

How to repeat:
valgrind, MCI

Suggested fix:
Add calls to 'ndb_mgm_destroy_handle'
[29 Jul 2008 11:40] 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/50630

2636 Magnus Svensson	2008-07-29
      Bug#38424 Ndb_mgmd resource leak in 'sendStopMgmd' if connection to mgmd fails
[30 Jul 2008 1:21] Stewart Smith
looks good. approved.
[1 Aug 2008 15:44] Magnus Blaudd
Pushed to 6.2, 6.3 and 6.4
[4 Aug 2008 12:56] 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/50865
[11 Sep 2008 20:28] Jon Stephens
Documented in the NDB 6.2.16 and 6.3.17 changelogs as follows:

        A failed connection to the management server could cause a resource leak
        in ndb_mgmd.
[5 Oct 2008 18:27] Jon Stephens
Already documented; closed.
[13 Dec 2008 0:27] Bugs System
Pushed into 6.0.6-alpha  (revid:msvensson@mysql.com-20080729093957-zzzgty0wdijl7dvp)
(version source revid:jonas@mysql.com-20080812185642-1nevjb94zj621dqx) (pib:5)