From owner-freebsd-threads@FreeBSD.ORG Mon Apr 18 01:45:05 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 A646216A4CE; Mon, 18 Apr 2005 01:45:05 +0000 (GMT) Received: from mxsf09.cluster1.charter.net (mxsf09.cluster1.charter.net [209.225.28.209]) by mx1.FreeBSD.org (Postfix) with ESMTP id 377B943D2D; Mon, 18 Apr 2005 01:45:05 +0000 (GMT) (envelope-from archie@dellroad.org) Received: from mxip18.cluster1.charter.net (mxip18a.cluster1.charter.net [209.225.28.148])j3I1j3DV010045; Sun, 17 Apr 2005 21:45:03 -0400 Received: from cable-68-113-94-164.mtv.al.charter.com (HELO InterJet.dellroad.org) (68.113.94.164) by mxip18.cluster1.charter.net with ESMTP; 17 Apr 2005 21:45:03 -0400 X-Ironport-AV: i="3.92,106,1112587200"; d="scan'208"; a="1029577982:sNHT14774244" Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.2.2.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id UAA44964; Sun, 17 Apr 2005 20:37:32 -0500 (CDT) Received: from [127.0.0.1] (localhost [127.0.0.1])j3I1bVZK008905; Sun, 17 Apr 2005 20:37:31 -0500 (CDT) (envelope-from archie@dellroad.org) Message-ID: <42630F5B.9040306@dellroad.org> Date: Sun, 17 Apr 2005 20:37:31 -0500 From: Archie Cobbs User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <425FD527.1000102@dellroad.org> <4263095F.3040102@freebsd.org> In-Reply-To: <4263095F.3040102@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2005 01:45:05 -0000 David Xu 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. > > Does POSIX say that pthread_getspecific can be used in signal handler ? Not sure.. where do I check for that? In any case, pthread_self() is also returning the wrong value (presumably for the same reason). Unfortunately I haven't come up with a small test case yet. Could it be related to this bug? http://lists.freebsd.org/pipermail/freebsd-threads/2004-October/002618.html I ran the test program (on 4.9) and it seemed to work properly.. ? Thanks, -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com