From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>, Ingo Molnar <mingo@redhat.com>,
Li Zhang <zhlcindy@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf, tools: Fix crash in 'perf trace'
Date: Fri, 12 Jun 2015 18:57:38 -0700 [thread overview]
Message-ID: <20150613015737.GA24169@us.ibm.com> (raw)
In-Reply-To: <20150612193525.GG6850@kernel.org>
Arnaldo Carvalho de Melo [acme@kernel.org] wrote:
| Em Thu, Jun 11, 2015 at 11:00:04PM -0700, Sukadev Bhattiprolu escreveu:
| > >From 6669ed960a3ee4f9a02790f60b6a73ffc82fd6de Mon Sep 17 00:00:00 2001
| > From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
| > Date: Fri, 12 Jun 2015 01:28:36 -0400
| > Subject: [PATCH] perf, tools: Fix crash in perf trace
| >
| > I get following crash on multiple systems and across several releases
| > (at least since v3.18).
|
| Trying it in perf/core I get:
|
Ah, I should have based on perf/core.
| util/evlist.c: In function ‘perf_evlist__mmap_read’:
| util/evlist.c:645:6: error: wrong type argument to unary exclamation
| mark
| if (!md->refcnt)
|
| Trying after changing it to !atomic_read(&md->refcnt)
|
| And it fixes the segfault that I reproduced, but this still looks
| strange, i.e. if it hit zero, then it should not have been used at this
| point anymore... Will look at it again in the weekend. :-\
I think its a small window - where application has started exiting,
and set the PERF_EVENT_STATE_EXIT flag, but has not exited "enough"
to issue a SIGCHLD. (Also we check the 'done' flag once - we could
get SIGCHLD just after the check?)
Anyway, the poll() in this window returns with POLLHUP and we unmap
the region.
Sukadev
next prev parent reply other threads:[~2015-06-13 1:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 6:00 [PATCH] perf, tools: Fix crash in 'perf trace' Sukadev Bhattiprolu
2015-06-12 19:35 ` Arnaldo Carvalho de Melo
2015-06-13 1:57 ` Sukadev Bhattiprolu [this message]
2015-06-18 8:17 ` [tip:perf/core] perf trace: Fix race condition at the end of started workloads tip-bot for Sukadev Bhattiprolu
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=20150613015737.GA24169@us.ibm.com \
--to=sukadev@linux.vnet.ibm.com \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=zhlcindy@linux.vnet.ibm.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.