gcore thread problem?

Ed Maste emaste at freebsd.org
Tue Dec 11 12:07:44 PST 2007

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


More information about the freebsd-threads mailing list