From owner-freebsd-threads@FreeBSD.ORG Tue Dec 11 20:28:00 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1538F16A419; Tue, 11 Dec 2007 20:28:00 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 1318213C44B; Tue, 11 Dec 2007 20:28:00 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AF37B1A4D7E; Tue, 11 Dec 2007 12:10:03 -0800 (PST) Date: Tue, 11 Dec 2007 12:10:03 -0800 From: Alfred Perlstein To: Ed Maste Message-ID: <20071211201003.GA61429@elvis.mu.org> References: <90242b1f0611220412l4ef4c92jd6f3e308f7c882fd@mail.gmail.com> <20071211195541.GA51608@sandvine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071211195541.GA51608@sandvine.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: gcore thread problem? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2007 20:28:00 -0000 * Ed Maste [071211 12:08] wrote: > On Wed, Nov 22, 2006 at 05:42:33PM +0530, Vaidehi Shukla wrote: > > > 'gcore' doesn't display correct backtrace (info threads) for multi-threaded > > application. Is there any way to get correct backtrace (i.e. info threads) > > with gcore in freebsd?. Let me know if you can suggest some method to get > > correct backtrace. > > I've patched gcore to use the ptrace(2) interface instead of procfs to get > the per-thread state and plan to commit this in the not-too-distant future. > > One issue with the change though is that gcore can currently create a core > asynchronously (i.e., without stopping the process). The core may have > inconsistent data in it in this case, but it may be that the process is > critical and cannot be stopped during the core creation. The ptrace > change I made requires the process to be stopped for at least a short > interval. Can you leave in the procfs utility as well? This seems to be somewhat of a step backwards as you are quite correct that there may be a critical process that can not be stopped. -- - Alfred Perlstein