Probably not a kernel bug (was: Re: FreeBSD 7.0: sockets stuck in CLOSED state...)



On Fri, 27 Jun 2008, Robert Watson wrote:

I've asked Ali to do a bit more debugging and tracing of the application to see if we can reach any conclusions about this. In particular, if he traces to a file all file descriptor numbers returned by accept(2), then we can later compare that file with the leaked descriptors present in netstat/sockstat and decide whether the application *should* have known they were open or not.

Another public follow-up: Ali has been sending me debugging information privately due to the inclusion of application source code and IP addresses. Tracing of the application suggests that there is an application concurrency bug leading to one socket to be closed twice and another socket to be left open. The bug might be triggering in 7.x but not earlier releases because of the change to libthr, which can lead to more parallelism/asynchrony in the application.

In conclusion: we currently believe that this report of sockets stuck in the CLOSED state is not the result of a kernel bug. If any further information comes to light, I will send a followup.

Thanks,

Robert N M Watson
Computer Laboratory
University of Cambridge
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: thread safe SMTP module
    ... that a thread bug in Python. ... run into a problem with the socket. ... "A consequence of this is that file objects returned by the makefile ... at this point I think this is neither bug nor about thread blocking ...
    (comp.lang.python)
  • Re: sockets and threads (solved)
    ... thread overwrote the socket and in the end all used the same connection.. ... I'm getting more and more defensive about this kind of bug. ... Thread.new {sleep 0.001; a << i} ...
    (comp.lang.ruby)
  • [PATCH] knfsd: Fix a race in closing NFSd connections.
    ... There is a bug introduced in 2.6.19 that can cause badness in the NFS ... server, particularly if you get clients closing connections while the server ... This patch fixed the bug and improves the handling of socket closing. ...
    (Linux-Kernel)
  • Re: [PATCH] fix race in AF_UNIX
    ... but just wishing a bug to get fixed won't accomplish anything. ... Somone just needs to find a way to only lock the socket as it is ... I'm not even convinced that your most recent attempt is deadlock free. ... It's doing trylocks and releasing all those locks within the same spin ...
    (Linux-Kernel)
  • Re: Disconnect causing READ_OP?
    ... Ignoring, with great difficulty, 98% of your message which consists of an ad hominem attack on me, I will deal with the ... Socket.shutdownInput() does not close the socket, contrary to what you said about a hundred messages ago, and Socket.shutdownOutputdoesn't either, although it can give the other end the impression that it has. ... There was a bug in this area concerning blocking socket channels with timeouts which is now closed, and there were lots of Channel I/O/select bugs in the early releases of JDK 1.4 which AFAIK are also now closed (although I ... another bug report - this time with shutdown*() calls as the ...
    (comp.lang.java.programmer)