projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond consumer thread should register as RCU thread
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
main.c
diff --git
a/src/bin/lttng-sessiond/main.c
b/src/bin/lttng-sessiond/main.c
index d284debd695e76787189f5f5b7cae256a67bf3e2..5a7d153e568743c73365549bd9676311789b9c48 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-1216,6
+1216,9
@@
static void *thread_manage_consumer(void *data)
DBG("[thread] Manage consumer started");
DBG("[thread] Manage consumer started");
+ rcu_register_thread();
+ rcu_thread_online();
+
health_register(health_sessiond, HEALTH_SESSIOND_TYPE_CONSUMER);
health_code_update();
health_register(health_sessiond, HEALTH_SESSIOND_TYPE_CONSUMER);
health_code_update();
@@
-1514,6
+1517,9
@@
error_poll:
health_unregister(health_sessiond);
DBG("consumer thread cleanup completed");
health_unregister(health_sessiond);
DBG("consumer thread cleanup completed");
+ rcu_thread_offline();
+ rcu_unregister_thread();
+
return NULL;
}
return NULL;
}
@@
-2157,6
+2163,10
@@
static void *thread_registration_apps(void *data)
ust_cmd = zmalloc(sizeof(struct ust_command));
if (ust_cmd == NULL) {
PERROR("ust command zmalloc");
ust_cmd = zmalloc(sizeof(struct ust_command));
if (ust_cmd == NULL) {
PERROR("ust command zmalloc");
+ ret = close(sock);
+ if (ret) {
+ PERROR("close");
+ }
goto error;
}
goto error;
}
@@
-2713,7
+2723,7
@@
static int copy_session_consumer(int domain, struct ltt_session *session)
* domain.
*/
if (session->kernel_session->consumer) {
* domain.
*/
if (session->kernel_session->consumer) {
- consumer_
destroy_out
put(session->kernel_session->consumer);
+ consumer_
output_
put(session->kernel_session->consumer);
}
session->kernel_session->consumer =
consumer_copy_output(session->consumer);
}
session->kernel_session->consumer =
consumer_copy_output(session->consumer);
@@
-2727,7
+2737,7
@@
static int copy_session_consumer(int domain, struct ltt_session *session)
case LTTNG_DOMAIN_UST:
DBG3("Copying tracing session consumer output in UST session");
if (session->ust_session->consumer) {
case LTTNG_DOMAIN_UST:
DBG3("Copying tracing session consumer output in UST session");
if (session->ust_session->consumer) {
- consumer_
destroy_out
put(session->ust_session->consumer);
+ consumer_
output_
put(session->ust_session->consumer);
}
session->ust_session->consumer =
consumer_copy_output(session->consumer);
}
session->ust_session->consumer =
consumer_copy_output(session->consumer);
@@
-2847,7
+2857,7
@@
static int create_kernel_session(struct ltt_session *session)
session->kernel_session->consumer->dst.trace_path,
S_IRWXU | S_IRWXG, session->uid, session->gid);
if (ret < 0) {
session->kernel_session->consumer->dst.trace_path,
S_IRWXU | S_IRWXG, session->uid, session->gid);
if (ret < 0) {
- if (
ret != -
EEXIST) {
+ if (
errno !=
EEXIST) {
ERR("Trace directory creation error");
goto error;
}
ERR("Trace directory creation error");
goto error;
}
This page took
0.023909 seconds
and
4
git commands to generate.