Date: Mon, 18 Apr 2005 08:56:36 -0500 From: Archie Cobbs <archie@dellroad.org> To: Daniel Eischen <deischen@freebsd.org> Cc: freebsd-threads@freebsd.org Subject: Re: Bug with pthread_getspecific() and signals Message-ID: <4263BC94.9040308@dellroad.org> In-Reply-To: <Pine.GSO.4.43.0504180031070.26675-100000@sea.ntplx.net> References: <Pine.GSO.4.43.0504180031070.26675-100000@sea.ntplx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Daniel Eischen wrote: >>Does POSIX say that pthread_getspecific can be used in signal handler ? > > I don't think using it in a signal handler should cause a problem > for our implementation though. Probably the real problem is that > the signal handler is not running in the expected thread. I'd > double check the signal masks and make sure there is only one > thread that could possibly handle the signal. This is a synchronous signal (SIGSEGV) and it's occurring in application code. So it should be delivered to the thread that caused it, right? That's what almost always happens. Also, the this occurs on the second SIGSEGV. When the first one is delivered, pthread_getspecific() and pthread_self() return the correct values. Other random notes: most of the time this bug doesn't happen. However with this particular application, it happens 100% of the time. Still working on a simple test case... if you want a large and complex test case I have that already... :-) -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4263BC94.9040308>