if (session_info->channel_infos_ht) {
ret = cds_lfht_destroy(session_info->channel_infos_ht, NULL);
if (ret) {
if (session_info->channel_infos_ht) {
ret = cds_lfht_destroy(session_info->channel_infos_ht, NULL);
if (ret) {
&evaluation, &object_uid, &object_gid);
break;
case LTTNG_OBJECT_TYPE_NONE:
&evaluation, &object_uid, &object_gid);
break;
case LTTNG_OBJECT_TYPE_NONE:
cds_list_add(&client_list_element.node, &client_list.clients_list);
/* Send evaluation result to the newly-subscribed client. */
cds_list_add(&client_list_element.node, &client_list.clients_list);
/* Send evaluation result to the newly-subscribed client. */
ret = send_evaluation_to_clients(trigger, evaluation, &client_list,
state, object_uid, object_gid);
ret = send_evaluation_to_clients(trigger, evaluation, &client_list,
state, object_uid, object_gid);
pthread_mutex_lock(&client_list->lock);
cds_list_for_each_entry(trigger_ht_element,
&client_list->triggers_list, client_list_trigger_node) {
pthread_mutex_lock(&client_list->lock);
cds_list_for_each_entry(trigger_ht_element,
&client_list->triggers_list, client_list_trigger_node) {
* Not an error, the list of triggers applying to that session
* will be initialized when the session is created.
*/
* Not an error, the list of triggers applying to that session
* will be initialized when the session is created.
*/
condition_status = lttng_condition_session_rotation_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
condition_status = lttng_condition_session_rotation_get_session_name(
condition, &condition_session_name);
if (condition_status != LTTNG_CONDITION_STATUS_OK) {
session = session_info_create(name, uid, gid, trigger_list,
state->sessions_ht);
if (!session) {
session = session_info_create(name, uid, gid, trigger_list,
state->sessions_ht);
if (!session) {
channel_name, session_name, channel_key_int,
lttng_domain_type_str(channel_domain));
channel_name, session_name, channel_key_int,
lttng_domain_type_str(channel_domain));
struct channel_key key = { .key = channel_key, .domain = domain };
struct channel_info *channel_info;
struct channel_key key = { .key = channel_key, .domain = domain };
struct channel_info *channel_info;
session_info->rotation.id = trace_archive_chunk_id;
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
session_info->rotation.id = trace_archive_chunk_id;
trigger_list = get_session_trigger_list(state, session_name);
if (!trigger_list) {
- DBG3("[notification-thread] Adding tracer event source fd to poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG3("Adding tracer event source fd to poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(domain_type));
/* Adding the read side pipe to the event poll. */
ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLIN | LPOLLERR);
if (ret < 0) {
tracer_event_source_fd,
lttng_domain_type_str(domain_type));
/* Adding the read side pipe to the event poll. */
ret = lttng_poll_add(&state->events, tracer_event_source_fd, LPOLLIN | LPOLLERR);
if (ret < 0) {
- ERR("[notification-thread] Failed to add tracer event source to poll set: tracer_event_source_fd = %d, domain = '%s'",
+ ERR("Failed to add tracer event source to poll set: tracer_event_source_fd = %d, domain = '%s'",
- DBG("[notification-thread] Removed tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG("Removed tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
- DBG3("[notification-thread] Removing tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ DBG3("Removing tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
/* Removing the fd from the event poll set. */
ret = lttng_poll_del(&state->events, tracer_event_source_fd);
if (ret < 0) {
tracer_event_source_fd,
lttng_domain_type_str(source_element->domain));
/* Removing the fd from the event poll set. */
ret = lttng_poll_del(&state->events, tracer_event_source_fd);
if (ret < 0) {
- ERR("[notification-thread] Failed to remove tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
+ ERR("Failed to remove tracer event source from poll set: tracer_event_source_fd = %d, domain = '%s'",
- ERR("[notification-thread] Error draining event notifier notification: tracer_event_source_fd = %d, domain = %s",
+ ERR("Error draining event notifier notification: tracer_event_source_fd = %d, domain = %s",
/* Not a fatal error if the trigger is not found. */
get_trigger_info_for_log(trigger, &trigger_name, &trigger_owner_uid);
/* Not a fatal error if the trigger is not found. */
get_trigger_info_for_log(trigger, &trigger_name, &trigger_owner_uid);
- ERR("Failed to retrieve registered version of trigger: trigger name = '%s', trigger owner uid = %d",
+ DBG("Failed to retrieve registered version of trigger: trigger name = '%s', trigger owner uid = %d",
status = lttng_condition_session_rotation_get_session_name(
condition, &session_name);
if (status != LTTNG_CONDITION_STATUS_OK) {
status = lttng_condition_session_rotation_get_session_name(
condition, &session_name);
if (status != LTTNG_CONDITION_STATUS_OK) {
CDS_INIT_LIST_HEAD(&trigger_list_element->node);
trigger_list_element->trigger = trigger;
cds_list_add(&trigger_list_element->node, &trigger_list->list);
CDS_INIT_LIST_HEAD(&trigger_list_element->node);
trigger_list_element->trigger = trigger;
cds_list_add(&trigger_list_element->node, &trigger_list->list);
trigger, &error_counter_index);
if (error_accounting_status != EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK) {
if (error_accounting_status == EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE) {
trigger, &error_counter_index);
if (error_accounting_status != EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_OK) {
if (error_accounting_status == EVENT_NOTIFIER_ERROR_ACCOUNTING_STATUS_NO_INDEX_AVAILABLE) {
ret = LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL;
} else {
ERR("Error registering trigger for error accounting");
ret = LTTNG_ERR_EVENT_NOTIFIER_ERROR_ACCOUNTING_FULL;
} else {
ERR("Error registering trigger for error accounting");
- /* Not a fatal error, simply report it to the client. */
- cds_lfht_del(state->triggers_ht, &trigger_ht_element->node);
- *cmd_result = LTTNG_ERR_TRIGGER_EXISTS;
+ /* Internal error: add to triggers_ht should have failed. */
+ ret = -1;
cds_lfht_del(state->trigger_tokens_ht,
&trigger_tokens_ht_element->node);
cds_lfht_del(state->trigger_tokens_ht,
&trigger_tokens_ht_element->node);
client_socket);
client = get_client_from_socket(client_socket, state);
if (!client) {
/* Internal state corruption, fatal error. */
client_socket);
client = get_client_from_socket(client_socket, state);
if (!client) {
/* Internal state corruption, fatal error. */
cds_lfht_for_each_entry(state->client_socket_ht, &iter, client,
client_socket_ht_node) {
int ret;
cds_lfht_for_each_entry(state->client_socket_ht, &iter, client,
client_socket_ht_node) {
int ret;
client->socket);
ret = lttcomm_send_unix_sock_non_block(client->socket,
pv.buffer.data,
to_send_count);
if ((ret >= 0 && ret < to_send_count)) {
client->socket);
ret = lttcomm_send_unix_sock_non_block(client->socket,
pv.buffer.data,
to_send_count);
if ((ret >= 0 && ret < to_send_count)) {
memcpy(buffer, &msg, sizeof(msg));
memcpy(buffer + sizeof(msg), &reply, sizeof(reply));
memcpy(buffer, &msg, sizeof(msg));
memcpy(buffer + sizeof(msg), &reply, sizeof(reply));
client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
client->major = handshake_client->major;
client->minor = handshake_client->minor;
if (!client->communication.inbound.creds_received) {
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
&client->communication.inbound.creds);
client->gid = LTTNG_SOCK_GET_GID_CRED(
&client->communication.inbound.creds);
client->uid, client->gid, (int) client->major,
(int) client->minor);
client->uid, client->gid, (int) client->major,
(int) client->minor);
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
goto end;
}
/* Flushes the outgoing queue. */
ret = client_send_command_reply(client, state, status);
if (ret) {
goto end;
}
/* Flushes the outgoing queue. */
ret = client_send_command_reply(client, state, status);
if (ret) {
expected_condition_size = client->communication.inbound.payload.buffer.size;
ret = lttng_condition_create_from_payload(&condition_view, &condition);
if (ret != expected_condition_size) {
expected_condition_size = client->communication.inbound.payload.buffer.size;
ret = lttng_condition_create_from_payload(&condition_view, &condition);
if (ret != expected_condition_size) {
if (msg_type == LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_SUBSCRIBE) {
ret = notification_thread_client_subscribe(
client, condition, state, &status);
if (msg_type == LTTNG_NOTIFICATION_CHANNEL_MESSAGE_TYPE_SUBSCRIBE) {
ret = notification_thread_client_subscribe(
client, condition, state, &status);
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
/* Set reception state to receive the next message header. */
ret = client_reset_inbound_state(client);
if (ret) {
offset = client->communication.inbound.payload.buffer.size -
client->communication.inbound.bytes_to_receive;
if (client->communication.inbound.expect_creds) {
offset = client->communication.inbound.payload.buffer.size -
client->communication.inbound.bytes_to_receive;
if (client->communication.inbound.expect_creds) {
condition_type = lttng_condition_get_type(condition);
if (condition_type == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW) {
condition_type = lttng_condition_get_type(condition);
if (condition_type == LTTNG_CONDITION_TYPE_BUFFER_USAGE_LOW) {
- DBG("[notification-thread] Low buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
+ DBG("Low buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
- DBG("[notification-thread] High buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
+ DBG("High buffer usage condition being evaluated: threshold = %" PRIu64 ", highest usage = %" PRIu64,
- DBG("[notification-thread] Session consumed size condition being evaluated: threshold = %" PRIu64 ", current size = %" PRIu64,
+ DBG("Session consumed size condition being evaluated: threshold = %" PRIu64 ", current size = %" PRIu64,
threshold, session_consumed_size);
return session_consumed_size >= threshold;
}
threshold, session_consumed_size);
return session_consumed_size >= threshold;
}
client->socket, msg_payload.buffer.size);
if (client_has_outbound_data_left(client)) {
client->socket, msg_payload.buffer.size);
if (client_has_outbound_data_left(client)) {
- ERR("[notification-thread] Event notifier has a capture payload size which exceeds the maximum allowed size: capture_payload_size = %zu bytes, max allowed size = %d bytes",
+ ERR("Event notifier has a capture payload size which exceeds the maximum allowed size: capture_payload_size = %zu bytes, max allowed size = %d bytes",
capture_buffer_size, MAX_CAPTURE_SIZE);
goto end;
}
capture_buffer = zmalloc(capture_buffer_size);
if (!capture_buffer) {
capture_buffer_size, MAX_CAPTURE_SIZE);
goto end;
}
capture_buffer = zmalloc(capture_buffer_size);
if (!capture_buffer) {
goto end;
}
/* Fetch additional payload (capture). */
ret = lttng_read(notification_pipe_read_fd, capture_buffer, capture_buffer_size);
if (ret != capture_buffer_size) {
goto end;
}
/* Fetch additional payload (capture). */
ret = lttng_read(notification_pipe_read_fd, capture_buffer, capture_buffer_size);
if (ret != capture_buffer_size) {
notification->capture_buf_size, false);
if (evaluation == NULL) {
notification->capture_buf_size, false);
if (evaluation == NULL) {
client_list = get_client_list_from_condition(state,
lttng_trigger_get_const_condition(element->trigger));
executor_status = action_executor_enqueue_trigger(state->executor,
client_list = get_client_list_from_condition(state,
lttng_trigger_get_const_condition(element->trigger));
executor_status = action_executor_enqueue_trigger(state->executor,
notification = recv_one_event_notifier_notification(pipe, domain);
if (notification == NULL) {
/* Reception failed, don't consider it fatal. */
notification = recv_one_event_notifier_notification(pipe, domain);
if (notification == NULL) {
/* Reception failed, don't consider it fatal. */
- ERR("[notification-thread] Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
+ ERR("Error receiving an event notifier notification from tracer: fd = %i, domain = %s",
pipe, lttng_domain_type_str(domain));
goto end;
}
ret = dispatch_one_event_notifier_notification(state, notification);
if (ret) {
pipe, lttng_domain_type_str(domain));
goto end;
}
ret = dispatch_one_event_notifier_notification(state, notification);
if (ret) {
- ERR("[notification-thread] Error dispatching an event notifier notification from tracer: fd = %i, domain = %s",
+ ERR("Error dispatching an event notifier notification from tracer: fd = %i, domain = %s",
*/
ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg));
if (ret != sizeof(sample_msg)) {
*/
ret = lttng_read(pipe, &sample_msg, sizeof(sample_msg));
if (ret != sizeof(sample_msg)) {
- DBG("[notification-thread] Received a sample for an unknown channel from consumerd, key = %" PRIu64 " in %s domain",
+ DBG("Received a sample for an unknown channel from consumerd, key = %" PRIu64 " in %s domain",
latest_sample.key.key,
lttng_domain_type_str(domain));
goto end_unlock;
}
channel_info = caa_container_of(node, struct channel_info,
channels_ht_node);
latest_sample.key.key,
lttng_domain_type_str(domain));
goto end_unlock;
}
channel_info = caa_container_of(node, struct channel_info,
channels_ht_node);
- DBG("[notification-thread] Handling channel sample for channel %s (key = %" PRIu64 ") in session %s (highest usage = %" PRIu64 ", lowest usage = %" PRIu64", total consumed = %" PRIu64")",
+ DBG("Handling channel sample for channel %s (key = %" PRIu64 ") in session %s (highest usage = %" PRIu64 ", lowest usage = %" PRIu64", total consumed = %" PRIu64")",