2013-04-29 08:00:23

by Mike Galbraith

[permalink] [raw]
Subject: perf: report loops endlessly if record was killed via SIGTERM

Boring notabug report, but..

(Dr. Dr., perf acts all dainbramaged when you shoot it in the head)

reproducer: perf record -a -g& sleep 1;whatever;killall perf

Discovered because AIM7 needs input, and does not run properly when
profiled via the more conventional perf record -a -g -- ./multitask -nl
-f. Ergo, start perf record, run AIM7, kill perf. Say SIGINT instead,
and it works as expected. SIGTERM leaves perf.data in a bad state that
report can't deal with, but it'll happily keep trying forever.

Only mentioned because some other user might try to workaround input
nogo thingy and meet the same.

-Mike


2013-04-29 11:27:21

by David Ahern

[permalink] [raw]
Subject: Re: perf: report loops endlessly if record was killed via SIGTERM

On 4/29/13 4:00 AM, Mike Galbraith wrote:
> Say SIGINT instead,
> and it works as expected. SIGTERM leaves perf.data in a bad state that
> report can't deal with, but it'll happily keep trying forever.

header is usually updated on_exit which requires a clean exit. perhaps
we should add SIGTERM to the signal list.

David

2013-04-29 11:43:30

by Mike Galbraith

[permalink] [raw]
Subject: Re: perf: report loops endlessly if record was killed via SIGTERM

On Mon, 2013-04-29 at 07:27 -0400, David Ahern wrote:
> On 4/29/13 4:00 AM, Mike Galbraith wrote:
> > Say SIGINT instead,
> > and it works as expected. SIGTERM leaves perf.data in a bad state that
> > report can't deal with, but it'll happily keep trying forever.
>
> header is usually updated on_exit which requires a clean exit. perhaps
> we should add SIGTERM to the signal list.

Yeah. Graceful exit, and idiot proofing for free :)

-Mike