[lttng-dev] [PATCH lttng-tools] Fix: lttng-consumerd crash due to double free metadata stream

Jonathan Rajotte-Julien jonathan.rajotte-julien at efficios.com
Wed Oct 11 18:39:18 UTC 2017


Hi,

On Thu, Sep 28, 2017 at 04:57:42PM -0400, Jonathan Rajotte-Julien wrote:
> Hi Liguang,
> 
> Thanks for submitting the patch.
> 
> On Wed, Sep 27, 2017 at 05:57:59PM +0800, Liguang Li wrote:
> > When setup metadata failed, the exception handling function will free
> > the metadata stream twice.
> 
> This is lacking context and a good explanation of the problem at hand.
> Providing a good reproducer is a good first step to allow easier review of
> patches. This also remove uncertainty on the origin of the issue at the first
> place.
> 
> In this case, I'll assume that the issue happen when the call to
> lttng_pipe_write inside send_stream_to_thread fails. I would be even more
> interested on the conditions(scenario) required for this call to fail in the
> first place. It would be nice if you could provide more information regarding
> that.
> 
> Still, faking a failure on lttng_pipe_write when a metadata stream is to be sent
> allows me to reproduce an issue similar to the one you are describing.
> 
> Those two calls are already performed inside destroy_close_stream() which is
> always called inside consumer_stream_destroy(). No need to perform
> them.
> 
> You can find a reworked version of this fix here [1]. Could you validate that it
> does indeed fixes the issue?
> 
> [1] https://lists.lttng.org/pipermail/lttng-dev/2017-September/027488.html

Any feedback regarding the provided patch?

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS


More information about the lttng-dev mailing list