From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752970AbbC3NRT (ORCPT ); Mon, 30 Mar 2015 09:17:19 -0400 Received: from casper.infradead.org ([85.118.1.10]:33268 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752601AbbC3NRQ (ORCPT ); Mon, 30 Mar 2015 09:17:16 -0400 Date: Mon, 30 Mar 2015 10:17:24 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: David Ahern , Jiri Olsa , Namhyung Kim , Stephane Eranian , LKML Subject: Re: [BUG] segfault in perf-top -- thread refcnt Message-ID: <20150330131724.GC24063@kernel.org> References: <551593EA.2030201@gmail.com> <20150327201126.GM21510@kernel.org> <5515B9E6.5020007@gmail.com> <20150330080737.GD1413@krava> <20150330102220.GE1413@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150330102220.GE1413@krava> 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 Mon, Mar 30, 2015 at 12:22:20PM +0200, Jiri Olsa escreveu: > On Mon, Mar 30, 2015 at 10:07:37AM +0200, Jiri Olsa wrote: > looks like race among __machine__findnew_thread and thread__put > over the machine->threads rb_tree insert/removal > > is there a reason why thread__put does not erase itself from machine->threads? IIRC it has to first pass thru: machine__remove_thread() that will remove the reference count obtained when inserting the thread on the rbtree and move it to the dead_threads list, where it will stay until the last reference count obtained when adding the thread to some hist_entry is finally dropped via thread__put(). - Arnaldo