Date: Fri, 5 Jun 1998 10:31:44 -0400 (EDT) From: "Ron G. Minnich" <rminnich@Sarnoff.COM> To: hackers@FreeBSD.ORG Subject: ECONNREFUSED on a READ? Message-ID: <Pine.SUN.3.91.980605102331.5206A-100000@terra>
next in thread | raw e-mail | index | archive | help
5606 telnet CALL socket(0x2,0x2,0) 5606 telnet RET socket 3 5606 telnet CALL connect(0x3,0x200ac010,0x10) 5606 telnet RET connect 0 5606 telnet CALL sendto(0x3,0xefbfcfd8,0x16,0,0,0) 5606 telnet GIO fd 3 wrote 22 bytes "\^B\M-Z\^A\0\0\^A\0\0\0\0\0\0\^Dc126\0\0\^A\0\^A" 5606 telnet RET sendto 22/0x16 5606 telnet CALL poll(0xefbfcd88,0x1,0x2710) 5606 telnet RET poll 1 5606 telnet CALL recvfrom(0x3,0xefbfd884,0x400,0,0xefbfce10,0xefbfcd7c) 5606 telnet RET recvfrom -1 errno 61 Connection refused 5606 telnet CALL close(0x3) So we have a socket, make a connection on it, sendto on it, then do a recvfrom on it and get an error. I'm seeing this on a FreeBSD 3.0-971110-SNAP #0: Sat Jan 6 23:54:11 EST 1996 root@c064:/usr/src/sys/compile/SMP-CLUSTER On almost any program. Further tracing of programs I have shows that a remote client is successfully making a connect(), and the server here is successfully doing an accept(), but the first read() from the socket gets ECONNREFUSED. ?? Before anyone argues that you can't use recvfrom on a connected socket: Recvfrom() and recvmsg() are used to receive messages from a socket, and may be used to receive data on a socket whether or not it is connection- oriented. In fact recv is redundant, as per the man page. This code has been working for 2.5 years on various versions of linux and freebsd. (it's the ZOUNDS dsm). Any hints would be most helpful. ron Ron Minnich |Java: an operating-system-independent, rminnich@sarnoff.com |architecture-independent programming language (609)-734-3120 |for Windows/95 and Windows/NT on the Pentium ftp://ftp.sarnoff.com/pub/mnfs/www/docs/cluster.html To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.980605102331.5206A-100000>