Date: Fri, 31 Aug 2001 02:38:20 -0700 From: Bill Huey <billh@gnuppy.monkey.org> To: Mikhail Kruk <meshko@cs.brandeis.edu> Cc: java@freebsd.org, glewis@eyesbeyond.com, Bill Huey <billh@gnuppy.monkey.org> Subject: Re: jdk1.3.1 socket problem Message-ID: <20010831023820.A20158@gnuppy> In-Reply-To: <Pine.LNX.4.33.0108271126100.16201-100000@calliope.cs.brandeis.edu> References: <55lmk5czi0.wl@tripper.private> <Pine.LNX.4.33.0108271126100.16201-100000@calliope.cs.brandeis.edu>
index | next in thread | previous in thread | raw e-mail
On Mon, Aug 27, 2001 at 11:29:16AM -0400, Mikhail Kruk wrote:
> OK, my first bug report sucked, it wasn't really jdk's problem and
> workaround is trivial.
> But I'll try again. Please let me know if it is not yet time for bug
> reports and I'll shut up :)
>
> When I try to run the following code sample I get:
> java.net.SocketException: errno: 56, error: Socket is already connected
> for fd: 4
>
> import java.net.*;
>
> public class test
> {
> public static void main(String[] args)
> {
> try
> {
> Socket socket = new Socket( "www.cs.brandeis.edu", 80);
> socket.close();
> }
> catch(Exception e)
> {
> System.err.println(e);
> }
> }
> }
Check this out:
[billh@finfin]$ ../../../bin/appletviewer example1.html
_X11TransOpenCOTSClient(tcp/gnuppy:0)
_X11TransOpen(1,tcp/gnuppy:0)
_X11TransParseAddress(tcp/gnuppy:0)
_X11TransSelectTransport(tcp)
_X11TransSocketOpenCOTSClient(tcp,gnuppy,0)
_X11TransSocketSelectFamily(tcp)
_X11TransSocketOpen(1,1)
_X11TransConnect(5,tcp/gnuppy:0)
_X11TransParseAddress(tcp/gnuppy:0)
_X11TransSocketINETConnect(5,gnuppy,0)
_X11TransSocketINETConnect: inet_addr(gnuppy) = ffffffff
_X11TransSocketINETConnect: sockname.sin_port = 6000
_X11TransSocketINETConnect: Can't connect: errno = 56
_X11TransClose(5)
_X11TransSocketINETClose(81ad580,5)
It's the debug log from XOpenDisplay and it's attempt at doing a connect().
/usr/include/sys/errno.h:#define EISCONN 56 /* Socket is already connected */
The problem with X remote display and connect() in that example are definitely related.
IP address value of 0xffffffff ? what hell ?
What do you think Greg ?
This could be a race of some sort. More investigation needed. ;-)
bill
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010831023820.A20158>
