From owner-freebsd-threads@FreeBSD.ORG Mon Apr 18 04:34:19 2005 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 402DA16A4CE; Mon, 18 Apr 2005 04:34:19 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF04F43D5D; Mon, 18 Apr 2005 04:34:18 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j3I4YGf5018309; Mon, 18 Apr 2005 00:34:16 -0400 (EDT) Date: Mon, 18 Apr 2005 00:34:16 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <4263095F.3040102@freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: Archie Cobbs cc: freebsd-threads@freebsd.org Subject: Re: Bug with pthread_getspecific() and signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2005 04:34:19 -0000 On Mon, 18 Apr 2005, David Xu wrote: > Archie Cobbs wrote: > > > On FreeBSD 4.9 I'm seeing a bug where pthread_getspecific() sometimes > > returns the wrong value when invoked from within a signal handler. > > > > ISTR this bug was fixed in a later version of FreeBSD. However, I can't > > seem to find any reference to the bug, any information about when > > it was fixed, etc. (FreeBSD's mailing list search ability doesn't > > help much). > > > > If anyone knows any more details about this bug I'd appreciate knowing > > any more details. > > 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. -- DE