From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753367AbbC0TxJ (ORCPT ); Fri, 27 Mar 2015 15:53:09 -0400 Received: from mail.kernel.org ([198.145.29.136]:53192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752898AbbC0TxG (ORCPT ); Fri, 27 Mar 2015 15:53:06 -0400 Date: Fri, 27 Mar 2015 16:51:27 -0300 From: Arnaldo Carvalho de Melo To: David Ahern Cc: Jiri Olsa , Namhyung Kim , Stephane Eranian , LKML Subject: Re: [BUG] segfault in perf-top -- thread refcnt Message-ID: <20150327195127.GK21510@kernel.org> References: <551593EA.2030201@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551593EA.2030201@gmail.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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=, > helpline=, left_exits=, > hbt=0xfff800012cd7cce0, min_pcnt=0, env=0x4fe4c0) > at ui/browsers/hists.c:431 > #9 perf_evsel__hists_browse (evsel=0x4fdfc0, nr_events= out>, helpline=, > left_exits=, 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=, env=0x4fe4c0) at > ui/browsers/hists.c:2022 > #11 0x0000000000126188 in display_thread_tui (arg=) 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