All of lore.kernel.org
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: suzuki@in.ibm.com
Cc: kosaki.motohiro@gmail.com, jananive@linux.vnet.ibm.com,
	linux-kernel@vger.kernel.org, jeremy.fitzhardinge@citrix.com,
	d.hatayama@jp.fujitsu.com, andi@firstfloor.org,
	roland@hack.frob.com, amwang@redhat.com, hch@lst.de,
	torvalds@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com,
	mhiramat@redhat.com, akpm@linux-foundation.org,
	adobriyan@gmail.com, xemul@parallels.com, oleg@redhat.com,
	tj@kernel.org, avagin@openvz.org, gorcunov@openvz.org,
	james.hogan@imgtec.com, vapier@gentoo.org, rdunlap@xenotime.net,
	eparis@redhat.com, ananth@in.ibm.com,
	aravinda@linux.vnet.ibm.com, tarundeep.singh@in.ibm.com
Subject: Re: RFD: Non-Disruptive Core Dump Infrastructure
Date: Fri, 13 Sep 2013 22:47:32 -0400	[thread overview]
Message-ID: <5233CE44.7080605@jp.fujitsu.com> (raw)
In-Reply-To: <523146F1.7060905@in.ibm.com>

On 9/12/2013 12:45 AM, Suzuki K. Poulose wrote:
> On 09/12/2013 12:57 AM, KOSAKI Motohiro wrote:
>> (9/3/13 4:39 AM), Janani Venkataraman wrote:
>>> Hello,
>>>
>>> We are working on an infrastructure to create a system core file of a
>>> specific
>>> process at run-time, non-disruptively. It can also be extended to a
>>> case where
>>> a process is able to take a self-core dump.
>>>
>>> gcore, an existing utility creates a core image of the specified
>>> process. It
>>> attaches to the process using gdb and runs the gdb gcore command and then
>>> detaches. In gcore the dump cannot be issued from a signal handler
>>> context as
>>> fork() is not signal safe and moreover it is disruptive in nature as
>>> the gdb
>>> attaches using ptrace which sends a SIGSTOP signal. Hence the gcore
>>> method
>>> cannot be used if the process wants to initiate a self dump.
>>
>> Maybe I'm missing something. But why gcore uses c-level fork()? gcore
>> need to
>> call pthread-at-fork handler? No. gcore need to flush stdio buffer? No.
>>
> Let me clarify. If an application wants to dump itself, it has to do a
> fork() and then exec the gcore with the pid of the appication to
> generate the dump.

Oh, I did think the fork() is used for no application stop dump. But it is
incorrect.

Hmm. However, if an application _itself_ want to dump itself. They can avoid
to use signal handler properly. I'm missing the point of this discussion
completely.

So, I'd keep silence while.

> 
> So, if the application wants to initiate the dump from a signal handler
> context, it may lead to trouble.



      reply	other threads:[~2013-09-14  2:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <522472DA.4000702@linux.vnet.ibm.com>
2013-09-03  8:39 ` RFD: Non-Disruptive Core Dump Infrastructure Janani Venkataraman
     [not found]   ` <5225BA91.6080904@parallels.com>
2013-09-03 10:47     ` Janani Venkataraman
     [not found]       ` <5225C001.2010208@parallels.com>
2013-09-04 10:53         ` Janani Venkataraman
     [not found]           ` <52271A72.8080008@parallels.com>
2013-09-05  7:41             ` Janani Venkataraman
2013-09-04 17:52         ` Andi Kleen
2013-09-11 19:27   ` KOSAKI Motohiro
2013-09-12  4:45     ` Suzuki K. Poulose
2013-09-14  2:47       ` KOSAKI Motohiro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5233CE44.7080605@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=ananth@in.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=aravinda@linux.vnet.ibm.com \
    --cc=avagin@openvz.org \
    --cc=d.hatayama@jp.fujitsu.com \
    --cc=eparis@redhat.com \
    --cc=gorcunov@openvz.org \
    --cc=hch@lst.de \
    --cc=james.hogan@imgtec.com \
    --cc=jananive@linux.vnet.ibm.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=oleg@redhat.com \
    --cc=rdunlap@xenotime.net \
    --cc=roland@hack.frob.com \
    --cc=suzuki@in.ibm.com \
    --cc=tarundeep.singh@in.ibm.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vapier@gentoo.org \
    --cc=xemul@parallels.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.