projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: status_loc argument of waitpid() is used on error
[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 2752e9ff37be7f142a76eebd902a51a530c14217..0df0b1f2e04bc4601149088740b6feec2b0bfdb2 100644
(file)
--- a/
src/bin/lttng-sessiond/main.c
+++ b/
src/bin/lttng-sessiond/main.c
@@
-564,8
+564,7
@@
static void wait_consumer(struct consumer_data *consumer_data)
ret = waitpid(consumer_data->pid, &status, 0);
if (ret == -1) {
PERROR("consumerd waitpid pid: %d", consumer_data->pid)
ret = waitpid(consumer_data->pid, &status, 0);
if (ret == -1) {
PERROR("consumerd waitpid pid: %d", consumer_data->pid)
- }
- if (!WIFEXITED(status)) {
+ } else if (!WIFEXITED(status)) {
ERR("consumerd termination with error: %d",
WEXITSTATUS(ret));
}
ERR("consumerd termination with error: %d",
WEXITSTATUS(ret));
}
@@
-1855,6
+1854,8
@@
static void *thread_dispatch_ust_registration(void *data)
.count = 0,
};
.count = 0,
};
+ rcu_register_thread();
+
health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_REG_DISPATCH);
if (testpoint(sessiond_thread_app_reg_dispatch)) {
health_register(health_sessiond, HEALTH_SESSIOND_TYPE_APP_REG_DISPATCH);
if (testpoint(sessiond_thread_app_reg_dispatch)) {
@@
-2088,6
+2089,7
@@
error_testpoint:
ERR("Health error occurred in %s", __func__);
}
health_unregister(health_sessiond);
ERR("Health error occurred in %s", __func__);
}
health_unregister(health_sessiond);
+ rcu_unregister_thread();
return NULL;
}
return NULL;
}
@@
-4325,7
+4327,7
@@
error:
}
lttng_poll_clean(&events);
}
lttng_poll_clean(&events);
-
+ stop_threads();
rcu_unregister_thread();
return NULL;
}
rcu_unregister_thread();
return NULL;
}
@@
-6147,6
+6149,12
@@
exit_client:
exit_health:
exit_init_data:
exit_health:
exit_init_data:
+ /*
+ * Wait for all pending call_rcu work to complete before tearing
+ * down data structures. call_rcu worker may be trying to
+ * perform lookups in those structures.
+ */
+ rcu_barrier();
/*
* sessiond_cleanup() is called when no other thread is running, except
* the ht_cleanup thread, which is needed to destroy the hash tables.
/*
* sessiond_cleanup() is called when no other thread is running, except
* the ht_cleanup thread, which is needed to destroy the hash tables.
This page took
0.025351 seconds
and
4
git commands to generate.