View Single Post
Old 12-06-2011, 09:42 PM  
Yil
Too much time...
 
Join Date: May 2005
Posts: 1,194
Default nxMyDB / MySQL libs to use

One problem any windows executable has, including ioFTPD, is that Microsoft stupidly made window's sockets inheritable by default. I'm pretty sure they acknowledged their poor design decision decades ago but decided not to fix it because it might break stuff back then. What this means is that any time you create a TCP socket, which happens a LOT as you might expect in an FTP server, you have the problem of passing that newly created handle to a child process before you can mark that handle as non-inheritable. To get around this you must wrap all process creation and socket creation code with a common lock. That includes any such use in any dll used by the server which includes the TCL library, mySQL, etc.

I was able to confirm that TCL sockets to things like IMDB would create inheritable sockets to unrelated spawned EXEC processes by the server. If those EXEC processes didn't exit quickly (like say windrop or a long running archiver) the server would get stuck. I'm pretty sure this wasn't the loader lockup bug if memory serves, but it was a lockup bug.

To fix this ioFTPD v7.4.5, for the first time, uses a modified TCL library so it can use the newly exposed locking primitives around socket and process creation. This fixed the problem for most users, but nxMyDB uses the mySQL client library which creates sockets to the mySQL database and thus it needed to be modified as well.

I'm pretty sure there are newer releases of the mySQL library, but for the limited uses in ioFTPD this version should be used.

Link: nxMyDB-v2.1.1-custom.zip

Link: libMySQL-v5.1.46-ioFTPD.zip
Yil is offline   Reply With Quote