Sockets stuck in CLOSED state...
wojtek at wojtek.tensor.gdynia.pl
Wed Jun 18 14:47:36 UTC 2008
> tcp4 0 0 220.127.116.11.* 18.104.22.168.42149 CLOSED
> tcp4 39 0 22.214.171.124.* 126.96.36.199.54103 CLOSED
> tcp4 35 0 188.8.131.52.* 184.108.40.206.41718 CLOSED
> tcp4 38 0 220.127.116.11.* 18.104.22.168.55618 CLOSED
> tcp4 41 0 22.214.171.124.* 126.96.36.199.44230 CLOSED
> tcp4 39 0 188.8.131.52.* 184.108.40.206.49439 CLOSED
> These never go away; they gradually increase and increase until the
> application starts giving errors (probably because some socket or
> filedescriptor limit is reached). When the application is killed these
> entries disappear.
> The application in question is a self written DNS server, multithreaded, and
> running fine for years without any troubles on both BSD 5.x as well as 6.x.
> Also 32bits as well as 64bits on 6.x.
do "stupid" thing - in your source add
#define socket TEST_SOCKET
#define connect TEST_CONNECT
#define bind TEST_BIND
#define listen TEST_LISTEN
....all other network functions you use same way here!
and write one .c program where all these TEST_* functions are defined,
doing the same as original PLUS logging to file.
after a while (when you see this closed/unclosed connections) stop it and
look at logs.
i'm almost sure you will notice where is a problem.
possibly threads implementation changed...
More information about the freebsd-questions