From owner-freebsd-current Sun Sep 6 23:46:44 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA28271 for freebsd-current-outgoing; Sun, 6 Sep 1998 23:46:44 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from highwind.com (hurricane.highwind.com [209.61.45.50]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA28246 for ; Sun, 6 Sep 1998 23:46:36 -0700 (PDT) (envelope-from info@highwind.com) Received: (from info@localhost) by highwind.com (8.8.6/8.8.6) id CAA01061; Mon, 7 Sep 1998 02:46:30 -0400 (EDT) Date: Mon, 7 Sep 1998 02:46:30 -0400 (EDT) Message-Id: <199809070646.CAA01061@highwind.com> From: HighWind Software Information To: freebsd-current@FreeBSD.ORG Subject: Thread Problems 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 mmap(0,0x310,0x1,0x1,0x13,0,0x6a000,0) 21620 typhoond RET mmap 571109376/0x220a7000 21620 typhoond CALL munmap(0x220a7000,0x310) 21620 typhoond RET munmap 0 21620 typhoond CALL mmap(0,0x3b0,0x1,0x1,0x13,0,0x6a000,0) 21620 typhoond RET mmap 571109376/0x220a7000 21620 typhoond CALL munmap(0x220a7000,0x3b0) 21620 typhoond RET munmap 0 21620 typhoond CALL mmap(0,0xa8,0x3,0x1,0x13,0,0,0) 21620 typhoond RET mmap 571109376/0x220a7000 21620 typhoond CALL munmap(0x220a7000,0xa8) 21620 typhoond RET munmap 0 21620 typhoond CALL mmap(0,0x3b0,0x3,0x1,0x13,0,0x6a000,0) 21620 typhoond RET mmap 571109376/0x220a7000 21620 typhoond CALL munmap(0x220a7000,0x3b0) 21620 typhoond RET munmap 0 21620 typhoond CALL mmap(0,0x8,0x1,0x1,0x13,0,0,0) 21620 typhoond RET mmap 571109376/0x220a7000 21620 typhoond CALL munmap(0x220a7000,0x8) 21620 typhoond RET munmap 0 > Good stuff up to here... We are about to get a connection... 21620 typhoond CALL gettimeofday(0x19dc30,0) 21620 typhoond RET gettimeofday 0 21620 typhoond CALL select(0,0x19dc78,0x19dcf8,0x19dd78,0x19dc64) 21620 typhoond RET select 0 21620 typhoond CALL sigprocmask(0x1,0) 21620 typhoond RET sigprocmask 0 21620 typhoond CALL gettimeofday(0x19dc08,0) 21620 typhoond RET gettimeofday 0 21620 typhoond CALL setitimer(0x1,0x19dc10,0) 21620 typhoond RET setitimer 0 21620 typhoond CALL sigprocmask(0x3,0) 21620 typhoond RET sigprocmask 0 21620 typhoond CALL fcntl(0x35,0x3,0) 21620 typhoond RET fcntl 2 21620 typhoond CALL fcntl(0x35,0x4,0x6) 21620 typhoond RET fcntl 0 21620 typhoond CALL setsockopt(0x35,0xffff,0x4,0x10af78,0x4) 21620 typhoond RET setsockopt 0 21620 typhoond CALL setsockopt(0x35,0xffff,0x8,0x10af78,0x4) 21620 typhoond RET setsockopt 0 21620 typhoond CALL writev(0x35,0x10ae50,0x5) 21620 typhoond GIO fd 53 wrote 70 bytes "400 System starting up - Try again in a few minutes (Typhoon v1.1.7)\r " 21620 typhoond RET writev 70/0x46 21620 typhoond CALL fstat(0x35,0x10af38) 21620 typhoond RET fstat 0 21620 typhoond CALL close(0x35) 21620 typhoond RET close 0 > Okay, we told that connection to go away. We'd expect to return to work. 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. -Rob ps. Of course, this application works just fine under Solaris, and Irix. Compiled "-O -Wall -Werror" To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message