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

From: Arnaldo Carvalho de Melo
Date: Mon Mar 30 2015 - 09:17:22 EST


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
--
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/