Skip to contentSkip to conversation

Fix: unbalanced ustconsumer32_data.pid_mutex lock

PATCH David Goulet 1 participant 1 message Jul 28, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Merged and backported!

Thanks!
David

Quoted 27 lines · Mathieu Desnoyers

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.

---
 src/bin/lttng-sessiond/main.c | 1 +
 1 file changed, 1 insertion(+)
src/bin/lttng-sessiond/main.c +1 -0
index a8751c6..1ee6f4a 100644
@@ -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) {
Signature · 1 line
2.0.1

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev