close() of active socket does not work on FreeBSD 6

Greg Lewis glewis at eyesbeyond.com
Tue Dec 12 11:31:37 PST 2006


On Mon, Dec 11, 2006 at 03:46:12PM +0100, Arne H. Juul wrote:
> I've had problems with some tests hanging on FreeBSD 6/amd64. This happens
> both with diablo-1.5.0_07-b01 and the java/jdk15 compiled from ports.
> 
> After much digging we've determined that the root cause is that
> the guarantee in the socket.close() API, see the documentation at
> http://java.sun.com/j2se/1.5.0/docs/api/java/net/Socket.html#close()
> isn't fulfulled - the thread blocked in I/O on the socket doesn't wake up.
> 
> Here's a pretty small test program that demonstrates the problem (given
> that you're running sshd on port 22, if not change the port number to
> something that the program can connect to).  Is this a known problem?
> Does it happen for everybody on FreeBSD 6?

This is, unfortunately, a known problem.  See

http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/97921

-- 
Greg Lewis                          Email   : glewis at eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis at FreeBSD.org


More information about the freebsd-java mailing list