Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jun 2013 12:05:38 +0400
From:      Vagner <vagner@bsdway.ru>
To:        Konstantin Belousov <kostikbel@gmail.com>
Cc:        FreeBSD hackers Mail List <freebsd-hackers@freebsd.org>
Subject:   Re: Where is stack of program?
Message-ID:  <20130611080538.GA2645@vagner-wrk.bsdway.ru>
In-Reply-To: <20130611054544.GI3047@kib.kiev.ua>
References:  <20130610164425.GA2966@vagner-wrk.bsdway.ru> <20130611054544.GI3047@kib.kiev.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08:45 Tue 11 Jun , Konstantin Belousov wrote:
> On Mon, Jun 10, 2013 at 08:44:25PM +0400, Vagner wrote:
> > Hi!
> > I need method of finding in struct vm_map or vm_object segments of
> > memory which is situated in the stack.
> > Can you help me please?
> 
> Note that the stack is per-thread.  The concept is somewhat machine-specific,
> some architectures utilize two stacks, on some the stack is purely software
> convention.
> 
> You did not specified what context your code is to be run, e.g. is
> it kernel or user space ? Assuming it is kernel since you mentioned
> vm_something. The least error prone route is the thread context (frame)
> -> tf_esp on i386 (or tf_rsp on amd64) -> lookup of the map entry in the
> process p_vmspace.
> 
> In reality, the stack is often fragmented, since the stack grow code
> does not coalesce the adjacent grow-down map entries.

I asket the question because in my servers run very large daemons (writed their own). Then daemons get 
signal for create coredump, downtime approximately 1h. This is very long for daemons in
production. Often in coredump for debug need only stack and current
frame of code, but in function, which initialise for create dump of
memory haven't this possibility. Linux have /proc/self/coredump_filter
for settings what segments included in core file, but in our FreeBSD I
don't find this:( Help me for find solution please

-- 
Respectfully,
Stanislav Putrya
System administrator
FotoStrana.Ru Ltd.
ICQ IM: 328585847
Jabber-GoogleTalk: root.vagner
mob.phone SPB: +79215788755
mob.phone RND: +79525600664
email: vagner[at]bsdway.ru
email: putrya[at]playform.ru
email: root.vagner[at]gmail.com
site: bsdway.ru
site: fotostrana.ru

----------------------------------------
 ( ) ASCII ribbon campaign
  X  - against HTML, vCards and
 / \ - proprietary attachments in e-mail



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