Date: Sat, 18 Nov 2000 13:37:42 -0500 (EST) From: Daniel Eischen <eischen@vigrid.com> To: Andrew Gallatin <gallatin@cs.duke.edu> Cc: Rich Bud <rbud@fortean.com>, freebsd-alpha@FreeBSD.ORG, deischen@FreeBSD.ORG, obrien@FreeBSD.ORG, jasone@FreeBSD.ORG Subject: Re: pthread_create under stable Message-ID: <Pine.SUN.3.91.1001118132234.4026A-100000@pcnet1.pcnet.com> In-Reply-To: <14870.51034.718619.739611@grasshopper.cs.duke.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.1001118132234.4026A-100000>