Re: [PATCH] perf top: Fix a race in callchain handling

From: Arnaldo Carvalho de Melo
Date: Sat May 05 2012 - 19:53:21 EST


Em Sat, May 05, 2012 at 08:22:47PM +0200, Peter Zijlstra escreveu:
> On Sun, 2012-05-06 at 00:23 +0900, Namhyung Kim wrote:
> > + static struct callchain_cursor cursor;
>
> This just begs to become another concurrency problem. If anybody manages
> to call multiple hists__collapse_insert_entry() concurrently you're
> again up some creek without no paddle.
>
> Adding global state is never a good option when dealing with
> concurrency.

But it seems to fix the current issue, so thanks to Namhyung for
following up on the report and David Ahern for reporting that it was a
cross thread corruption (Namhyung, was your work based on that report?).

I'm looking how to get that fixed with Peter concerns addressed.

First testing Namhyung patch with -F 100000 tho :-)

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