Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Dec 2007 14:55:41 -0500
From:      Ed Maste <emaste@freebsd.org>
To:        Vaidehi Shukla <vaidehi.shukla@gmail.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: gcore thread problem?
Message-ID:  <20071211195541.GA51608@sandvine.com>
In-Reply-To: <90242b1f0611220412l4ef4c92jd6f3e308f7c882fd@mail.gmail.com>
References:  <90242b1f0611220412l4ef4c92jd6f3e308f7c882fd@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-Ed



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071211195541.GA51608>