Re: [BUG] segfault in perf-top -- thread refcnt

From: Arnaldo Carvalho de Melo
Date: Fri Mar 27 2015 - 15:53:15 EST


Em Fri, Mar 27, 2015 at 11:31:22AM -0600, David Ahern escreveu:
> Hi Arnaldo:
>
> If I leave 'perf top -z' running it eventually crashes with the backtrace in
> the new thread refcnt code:

Debugging, thanks for the report!

- Arnaldo

> (gdb) bt
> #0 __list_del_entry (thread=0x670bd30)
> at /home/dahern/kernels/linux.git/tools/perf/util/include/../../../../include/linux/list.h:102
> #1 list_del_init (thread=0x670bd30)
> at /home/dahern/kernels/linux.git/tools/perf/util/include/../../../../include/linux/list.h:145
> #2 thread__put (thread=0x670bd30) at util/thread.c:94
> #3 0x00000000001bfa3c in __thread__zput (he=0x820adc0) at util/thread.h:48
> #4 hist_entry__delete (he=0x820adc0) at util/hist.c:939
> #5 0x00000000001c18a4 in hists__delete_entry (hists=0x4fe0f8) at
> util/hist.c:255
> #6 hists__delete_entries (hists=0x4fe0f8) at util/hist.c:283
> #7 0x00000000001250e8 in perf_top__sort_new_samples (arg=0x7feffffbca8) at
> builtin-top.c:549
> #8 0x00000000001e9108 in hist_browser__run (evsel=0x4fdfc0,
> nr_events=<value optimized out>,
> helpline=<value optimized out>, left_exits=<value optimized out>,
> hbt=0xfff800012cd7cce0, min_pcnt=0, env=0x4fe4c0)
> at ui/browsers/hists.c:431
> #9 perf_evsel__hists_browse (evsel=0x4fdfc0, nr_events=<value optimized
> out>, helpline=<value optimized out>,
> left_exits=<value optimized out>, hbt=0xfff800012cd7cce0, min_pcnt=0,
> env=0x4fe4c0) at ui/browsers/hists.c:1501
> #10 0x00000000001eb390 in perf_evlist__tui_browse_hists (evlist=0x4c9ae0,
> help=0x28dc00 "For a higher level overview, try: perf top --sort
> comm,dso", hbt=0xfff800012cd7cce0,
> min_pcnt=<value optimized out>, env=0x4fe4c0) at
> ui/browsers/hists.c:2022
> #11 0x0000000000126188 in display_thread_tui (arg=<value optimized out>) at
> builtin-top.c:582
> #12 0xfff8000100130a68 in start_thread () from /lib64/libpthread.so.0
> #13 0xfff800010139c598 in __thread_start () from /lib64/libc.so.6
> #14 0xfff800010139c598 in __thread_start () from /lib64/libc.so.6
>
>
> (gdb) fra 2
> #2 thread__put (thread=0x670bd30) at util/thread.c:94
> 94 util/thread.c: No such file or directory.
> in util/thread.c
> (gdb) p *thread
> $2 = {{rb_node = {__rb_parent_color = 106933920, rb_right = 0x0, rb_left =
> 0x0}, node = {next = 0x65faea0, prev = 0x0}},
> mg = 0x670be20, pid_ = 153034, tid = 153034, ppid = -1, cpu = -1, refcnt =
> 0, shortname = "\000\000", comm_set = false,
> dead = false, comm_list = {next = 0x670bdc0, prev = 0x670bdc0}, comm_len =
> 7, db_id = 0, priv = 0x0, ts = 0x0}
>
>
> In node element, prev is NULL
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/