From owner-freebsd-threads@FreeBSD.ORG Wed Sep 21 15:00:35 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9456A16A41F for ; Wed, 21 Sep 2005 15:00:35 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E18A43D5C for ; Wed, 21 Sep 2005 15:00:29 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j8LF0TN8029712 for ; Wed, 21 Sep 2005 15:00:29 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j8LF0SBD029711; Wed, 21 Sep 2005 15:00:28 GMT (envelope-from gnats) Date: Wed, 21 Sep 2005 15:00:28 GMT Message-Id: <200509211500.j8LF0SBD029711@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Christopher Sean Morrison Cc: Subject: Re: kern/86029: undefined reference to `_thread_dump_info' X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Christopher Sean Morrison List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Sep 2005 15:00:35 -0000 The following reply was made to PR kern/86029; it has been noted by GNATS. From: Christopher Sean Morrison To: "Daniel M. Eischen" Cc: bug-followup@FreeBSD.org Subject: Re: kern/86029: undefined reference to `_thread_dump_info' Date: Wed, 21 Sep 2005 10:50:35 -0400 The issue is not with libpthread (i.e. -lpthread) but with the -pthread option to gcc. The symbol itself is provided via libc_r, not libpthread. As the bug report notes, everything works if I link against -lc_r which was unexpected when already passing -pthread. I'm also not contesting whether we should or shouldn't be using _thread_dump_info at all, it's just the symbol that exposed the issue. The difference here seems to be that gcc's -pthread option on amd64's behaves differently than other systems by not linking against c_r. If this was intentional, then I'd agree that it's not a bug. If it wasn't, the bug would perhaps be that it should be linking against -lc_r. We're seeing several other threading problems on AMD64 and some of them I believe are related to re-entrance issues and stack corruption. Crashes deep inside C library calls are particularly interesting. From other bug report traffic from a month or few ago, it would seem at least some of these issues may be fixed in a later release (we're sitting on 5.4).. Cheers! Sean On Sep 21, 2005, at 9:48 AM, Daniel M. Eischen wrote: > Yes, this is an internal function (it begins with an underscore). > It does not exist in libpthread. This bug should be closed.