From owner-freebsd-current Thu Sep 10 07:31:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA04150 for freebsd-current-outgoing; Thu, 10 Sep 1998 07:31:12 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from relay.mail.pipex.net (relay.mail.pipex.net [158.43.128.38]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id HAA04145 for ; Thu, 10 Sep 1998 07:31:10 -0700 (PDT) (envelope-from james.g.mansion@hsbcgroup.com) From: james.g.mansion@hsbcgroup.com Received: (qmail 21958 invoked from network); 10 Sep 1998 11:31:38 -0000 Received: from unknown (HELO hbmdtemime1.hsbcgroup.com) (193.129.96.77) by iprelay.mail.pipex.net with SMTP; 10 Sep 1998 11:31:38 -0000 Received: from hbmdtemime2.tex.hsbcmidland.com (unverified [128.4.110.202]) by hbmdtemime1.hsbcgroup.com (Integralis SMTPRS 2.0.15) with ESMTP id for ; Thu, 10 Sep 1998 12:26:50 +0100 Received: from hbmdtesmtp1.tex.hsbcmidland.com (unverified [128.4.110.200]) by hbmdtemime2.tex.hsbcmidland.com (Integralis SMTPRS 2.0.15) with SMTP id for ; Thu, 10 Sep 1998 12:29:37 +0100 Received: by hbmdtesmtp1.tex.hsbcmidland.com(Lotus SMTP MTA SMTP v4.6 (462.2 9-3-1997)) id 8025667B.003F986F ; Thu, 10 Sep 1998 12:34:37 +0100 X-Lotus-FromDomain: HSBCMERIDIAN@INTERNET To: freebsd-current@FreeBSD.ORG Message-Id: <8025667B.003F044A.00@hbmdtesmtp1.tex.hsbcmidland.com> Date: Thu, 10 Sep 1998 12:35:17 +0100 Subject: Re: Thread Problems MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG The latest edition of Stevens Network Programming has a discussion on this point. The accept should not be done in blocking mode, for exactly the reason suggested below. See; UNIX Network Programming 2ed, , W Richard Stevens, Prentice Hall International, ISBN 0-13-490012-X The discussion in S15.6,'Nonblocking accept', is pertinent. James Daniel Eischen on 10/09/98 11:40:39 To: eischen@vigrid.com, tlambert@primenet.com cc: freebsd-current@FreeBSD.ORG, info@highwind.com (bcc: James G MANSION/HBMD/HSBCMERIDIAN) Subject: Re: Thread Problems > > I tried to repeat the reported problem, but couldn't. I had > > one thread listening for client connections, a worker thread > > (printing a message once a second), and main. The thread > > listening for client connections would create a thread to > > handle the connection and go back to accepting more connections. > > I couldn't make it fail - the worker thread was always spewing > > out messages once a second. I even tried using fork to > > process each client request that came in - that worked also. > > We really need to get more information. > > Effectively, we have the select coming true before the accept call, > followed by the accept call blocking, even though the select was > true. > > In theory, this can't happen, even with a blocking fd. Actually, I think this can happen. We were able to reproduce this (under HP-UX, didn't try FreeBSD) but I forget the exact circumstances. I think it had something to do when the remote client attempted to make a connection but closed the socket before the connection was complete. I'll have to see if I can find it in my notes - it was 3 or 4 years ago... > This has got to be a code specific problem. Perhaps they made the > mistake of the LDAP implementors about number of descriptors, or > the meaning of "preemptive", and are engaged in a buzz-loop. 8-(. > > I just assumed that the person was running -current, and was seeing > what he thought he was seeing; on the other hand... I think he was running current - don't know how recent it was though. > It would be interesting to know what *exact* version of FreeBSD he > was running, as well. > > Also, if this is a Linux program running under emulation, it should > not be expected to work... No, I remember it being code they were porting to FreeBSD. Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message ********************************************************************** This message originated from the Internet. Its originator may, or may not be who they claim to be, and the information contained herein may, or may not be accurate. ********************************************************************** ************************************************************************ Midland Bank plc, who is regulated in the UK by SFA, has issued the information contained in this message (including any attached documents) for its non-private customers only. It should not be reproduced and/or distributed to any other person. It is not an invitation to buy or sell securities. Opinions may change without notice and members of the HSBC Group may have positions in, or trade in instruments mentioned in this message. Each page attached hereto must also be read in conjunction with any disclaimer which form part of it. ************************************************************************ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message