From owner-freebsd-alpha Sat Nov 18 10:38: 5 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 969DB37B479; Sat, 18 Nov 2000 10:38:02 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id NAA05717; Sat, 18 Nov 2000 13:37:42 -0500 (EST) Date: Sat, 18 Nov 2000 13:37:42 -0500 (EST) From: Daniel Eischen To: Andrew Gallatin Cc: Rich Bud , freebsd-alpha@FreeBSD.ORG, deischen@FreeBSD.ORG, obrien@FreeBSD.ORG, jasone@FreeBSD.ORG Subject: Re: pthread_create under stable In-Reply-To: <14870.51034.718619.739611@grasshopper.cs.duke.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Sat, 18 Nov 2000, Andrew Gallatin wrote: > > Daniel Eischen writes: > > > Program received signal SIGSEGV, Segmentation fault. > > > 0x1600c1ff0 in _thread_kern_scheduler () > > > at /usr/src/lib/libc_r/uthread/uthread_kern.c:177 > > > 177 if ((_thread_run->flags & PTHREAD_FLAGS_PRIVATE) == 0) > > > > This isn't really enough to go on... > > > > I know the feeling... I'm pretty ignorant about debugging threads, so > please tell me -- How do we get you more info? Whats the traceback show? You can also help by running it under ktrace and see if it's failing after a scheduling signal (SIGPROF). You can also enable debug messages in either one of uthread_sig.c or uthread_kern.c (uncomment #define DBG_MSG at the beginning of either one of those files). You'll probably end up with too much being dumped initially, but you can comment out some of the unneeded DBG_MSGs. I'd just start with uthread_sig.c. One thing to look for is making sure the signal handler is executing on the alternal signal stack. This caused me problems before. The signal stack is set in uthread_init.c and stored in _thread_sigstack. In the signal handler in uthread_sig.c (_thread_sig_handler()), you can check to make sure that the stack pointer is somewhere within _thread_sigstack and _thread_sigstack - MINSTKSZ. Please also check thread_sigframe_add in uthread_sig.c. This is the routine that adds a signal frame to a threads stack and sets it up to invoke the signal wrapper. I think it's 64-bit clean, but you might want to make sure. If you can narrow down the problem, I can be of more help :-) -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message