Bug #11898 NDB_MGMD not releasing resources
Submitted: 13 Jul 2005 5:38 Modified: 27 Jul 2005 22:50
Reporter: Rod Bacon Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1 OS:Linux (Debian Sarge)
Assigned to: Tomas Ulin CPU Architecture:Any

[13 Jul 2005 5:38] Rod Bacon
Description:
Other users in the form posted questions a while back about errors occurring when using external applications to monitor a MySQL cluster. I am experiencing the same thing since I've started using Nagios to connect to the NDB_MGMD daemon and issue a "show" command.

The error in question is "Warning, event thread startup failed, degraded printouts as result" when I connect to the management node and check it's status. It would appear as though the process is unable to create a new thread.

I believe that the problem is being caused by file descriptors? that are not being released once the process is executed.

My /proc/xxxx/fd directory steadliy grows with each check, as does each fd directory in /prox/xxxx/task/xxxx subdirectory.

How to repeat:
Execute "ndm_mgm -e show" until the problem occurrs.
[13 Jul 2005 9:13] Hartmut Holzgraefe
The ndb_mgmd seems to be leaking file descriptors for the mgmapi client connection,
i see file desriptors piling up in /proc/#pid/fd and lots of sockets in CLOSE_WAIT state
in netstat output that are owned by ndb_mgmd
[14 Jul 2005 10:51] 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/internals/27060
[14 Jul 2005 13:12] 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/internals/27071
[14 Jul 2005 14:08] 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/internals/27077
[15 Jul 2005 7:29] 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/internals/27134
[15 Jul 2005 9:09] 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/internals/27138
[15 Jul 2005 9:38] Tomas Ulin
pushed into 4.1.14 (and will go into 5.0.10)
[27 Jul 2005 22:50] Mike Hillyer
Documented in 4.1.14 and 5.0.10 changelogs: 

<listitem><para><literal>NDB_MGMD</literal> was leaking file descriptors. (Bug #11898)</para></listitem>