From: jdesfossez@efficios.com (Julien Desfossez)
Subject: [lttng-dev] [LTTNG-TOOLS PATCH] Fix: only cleanup the agent_apps_ht_by_sock as root
Date: Thu, 30 Jul 2015 11:12:37 -0400 [thread overview]
Message-ID: <1438269157-1473-1-git-send-email-jdesfossez@efficios.com> (raw)
Commit 6a4e403927ffef4cae8726064dcf53c463eb128c introduced a bug where
we could end up iterating over the agent_apps_ht_by_sock regardless if
it was allocated or not (only when the sessiond is launched as root).
Steps to reproduce:
$ sudo lttng-sessiond -d
$ lttng-sessiond
Error: Already running daemon.
Segmentation fault (core dumped)
Signed-off-by: Julien Desfossez <jdesfossez at efficios.com>
---
src/bin/lttng-sessiond/main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c
index 91dd047..5840165 100644
--- a/src/bin/lttng-sessiond/main.c
+++ b/src/bin/lttng-sessiond/main.c
@@ -677,7 +677,9 @@ static void sessiond_cleanup(void)
}
DBG("Cleaning up all agent apps");
- agent_app_ht_clean();
+ if (is_root) {
+ agent_app_ht_clean();
+ }
DBG("Closing all UST sockets");
ust_app_clean_list();
--
1.9.1
next reply other threads:[~2015-07-30 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 15:12 Julien Desfossez [this message]
2015-07-30 16:02 ` Jérémie Galarneau
2015-07-30 16:53 ` Jérémie Galarneau
2015-07-30 17:40 ` Julien Desfossez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1438269157-1473-1-git-send-email-jdesfossez@efficios.com \
--to=jdesfossez@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox