From owner-freebsd-smp Fri Apr 9 17:47:54 1999 Delivered-To: freebsd-smp@freebsd.org Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (Postfix) with ESMTP id 22F6714DD5 for ; Fri, 9 Apr 1999 17:47:48 -0700 (PDT) (envelope-from tlambert@usr01.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id RAA20139; Fri, 9 Apr 1999 17:45:36 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp03.primenet.com, id smtpd020117; Fri Apr 9 17:45:27 1999 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id RAA05886; Fri, 9 Apr 1999 17:45:27 -0700 (MST) From: Terry Lambert Message-Id: <199904100045.RAA05886@usr01.primenet.com> Subject: Re: concurrent select()s on listen socket broken under SMP To: dot@dotat.at (Tony Finch) Date: Sat, 10 Apr 1999 00:45:26 +0000 (GMT) Cc: smp@FreeBSD.ORG In-Reply-To: from "Tony Finch" at Apr 9, 99 12:16:22 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-smp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > >The basic reason behind this is (aside from the non-standard behaviour and > >fairness issues) is that select() can notify a process that multiple > >sockets are ready to be dealt with, while a process will probably only be > >able to deal with one at a time. > > thttpd deals with all the ready descriptors between calls to select() I think it is bogus to put the code to deal with this problem into each and every user space application, just like I think the Apache hacks to alarm out of shutdown(2) and call close(2) and expect the close(2) (which implies a shutdown(2)) to break things out of the FIN_WAIT_2 state to deal with what is an obvious design error (one packet out, two packets in response, just like Window SMB and NetWare NCP file locks). It's on the order of bogosity of having a link manager that can't base link up/down decisons on who's generating the traffic, or having to bind sockets to IP addresses in order to bind them to an interface, such that every time the IP address changes, you have to restart your daemons. Bletch. Poor design is poor design. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message