From owner-freebsd-current Fri Jun 8 17: 3:32 2001 Delivered-To: freebsd-current@freebsd.org Received: from magnesium.net (toxic.magnesium.net [207.154.84.15]) by hub.freebsd.org (Postfix) with SMTP id 223BA37B401 for ; Fri, 8 Jun 2001 17:03:30 -0700 (PDT) (envelope-from jasone@magnesium.net) Received: (qmail 51620 invoked by uid 1142); 9 Jun 2001 00:04:09 -0000 Date: 8 Jun 2001 17:04:09 -0700 Date: Fri, 8 Jun 2001 17:03:23 -0700 From: Jason Evans To: Idea Receiver Cc: current@freebsd.org Subject: Re: pthread and write() Message-ID: <20010608170323.H617@canonware.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from receiver@blueskybbs.yi.org on Thu, Jun 07, 2001 at 09:33:22PM +1000 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 Thu, Jun 07, 2001 at 09:33:22PM +1000, 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 > > can anyone plz help with this problem? is there anything important I > missed? This probably isn't enough information to be able to diagnose the problem (which may very well be in your application). Please provide an example program that exhibits the behavior. Thanks, Jason To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message