From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul_woegerer@mentor.com (Paul Woegerer) Date: Thu, 28 Nov 2013 13:26:53 +0100 Subject: [lttng-dev] [PATCH lttng-ust 2/3] Fix: baddr_statedump deadlock with JUL tracing In-Reply-To: <1385641614-18806-1-git-send-email-paul_woegerer@mentor.com> References: <1385641614-18806-1-git-send-email-paul_woegerer@mentor.com> Message-ID: <1385641614-18806-3-git-send-email-paul_woegerer@mentor.com> Signed-off-by: Paul Woegerer --- liblttng-ust/lttng-ust-comm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index 2d3766f..0c7fc65 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -1214,10 +1214,12 @@ restart: if (ret) { ERR("Error handling message for %s socket", sock_info->name); } else { + int ctor_passed; struct lttng_session *session; + ctor_passed = sock_info->constructor_sem_posted; session = sock_info->session_enabled; - if (session) { + if (ctor_passed && session) { sock_info->session_enabled = NULL; lttng_ust_baddr_statedump(session); } -- 1.8.4