From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Ian Munsie <imunsie@au1.ibm.com>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Frederic Weisbecker <fweisbec@gmail.com>,
Tom Zanussi <tzanussi@gmail.com>
Subject: Re: [PATCH] perf: prevent kill(0, SIGTERM);
Date: Thu, 17 Jun 2010 17:20:32 -0300 [thread overview]
Message-ID: <20100617202032.GC1626@ghostprotocols.net> (raw)
In-Reply-To: <1276072680-17378-1-git-send-email-imunsie@au1.ibm.com>
Em Wed, Jun 09, 2010 at 06:38:00PM +1000, Ian Munsie escreveu:
> At exit, perf record will kill the process it was profiling by sending a
> SIGTERM to child_pid (if it had been initialised), but in certain
> situations child_pid may be 0 and perf would mistakenly kill more
> processes than intended.
>
> child_pid is set to the return of fork() to either 0 or the pid of the
> child. Ordinarily this would not present an issue as the child calls
> execvp to spawn the process to be profilled and would therefore never
> run it's sig_atexit and never attempt to kill pid 0.
before:
[root@emilia mingo]# perf record bla
bla: No such file or directory
Terminated
after:
[root@emilia mingo]# perf record bla
bla: No such file or directory
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.006 MB perf.data (~259 samples) ]
[root@emilia mingo]#
Got it, queuing it in perf/urgent,
Thanks!
- Arnaldo
prev parent reply other threads:[~2010-06-17 20:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 8:38 [PATCH] perf: prevent kill(0, SIGTERM); Ian Munsie
2010-06-15 2:34 ` Ian Munsie
2010-06-17 20:20 ` Arnaldo Carvalho de Melo [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=20100617202032.GC1626@ghostprotocols.net \
--to=acme@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=imunsie@au1.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=tzanussi@gmail.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.