gcore thread problem?

Alfred Perlstein alfred at freebsd.org
Tue Dec 11 12:28:00 PST 2007


* Ed Maste <emaste at freebsd.org> [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


More information about the freebsd-threads mailing list