From owner-freebsd-current Fri Jun 8 5:50:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 8FA1437B409 for ; Fri, 8 Jun 2001 05:50:29 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id IAA17612; Fri, 8 Jun 2001 08:49:45 -0400 (EDT) Date: Fri, 8 Jun 2001 08:49:44 -0400 (EDT) From: Daniel Eischen To: Idea Receiver Cc: freebsd-current@FreeBSD.ORG Subject: Re: pthread and write() In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 8 Jun 2001, Idea Receiver wrote: > I dont know if this is cause by -current, I have not yet try on the > -stable. However, I just write here, maybe someone can help me.. :P > > recently, I wrote a multithread network server for my work. what it does > is to accept TCP connection from remote, and then put it into a new > thread. I have wrote a simulation client to test this application i > wrote. The simulation client will keep opening multi connection to the > server, and keep sent a 8byte structure to server using loop and > sleep(1) in between each write(). Also each of the thread created by > server will simply reply a 8byte structure to its client (using > write() again). > > When the client bring up "enough" (between 300-1000) connection to > the server, then the server will core dump around 30mis to 1hr time. > After I trace the problem, I found it is cause by write() with signal > 11. then i use gdb to trace out the problem. follow is what i get from > gdb: > > Program received signal SIGSEGV, Segmentation fault. > 0x28121637 in _fd_lock_backout () from /usr/lib/libc_r.so.4 You're not running -current if you're using libc_r.so.4. We're at libc_r.so.5. And fd locks have also been disabled in -current. -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message