Update version to v2.12.16 stable-2.12 v2.12.16
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Aug 2024 21:21:42 +0000 (17:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Aug 2024 21:21:42 +0000 (17:21 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
ChangeLog
configure.ac
src/common/consumer/consumer-metadata-cache.c
src/common/consumer/consumer-timer.c
src/common/consumer/consumer.c
src/common/lockfile.c
src/common/lockfile.h
src/common/ust-consumer/ust-consumer.c

index 530ade9b6c53a43bbd6618d3e429010db5cc0fa8..36b07f5a44ff9d9cd146e00f53e5fb9d3f3e9148 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-22 lttng-tools 2.12.16 (National Take Your Cat to the Vet Day)
+       * Fix: Do not null out lttng_consumer_stream channel on deletion
+       * Fix: Crash when unregistering UST apps during shutdown
+       * lttng-ctl: Hide symbol introduced by fix
+       * Fix: consumerd: wrong timer mentioned in error logging
+       * Fix: consumerd: type confusion in lttng_consumer_send_error
+
 2024-03-28 lttng-tools 2.12.15 (Respect Your Cat Day)
        * Fix: baddr-statedump: use $(LIBTOOL) --mode=execute
        * Fix: relayd: live client not notified of inactive streams
index 9c32687192bc55524c8181e09cdaa64421a452ae..49f6d99f6febae9bce25d15f2afa581986c08b7a 100644 (file)
@@ -1,6 +1,6 @@
 dnl SPDX-License-Identifier: GPL-2.0-only
 AC_PREREQ([2.64])
-AC_INIT([lttng-tools],[2.12.15],[jeremie.galarneau@efficios.com],[],[https://lttng.org])
+AC_INIT([lttng-tools],[2.12.16],[jeremie.galarneau@efficios.com],[],[https://lttng.org])
 
 AC_CONFIG_HEADERS([include/config.h])
 AC_CONFIG_AUX_DIR([config])
index acb6cfe39c9fbee6a8cbe44b66e786a83d654cab..88b8ecb09dfdd33f97b78ec9b2ddb03227ba801d 100644 (file)
@@ -169,6 +169,7 @@ int consumer_metadata_cache_allocate(struct lttng_consumer_channel *channel)
        int ret;
 
        assert(channel);
+       assert(!channel->is_deleted);
 
        channel->metadata_cache = zmalloc(
                        sizeof(struct consumer_metadata_cache));
@@ -233,6 +234,7 @@ int consumer_metadata_cache_flushed(struct lttng_consumer_channel *channel,
        struct lttng_consumer_stream *metadata_stream;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(channel->metadata_cache);
 
        /*
index c190d3b627d0e8bc2ffc079bcc778456d3d22da4..d19215a5034a28e0c17f1ff3d4ca8510fc73ec8f 100644 (file)
@@ -85,6 +85,7 @@ static void metadata_switch_timer(struct lttng_consumer_local_data *ctx,
 
        channel = si->si_value.sival_ptr;
        assert(channel);
+       assert(!channel->is_deleted);
 
        if (channel->switch_timer_error) {
                return;
@@ -279,6 +280,7 @@ static void live_timer(struct lttng_consumer_local_data *ctx,
 
        channel = si->si_value.sival_ptr;
        assert(channel);
+       assert(!channel->is_deleted);
 
        if (channel->switch_timer_error) {
                goto error;
@@ -372,6 +374,7 @@ int consumer_channel_timer_start(timer_t *timer_id,
        struct itimerspec its;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(channel->key);
 
        if (timer_interval_us == 0) {
@@ -435,6 +438,7 @@ void consumer_timer_switch_start(struct lttng_consumer_channel *channel,
        int ret;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(channel->key);
 
        ret = consumer_channel_timer_start(&channel->switch_timer, channel,
@@ -508,6 +512,7 @@ int consumer_timer_monitor_start(struct lttng_consumer_channel *channel,
        int ret;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(channel->key);
        assert(!channel->monitor_timer_enabled);
 
@@ -530,7 +535,7 @@ int consumer_timer_monitor_stop(struct lttng_consumer_channel *channel)
        ret = consumer_channel_timer_stop(&channel->monitor_timer,
                        LTTNG_CONSUMER_SIG_MONITOR);
        if (ret == -1) {
-               ERR("Failed to stop live timer");
+               ERR("Failed to stop monitor timer");
                goto end;
        }
 
index c457f754d230598ab52b7cd871c013449803e33a..bc51ebac03f19df62a87e5feaffd4e110aaee72f 100644 (file)
@@ -2178,7 +2178,6 @@ void consumer_del_metadata_stream(struct lttng_consumer_stream *stream,
                /* Go for channel deletion! */
                free_channel = true;
        }
-       stream->chan = NULL;
 
        /*
         * Nullify the stream reference so it is not used after deletion. The
index bf1ddf9e341c9f18ea3e08f4552f5fcd5c104357..048caa2d0373a268863cdcca0d8062449f78176a 100644 (file)
@@ -66,6 +66,7 @@ static int lock_file(const char *filepath, int fd)
 
 #endif /* HAVE_FLOCK */
 
+LTTNG_HIDDEN
 int utils_create_lock_file(const char *filepath)
 {
        int ret, fd;
index 1f8e01ddb3eaaadb59abeaed946d34f0f9332f2c..67bae3046d1a7e75fcda1b2fc4a5eba9832d4fd2 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef COMMON_LOCKFILE_H
 #define COMMON_LOCKFILE_H
 
+#include <common/macros.h>
+
 /*
  * Create lock file to the given path and filename.
  * Returns the associated file descriptor, -1 on error.
@@ -20,6 +22,7 @@
  * forks+execve as the child process closes a file descriptor referencing
  * the file description of 'filepath'.
  */
+LTTNG_HIDDEN
 int utils_create_lock_file(const char *filepath);
 
 #endif /* COMMON_LOCKFILE_H */
index d274904e871eed0b68b22b1bcc57214e682f0bd9..85ddec6d43ad71eb7c9e2c4a11b10404c8a991ca 100644 (file)
@@ -97,6 +97,7 @@ static int add_channel(struct lttng_consumer_channel *channel,
        int ret = 0;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(ctx);
 
        if (ctx->on_recv_channel != NULL) {
@@ -132,6 +133,7 @@ static struct lttng_consumer_stream *allocate_stream(int cpu, int key,
        struct lttng_consumer_stream *stream = NULL;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(ctx);
 
        stream = consumer_stream_create(
@@ -254,6 +256,7 @@ static int create_ust_streams(struct lttng_consumer_channel *channel,
        pthread_mutex_t *current_stream_lock = NULL;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(ctx);
 
        /*
@@ -430,6 +433,7 @@ static int create_ust_channel(struct lttng_consumer_channel *channel,
        struct ustctl_consumer_channel *ust_channel;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(attr);
        assert(ust_chanp);
        assert(channel->buffer_credentials.is_set);
@@ -544,6 +548,7 @@ static int send_channel_to_sessiond_and_relayd(int sock,
        uint64_t net_seq_idx = -1ULL;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(ctx);
        assert(sock >= 0);
 
@@ -640,6 +645,7 @@ static int ask_channel(struct lttng_consumer_local_data *ctx,
 
        assert(ctx);
        assert(channel);
+       assert(!channel->is_deleted);
        assert(attr);
 
        /*
@@ -698,6 +704,7 @@ static int send_streams_to_thread(struct lttng_consumer_channel *channel,
        struct lttng_consumer_stream *stream, *stmp;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(ctx);
 
        /* Send streams to the corresponding thread. */
@@ -3211,7 +3218,9 @@ void lttng_ustconsumer_close_all_metadata(struct lttng_ht *metadata_ht)
                health_code_update();
 
                pthread_mutex_lock(&stream->chan->lock);
+               pthread_mutex_lock(&stream->lock);
                lttng_ustconsumer_close_metadata(stream->chan);
+               pthread_mutex_unlock(&stream->lock);
                pthread_mutex_unlock(&stream->chan->lock);
 
        }
@@ -3248,6 +3257,7 @@ int lttng_ustconsumer_request_metadata(struct lttng_consumer_local_data *ctx,
        int ret;
 
        assert(channel);
+       assert(!channel->is_deleted);
        assert(channel->metadata_cache);
 
        memset(&request, 0, sizeof(request));
This page took 0.036884 seconds and 4 git commands to generate.