Bug #19318 valgrind: memory leak in ndb_mgmd
Submitted: 24 Apr 2006 22:08 Modified: 21 Jun 2006 4:46
Reporter: Stewart Smith Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S1 (Critical)
Version:5.0.21,5.1.10 OS:
Assigned to: Stewart Smith CPU Architecture:Any

[24 Apr 2006 22:08] Stewart Smith
Description:
==20917== 114 bytes in 1 blocks are definitely lost in loss record 10 of 41
==20917==    at 0x401B45A: malloc (vg_replace_malloc.c:149)
==20917==    by 0x80F2BA4: ConfigValuesFactory::create(unsigned, unsigned) (ConfigValues.cpp:303)
==20917==    by 0x80F2BE3: ConfigValuesFactory::getConfigValues() (ConfigValues.cpp:539)
==20917==    by 0x80A245C: InitConfigFileParser::run_config_rules(InitConfigFileParser::Context&) (InitConfigFileParser.cpp:218)
==20917==    by 0x80A37A2: InitConfigFileParser::parseConfig(_IO_FILE*) (InitConfigFileParser.cpp:167)
==20917==    by 0x80A38BC: InitConfigFileParser::parseConfig(char const*) (InitConfigFileParser.cpp:71)
==20917==    by 0x809BE81: MgmtSrvr::readConfig() (MgmtSrvrConfig.cpp:57)
==20917==    by 0x8094549: MgmtSrvr::MgmtSrvr(SocketServer*, char const*, char const*) (MgmtSrvr.cpp:445)
==20917==    by 0x8096861: main (main.cpp:249)

How to repeat:
will leak 114 bytes each time you run "ndb_mgm -e 'X restart'" where X is management node.

I don't think this affects mysqld.

Suggested fix:
patch (to come)
[24 Apr 2006 22:19] 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/5438
[24 Apr 2006 22: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/5439
[24 Apr 2006 23:36] 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/5442
[7 Jun 2006 16:59] 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/7364
[8 Jun 2006 6:50] Stewart Smith
from bug19318 clone

Attachment: ConfigInfo.cpp (text/x-c++src), 89.97 KiB.

[20 Jun 2006 9:09] Stewart Smith
pushed to 5.0.23 and 5.1.12
[21 Jun 2006 4:46] Paul Dubois
Noted in 5.0.23, 5.1.12 changelogs.