[lttng-dev] [PATCH lttng-ust 2/3] Fix: baddr_statedump deadlock with JUL tracing

Paul Woegerer paul_woegerer at mentor.com
Thu Nov 28 07:26:53 EST 2013


Signed-off-by: Paul Woegerer <paul_woegerer at mentor.com>
---
 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




More information about the lttng-dev mailing list