From owner-freebsd-current Tue Sep 8 11:12:53 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA17135 for freebsd-current-outgoing; Tue, 8 Sep 1998 11:12:53 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp02.primenet.com (smtp02.primenet.com [206.165.6.132]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA17127 for ; Tue, 8 Sep 1998 11:12:50 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp02.primenet.com (8.8.8/8.8.8) id LAA19271; Tue, 8 Sep 1998 11:12:43 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp02.primenet.com, id smtpd019225; Tue Sep 8 11:12:35 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id LAA02029; Tue, 8 Sep 1998 11:12:33 -0700 (MST) From: Terry Lambert Message-Id: <199809081812.LAA02029@usr07.primenet.com> Subject: Re: Thread Problems To: info@highwind.com (HighWind Software Information) Date: Tue, 8 Sep 1998 18:12:33 +0000 (GMT) Cc: freebsd-current@FreeBSD.ORG In-Reply-To: <199809070646.CAA01061@highwind.com> from "HighWind Software Information" at Sep 7, 98 02:46:30 am 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-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Here at HighWind we are trying (really hard) to get our products to > work under FreeBSD. We tried v2.2.X and failed. Now, we are trying 3.0 > and also failing. > > Currently the situation is as follows, on startup, our application > starts a number of threads (via pthread_create). One calls "accept()", > others go off and do lots of "mmap()"'s to files and do other stuff to > various files on the local disk. > > After the first accept() comes in, the application appears to become > unresponsive. That is, the other threads make no progress. Check out > the ktrace: > 21620 typhoond CALL accept(0x6,0x10afd8,0x10afd4) > > That is it. The application SITS idle right here. Doing NOTHING. It > will respond to additional connections. So, it appears that the > "accept()" thread is still responsive. However, all other threads are > not responsive. You are aware of the fact the socket options are not inherited across a dup, dup2, fcntl( ..., F_DUPFD, ...), connect, accept, bind, etc., right? Frankly, this looks like the fd is not async. The only potentially blocking call should be select(). 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-current" in the body of the message