From owner-freebsd-hackers Thu Mar 1 10:41:44 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from a.mx.everquick.net (a.mx.everquick.net [216.89.137.3]) by hub.freebsd.org (Postfix) with ESMTP id CC4C537B71C for ; Thu, 1 Mar 2001 10:41:38 -0800 (PST) (envelope-from eddy+public+spam@noc.everquick.net) Received: from localhost (eddy@localhost) by a.mx.everquick.net (8.9.0/8.8.7) with ESMTP id SAA29817; Thu, 1 Mar 2001 18:41:25 GMT X-EverQuick-No-Abuse: Report any e-mail abuse to Date: Thu, 1 Mar 2001 18:41:25 +0000 (GMT) From: "E.B. Dreger" To: Peter Dufault Cc: hackers@FreeBSD.ORG Subject: Re: Stupid debugging pthread question In-Reply-To: <200103011745.f21Hjts33386@hda.hda.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Date: Thu, 1 Mar 2001 12:44:39 -0500 (EST) > From: Peter Dufault > > This is a stupid question, basically it's how to debug something. > > I have four cooperating p-threaded processes. One of them keeps getting > a SIGSEGV with the address 0x752f422f. I'm not sure if that address is > always the same, but with a given compile it is. The thing that's a pain > is it is random. The four processes can run for a long time, or through > several tests to completion, and then the > nasty process gets that SIGSEGV. The thread that receives the SIGSEGV > is random, the stack of the SEGV'd thread is trash, the rest of the > threads in the offending process still have intact stacks. Arg! Sounds like maybe a buffer overrun or something might be trashing a return pointer. Not sure what the exact cause is, but if that address is not an actual address, I'd suspect that a return pointer is getting trashed. Any strings "/B/u" in your program? That would be stored as 0x752f422f. If you're using assembly with using %ebp for stack frame (yay!), then make certain %esp isn't getting corrupted. Eddy --------------------------------------------------------------------------- Brotsman & Dreger, Inc. EverQuick Internet / EternalCommerce Division E-Mail: eddy@everquick.net Phone: (316) 794-8922 --------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message