[lttng-dev] [PATCH lttng-tools] Fix: unbalanced ustconsumer32_data.pid_mutex lock

David Goulet dgoulet at efficios.com
Mon Jul 28 13:49:28 EDT 2014


Merged and backported!

Thanks!
David

On 27 Jul (20:38:50), Mathieu Desnoyers wrote:
> It is never locked in this function, but should be. This is triggering
> spurious runtime failures on my system, where it seems that sessiond was
> sometimes breaking the communication pipe with liblttng-ctl when the
> unbalanced unlock is reached.
> 
> This should be backported to stable-2.4 and stable-2.5.
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> ---
>  src/bin/lttng-sessiond/main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
> index a8751c6..1ee6f4a 100644
> --- a/src/bin/lttng-sessiond/main.c
> +++ b/src/bin/lttng-sessiond/main.c
> @@ -3016,6 +3016,7 @@ static int process_client_msg(struct command_ctx *cmd_ctx, int sock,
>  			}
>  
>  			/* 32-bit */
> +			pthread_mutex_lock(&ustconsumer32_data.pid_mutex);
>  			if (consumerd32_bin[0] != '\0' &&
>  					ustconsumer32_data.pid == 0 &&
>  					cmd_ctx->lsm->cmd_type != LTTNG_REGISTER_CONSUMER) {
> -- 
> 2.0.1
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: Digital signature
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20140728/659a818c/attachment.sig>


More information about the lttng-dev mailing list