Re: [PATCH 1/1] perf: Prevent race in PERF_SAMPLE_READ group format sample output

From: Peter Zijlstra
Date: Mon Jul 07 2014 - 07:44:03 EST


On Mon, Jul 07, 2014 at 12:20:20PM +0200, Jiri Olsa wrote:
> On Mon, Jul 07, 2014 at 11:04:28AM +0200, Peter Zijlstra wrote:
> > On Wed, Jun 25, 2014 at 08:44:35PM +0200, Jiri Olsa wrote:
> > > From: Jiri Olsa <jolsa@xxxxxxxxxx>
> > >
> > > While iterating siblings in perf_output_read_group we could
> > > race with addition and removal of sibling in perf_group_attach
> > > and perf_group_detach respective.
> >
> > So why would anybody do this?
>
> the test program from 0/1 email hangs up my server
> but no standard reason AFAICS
>
> I've got soft lockup, sometimes ended up with unkillable perf process
> also few total server hangs

OK, so that's useful information to have in a Changelog ;-)

Not immediately obvious how that can happen though. I can see the output
getting scrambled.


Attachment: pgpdXX1uKT_aP.pgp
Description: PGP signature