From: Date: June 16 2005 10:17am Subject: bk commit into 5.0 tree (stewart:1.1947) BUG#11132 List-Archive: http://lists.mysql.com/internals/26088 X-Bug: 11132 Message-Id: <20050616081756.AAABE1C2CB03@kennedy.flamingspork.com> Below is the list of changes that have just been committed into a local 5.0 repository of stewart. When stewart does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.1947 05/06/16 18:17:44 stewart@stripped +1 -0 BUG#11132 Connections stuck in CLOSE_WAIT This fixes the problem in 5.0 in the correct way. The previous patch (for 4.1) is only valid for 4.1 and is done at the right time for 4.1. ndb/src/kernel/main.cpp 1.50 05/06/16 18:17:37 stewart@stripped +6 -0 The ndbd angel process keeps the mgm connection open as it retains a reference to the socket. this means that when the mgm server is killed, the socket stays in CLOSE_WAIT (the ndb process will close() it okay in 5.0, as we reused it for a transporter but this isn't enough as the angel process still has a reference to that socket). so, by adding in a theConfig->closeConfiguration(); in the angel process, the ndb process is left with the only reference to the socket - which it can close whenever it likes (namely when the connection is terminated). # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: stewart # Host: kennedy.(none) # Root: /home/stewart/Documents/MySQL/5.0/bug11132 --- 1.49/ndb/src/kernel/main.cpp 2005-04-14 00:06:29 +10:00 +++ 1.50/ndb/src/kernel/main.cpp 2005-06-16 18:17:37 +10:00 @@ -101,6 +101,12 @@ */ catchsigs(true); + /** + * We no longer need the mgm connection in this process + * (as we are the angel, not ndb) + */ + theConfig->closeConfiguration(); + int status = 0; while(waitpid(child, &status, 0) != child); if(WIFEXITED(status)){