Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353794 > unrolled thread
| Started by | Chris Phlipot <cphlipot0@gmail.com> |
|---|---|
| First post | 2016-03-09 06:20 +0100 |
| Last post | 2016-03-11 09:50 +0100 |
| Articles | 4 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") Chris Phlipot <cphlipot0@gmail.com> - 2016-03-09 06:20 +0100
Re: [PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") Jiri Olsa <jolsa@redhat.com> - 2016-03-09 09:10 +0100
Re: [PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-09 14:40 +0100
[tip:perf/core] perf tools: Fix perf script python database export crash tip-bot for Chris Phlipot <tipbot@zytor.com> - 2016-03-11 09:50 +0100
| From | Chris Phlipot <cphlipot0@gmail.com> |
|---|---|
| Date | 2016-03-09 06:20 +0100 |
| Subject | [PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") |
| Message-ID | <raEHo-3aa-3@gated-at.bofh.it> |
fix the perf script python database export crash.
Remove the union in evsel so that the database id and priv pointer can be
used simultainously without conflicting and crashing.
Detailed Description for the fixed bug follows:
perf script crashes with a segmentaiton fault on user space tool version
4.5.rc7.ge2857b when using the python database export API. It works
properly in 4.4 and prior versions.
the crash fist appeared in
cfc8874a485 ("perf script: Process cpu/threads maps")
How to reprodcue the bug:
remove any temporary files left over from a previous crash
(if you have already attemped to reproduce the bug):
$ rm -r test_db-perf-data
$ dropdb test_db
$ ./perf record timeout 1 yes >/dev/null
$ ./perf script -s scripts/python/export-to-postgresql.py test_db
Stack Trace:
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x1) at malloc.c:2929
2929 malloc.c: No such file or directory.
(gdb) bt
at util/stat.c:122
argv=<optimized out>, prefix=<optimized out>) at builtin-script.c:2231
argc=argc@entry=4, argv=argv@entry=0x7fffffffdf70) at perf.c:390
at perf.c:451
Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
---
tools/perf/util/evsel.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 8e75434..4d8037a 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -93,10 +93,8 @@ struct perf_evsel {
const char *unit;
struct event_format *tp_format;
off_t id_offset;
- union {
- void *priv;
- u64 db_id;
- };
+ void *priv;
+ u64 db_id;
struct cgroup_sel *cgrp;
void *handler;
struct cpu_map *cpus;
--
1.9.1
[toc] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2016-03-09 09:10 +0100 |
| Subject | Re: [PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") |
| Message-ID | <raHlU-55y-9@gated-at.bofh.it> |
| In reply to | #1353794 |
On Tue, Mar 08, 2016 at 09:11:54PM -0800, Chris Phlipot wrote:
> fix the perf script python database export crash.
> Remove the union in evsel so that the database id and priv pointer can be
> used simultainously without conflicting and crashing.
>
> Detailed Description for the fixed bug follows:
>
> perf script crashes with a segmentaiton fault on user space tool version
> 4.5.rc7.ge2857b when using the python database export API. It works
> properly in 4.4 and prior versions.
>
> the crash fist appeared in
> cfc8874a485 ("perf script: Process cpu/threads maps")
ouch, missed this one..
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2016-03-09 14:40 +0100 |
| Subject | Re: [PATCH 1/1] Fixes: cfc8874a485 ("perf script: Process cpu/threads maps") |
| Message-ID | <raMvh-5O-21@gated-at.bofh.it> |
| In reply to | #1353888 |
Em Wed, Mar 09, 2016 at 09:02:46AM +0100, Jiri Olsa escreveu:
> On Tue, Mar 08, 2016 at 09:11:54PM -0800, Chris Phlipot wrote:
> > fix the perf script python database export crash.
> > Remove the union in evsel so that the database id and priv pointer can be
> > used simultainously without conflicting and crashing.
> >
> > Detailed Description for the fixed bug follows:
> >
> > perf script crashes with a segmentaiton fault on user space tool version
> > 4.5.rc7.ge2857b when using the python database export API. It works
> > properly in 4.4 and prior versions.
> >
> > the crash fist appeared in
> > cfc8874a485 ("perf script: Process cpu/threads maps")
>
> ouch, missed this one..
>
> Acked-by: Jiri Olsa <jolsa@kernel.org>
Thanks, applied.
- Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Chris Phlipot <tipbot@zytor.com> |
|---|---|
| Date | 2016-03-11 09:50 +0100 |
| Subject | [tip:perf/core] perf tools: Fix perf script python database export crash |
| Message-ID | <rbqVJ-3vt-23@gated-at.bofh.it> |
| In reply to | #1353794 |
Commit-ID: 616df645d7238e45d3b369933a30fee4e4e305e2
Gitweb: http://git.kernel.org/tip/616df645d7238e45d3b369933a30fee4e4e305e2
Author: Chris Phlipot <cphlipot0@gmail.com>
AuthorDate: Tue, 8 Mar 2016 21:11:54 -0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 Mar 2016 10:31:02 -0300
perf tools: Fix perf script python database export crash
Remove the union in evsel so that the database id and priv pointer can
be used simultainously without conflicting and crashing.
Detailed Description for the fixed bug follows:
perf script crashes with a segmentation fault on user space tool version
4.5.rc7.ge2857b when using the python database export API. It works
properly in 4.4 and prior versions.
the crash fist appeared in:
cfc8874a4859 ("perf script: Process cpu/threads maps")
How to reproduce the bug:
Remove any temporary files left over from a previous crash (if you have
already attemped to reproduce the bug):
$ rm -r test_db-perf-data
$ dropdb test_db
$ perf record timeout 1 yes >/dev/null
$ perf script -s scripts/python/export-to-postgresql.py test_db
Stack Trace:
Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x1) at malloc.c:2929
2929 malloc.c: No such file or directory.
(gdb) bt
at util/stat.c:122
argv=<optimized out>, prefix=<optimized out>) at builtin-script.c:2231
argc=argc@entry=4, argv=argv@entry=0x7fffffffdf70) at perf.c:390
at perf.c:451
Signed-off-by: Chris Phlipot <cphlipot0@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Fixes: cfc8874a4859 ("perf script: Process cpu/threads maps")
Link: http://lkml.kernel.org/r/1457500314-8912-1-git-send-email-cphlipot0@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/evsel.h | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index efad78f..501ea6e 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -93,10 +93,8 @@ struct perf_evsel {
const char *unit;
struct event_format *tp_format;
off_t id_offset;
- union {
- void *priv;
- u64 db_id;
- };
+ void *priv;
+ u64 db_id;
struct cgroup_sel *cgrp;
void *handler;
struct cpu_map *cpus;
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web