Bug #11132 Connections stuck in CLOSE_WAIT
Submitted: 7 Jun 2005 9:37 Modified: 31 Jul 2005 19:07
Reporter: Jan Kneschke Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:4.1.12, 5.0.7 OS:Linux (Linux/EM64T (RHEL4))
Assigned to: Tomas Ulin CPU Architecture:Any

[7 Jun 2005 9:37] Jan Kneschke
Description:
connections from ndbd to mgmd is not closed of mgmd is shutdown.

How to repeat:
build a working cluster, check that the connections from ndbd to the mgmd are established:

$ lsof -Pnp <pidof ndbd>
... 192.168.45.142:50782->192.168.45.134:1186 (ESTABLISHED)

shutdown mgmd 

$ lsof -Pnp <pidof ndbd>
... 192.168.45.142:50782->192.168.45.134:1186 (CLOSE_WAIT)

the CLOSE_WAIT is not left at all.

Suggested fix:
close connections if remote side is closing the connection.
[8 Jun 2005 5:22] Jorge del Conde
Verified w/4.1.13 from bk
[15 Jun 2005 5: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/internals/26007
[15 Jun 2005 7:52] Stewart Smith
This patch is valid for 4.1, but things have to be done differently in 5.0.
[16 Jun 2005 11:25] Stewart Smith
Pushed to 5.0.8 and 4.1.13
[16 Jun 2005 16:02] 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/26080
[16 Jun 2005 17: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/internals/26088
[22 Jun 2005 0:34] Stewart Smith
patches have been pushed
[22 Jun 2005 3:03] 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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented fix in Change History for 4.1.13-Cluster, 5.0.8; marked as Closed.
[15 Jul 2005 8:31] Tomas Ulin
reverted bug-fix, it introduces another bug.  Ndbd's may get the same nodeid

In 4.1 the connection to the management server _must_ stay, that is how we ensure that the nodeids are reserved correctly
[15 Jul 2005 8:39] 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/27136
[31 Jul 2005 19:07] Jorge del Conde
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/