The session daemon usually handles two consumers, one for 32 bits
applications and one for 64 bits.
When sending relayd information to the consumer, we must sent it to
every existing consumer in case a session contains 32 and 64 bits
applications. So, the sent flag is moved from the consumer output object
to be per consumer socket.
This bug was seen and diagnosed during the 2.2 development phase and is
fixed in master branch in the following commit.
commit (master):
ffe600149a7608221985751e1bf293234bf2545c
Signed-off-by: David Goulet <dgoulet@efficios.com>
/* Flag that the corresponding socket was sent. */
if (relayd_uri->stype == LTTNG_STREAM_CONTROL) {
/* Flag that the corresponding socket was sent. */
if (relayd_uri->stype == LTTNG_STREAM_CONTROL) {
- consumer->dst.net.control_sock_sent = 1;
+ consumer_sock->control_sock_sent = 1;
} else if (relayd_uri->stype == LTTNG_STREAM_DATA) {
} else if (relayd_uri->stype == LTTNG_STREAM_DATA) {
- consumer->dst.net.data_sock_sent = 1;
+ consumer_sock->data_sock_sent = 1;
assert(consumer);
/* Sending control relayd socket. */
assert(consumer);
/* Sending control relayd socket. */
- if (!consumer->dst.net.control_sock_sent) {
+ if (!sock->control_sock_sent) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.control, consumer, sock);
if (ret != LTTNG_OK) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.control, consumer, sock);
if (ret != LTTNG_OK) {
}
/* Sending data relayd socket. */
}
/* Sending data relayd socket. */
- if (!consumer->dst.net.data_sock_sent) {
+ if (!sock->data_sock_sent) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.data, consumer, sock);
if (ret != LTTNG_OK) {
ret = send_consumer_relayd_socket(domain, session,
&consumer->dst.net.data, consumer, sock);
if (ret != LTTNG_OK) {
- /*
- * Don't send relayd socket if URI is NOT remote or if the relayd
- * socket for the session was already sent.
- */
- if (uris[i].dtype == LTTNG_DST_PATH ||
- (uris[i].stype == LTTNG_STREAM_CONTROL &&
- consumer->dst.net.control_sock_sent) ||
- (uris[i].stype == LTTNG_STREAM_DATA &&
- consumer->dst.net.data_sock_sent)) {
+ /* Don't send relayd socket if URI is NOT remote */
+ if (uris[i].dtype == LTTNG_DST_PATH) {
*/
unsigned int registered;
*/
unsigned int registered;
+ /*
+ * Flag if relayd network sockets were sent to the consumer through this
+ * socket.
+ */
+ unsigned int control_sock_sent;
+ unsigned int data_sock_sent;
+
struct lttng_ht_node_ulong node;
};
struct lttng_ht_node_ulong node;
};
/* Data path for network streaming. */
struct lttng_uri data;
/* Data path for network streaming. */
struct lttng_uri data;
-
- /* Flag if network sockets were sent to the consumer. */
- unsigned int control_sock_sent;
- unsigned int data_sock_sent;