From owner-freebsd-hackers Fri Jun 5 07:32:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA01528 for freebsd-hackers-outgoing; Fri, 5 Jun 1998 07:32:24 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from terra.Sarnoff.COM (terra.sarnoff.com [130.33.11.203]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA01505 for ; Fri, 5 Jun 1998 07:32:15 -0700 (PDT) (envelope-from rminnich@Sarnoff.COM) Received: (from rminnich@localhost) by terra.Sarnoff.COM (8.6.12/8.6.12) id KAA05648; Fri, 5 Jun 1998 10:31:44 -0400 Date: Fri, 5 Jun 1998 10:31:44 -0400 (EDT) From: "Ron G. Minnich" X-Sender: rminnich@terra To: hackers@FreeBSD.ORG Subject: ECONNREFUSED on a READ? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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