I'm running dante v1.2.1 as a SOCKS proxy server. The proxy works fine but at the end of the day there are around 40-50 or more child processes of sockd running even though there are no active connections.

lsof shows that the child processes all have sockets in the CLOSE_WAIT and FIN_WAIT2 state. These child processes stay in this state unless I manually killall/restart the daemon.

I'm running Gentoo Linux on a 2.6.24-23-xen kernel. I recently upgraded from dante v1.1.19-r4 which was giving me the exact same problem.

Is this a configuration issue with Dante, my system, or is it a coding issue in the dante source?

1 Answer 1


CLOSE_WAIT means the other side closed the connection. The socket will be closed after the local program closes the socket descriptor. There is no time-out for CLOSE_WAIT, so process can be stuck with a socket in this state indefinitely. When you kill the process and its children, they close sockets and they get closed. Run lsof and see if the children have the sockets open. If they do, then it looks like a bug in their code.

As for FIN_WAIT2, it's when local side waits for FIN,ACK from the other side to confirm closing the connection. However, there's a system-wide time-out on this state (see /proc/sys/net/ipv4/tcp_fin_timeout), which is by default 60s, so nothing should be stuck in this phase longer than a minute. BUT if seems that it's possible to code a program in such a way that a half-closed connection looks like an active one to the kernel, so the time-out won't kick in. Again, it would seem that you've found a bug.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .