Jérémie Galarneau [Tue, 2 Dec 2014 03:07:03 +0000 (22:07 -0500)]
Fix: Missing RCU read locks in syscall_list_channel()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 2 Dec 2014 03:06:23 +0000 (22:06 -0500)]
Fix: Missing RCU read lock in kernel_destroy_session()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 27 Nov 2014 22:35:32 +0000 (17:35 -0500)]
Fix: channel names are not validated
This patch ensures:
1. A channel name does not contain any '/' character, since
relative paths may be injected in the channel name
otherwise (knowing that the channel name is eventually
part of a file name)
2. A channel name does not start with a '.' character, since
trace readers (Babeltrace is one of them) could interpret
files starting with a dot as hidden files and ignore
them when opening the CTF trace
Fixes: #751
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 1 Dec 2014 21:16:16 +0000 (16:16 -0500)]
Cleanup: Missing whitespace
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 1 Dec 2014 21:15:49 +0000 (16:15 -0500)]
Fix: Apply consumer URI changes to all domains
See the associated bug report for a lenghty explanation of the issue
and of this fix. It fixes an issue when saving a live session's
configuration that was created by loading an .lttng file.
Fixes #866
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 1 Dec 2014 03:07:44 +0000 (22:07 -0500)]
Cleanup: Fix a typo in the MI tests
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Mon, 1 Dec 2014 03:06:47 +0000 (22:06 -0500)]
Test fix: Don't invoke the system's lttng client
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 28 Nov 2014 16:51:49 +0000 (11:51 -0500)]
Tests: Add a test to check disabled events are loaded in the correct state
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 28 Nov 2014 16:07:17 +0000 (11:07 -0500)]
Fix: Don't leave events enabled if they were saved in a disabled state
Events are enabled by default on creation. The session configuration
loader must make sure to disable them after creation when restoring an
event that was saved in the "disabled" state.
Reported-by: Marcel Hamer <marcel.hamer@ericsson.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 28 Nov 2014 23:08:30 +0000 (18:08 -0500)]
Fix: "Any" loglevel's value is -1 and not 0
lttng_disable_event_ext() was erroring-out on loglevel != 0.
loglevel 0 is a valid level whereas "-1" is used an unknown/unspecified
in the rest of the code.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 28 Nov 2014 16:58:32 +0000 (11:58 -0500)]
Test fix: LTTNG_SESSION_CONFIG_XSD_PATH expects an absolute path
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 27 Nov 2014 22:23:48 +0000 (17:23 -0500)]
Fix: Memory leak on error in alloc_argv_from_user_opts()
*** CID
1256181: Resource leak (RESOURCE_LEAK)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 26 Nov 2014 23:02:22 +0000 (18:02 -0500)]
Cleanup: Unchecked close() return value in utils_create_lock_file()
*** CID
1226188: Unchecked return value (CHECKED_RETURN)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 26 Nov 2014 23:01:45 +0000 (18:01 -0500)]
Cleanup: No check of the return value of lttng_ht_del()
*** CID
1230590: Unchecked return value (CHECKED_RETURN)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 26 Nov 2014 22:34:21 +0000 (17:34 -0500)]
Cleanup: Mixed enums used for return code in send_sessiond_channel()
*** CID
1132649: Inferred misuse of enum (MIXED_ENUMS)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 26 Nov 2014 22:29:16 +0000 (17:29 -0500)]
Cleanup: Cast poll() return value to void
*** CID
1019969: Unchecked return value from library (CHECKED_RETURN)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 26 Nov 2014 21:20:21 +0000 (16:20 -0500)]
Fix: Unreachable error logging in set_option()
*** CID
1256136: Logically dead code (DEADCODE)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 18:00:03 +0000 (13:00 -0500)]
Fix: OOM leaks in sessiond modprobe.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:44:51 +0000 (12:44 -0500)]
Cleanup: sessiond modprobe.c: coding style
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:43:54 +0000 (12:43 -0500)]
Cleanup: test_utils_expand_path.c prototypes
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:43:32 +0000 (12:43 -0500)]
Fix: test_utils_expand_path.c: out of memory error handling
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:39:13 +0000 (12:39 -0500)]
Fix: test test_ust_data.c: check OOM
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:38:21 +0000 (12:38 -0500)]
Fix: test libc-wrapper: check malloc OOM
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:37:54 +0000 (12:37 -0500)]
Cleanup: test libc-wrapper: main parameters
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:37:21 +0000 (12:37 -0500)]
Fix: lttng-ctl: use zmalloc(), missing OOM check
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:36:37 +0000 (12:36 -0500)]
Fix: filter-parser.y: use zmalloc(), missing OOM check
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:36:03 +0000 (12:36 -0500)]
Fix: utils.c: check str*dup OOM
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:34:56 +0000 (12:34 -0500)]
Cleanup: implement zmalloc as static inline
Whenever we can implement as static inline rather than macro, it's
better (type checking of arguments, less chances of hitting preprocessor
aweful semantic corner-cases....).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:34:26 +0000 (12:34 -0500)]
Fix: rculfhash: use zmalloc()
Follow lttng-tools rules.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:34:01 +0000 (12:34 -0500)]
Fix: ini.c: use zmalloc()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:33:34 +0000 (12:33 -0500)]
Fix: lttng lttng.c: check strdup OOM
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:33:09 +0000 (12:33 -0500)]
Fix: lttng conf.c: use zmalloc()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:32:28 +0000 (12:32 -0500)]
Fix: lttng view.c missing strdup OOM check
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:32:13 +0000 (12:32 -0500)]
Fix: use zmalloc() in lttng view.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:31:52 +0000 (12:31 -0500)]
Fix: use zmalloc() in lttng list.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:30:18 +0000 (12:30 -0500)]
Fix: oom error check, realloc oom leak
print_exclusions can return a NULL pointer on OOM, should be checked.
Also, realloc always need to store result in a different variable than
its input in case it fails (and its returned pointer needs to be checked
for NULL).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:29:43 +0000 (12:29 -0500)]
Fix: use zmalloc in lttng enable_events.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:27:29 +0000 (12:27 -0500)]
Fix: missing strdup oom check in lttng create.c
Introduce tmp_path to ensure that no code path can possibly try to free
the return value of utils_get_home_dir(). Re-using alloc_path for both
static and dynamically allocated pointer is error-prone.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:25:55 +0000 (12:25 -0500)]
Fix: lttng add_context.c: use zmalloc
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:18:40 +0000 (12:18 -0500)]
Cleanup: add missing static to function modprobe_remove_lttng()
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:18:07 +0000 (12:18 -0500)]
Fix: add missing str*dup oom check in sessiond main.c
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:17:26 +0000 (12:17 -0500)]
Fix: add missing sessiond kernel-consumer missing str*dup oom checks
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 26 Nov 2014 17:16:19 +0000 (12:16 -0500)]
Fix: add missing strdup OOM check
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Thu, 20 Nov 2014 06:40:41 +0000 (07:40 +0100)]
Fix: add missing synchronization point for before app test case
Fixes a race where the application could generate all its events before
trace start.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:31 +0000 (22:40 +0100)]
Fix: tests: wait output hide Terminate errors
Also: Don't hide kill errors.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:30 +0000 (22:40 +0100)]
Fix: tests: remove killall, add missing SIGTERM handlers
Applications may change name and, thus, be missed by using
killall.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:29 +0000 (22:40 +0100)]
Fix: high throughput test: reset bw limit on sigterm
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:28 +0000 (22:40 +0100)]
Fix: tests: add missing wait, document missing synchro
Move all wait ${!} that target a single process to "wait", to minimize
the chances to forget some background process in the future.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:27 +0000 (22:40 +0100)]
Document test anti-patterns
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:26 +0000 (22:40 +0100)]
Fix: test flaky sleep and wait patterns
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 19 Nov 2014 21:40:25 +0000 (22:40 +0100)]
Fix: tests: don't use pidof to wait for test apps
Use the bash shell "wait" to wait for all background tasks rather than
the racy "pidof". Indeed, it's possible that applications have been
forked, but not executed yet, when pidof is done, which would therefore
miss applications. Using "wait" from the shell solves this.
If we want to be really strict, we should have sessiond, consumerd, and
relayd export a file containing their own PID, and wait for this instead
of using pidof. But this will be for another fix.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:31:39 +0000 (18:31 +0100)]
Fix: Live tracing does not honor live timer after first tracefile with tracefile rotation
When we pass to the 2nd sub-file (or following sub-files) of a stream in
relayd, the live timer has no visible effect from a live reader
perspective, and then everything is flushed when we reach the following
sub-file.
This is caused by the reset of stream->total_index_received after each
tracefile rotation. It should keep on incrementing to match what is
expected by check in check_index_status():
(rstream->total_index_received <= vstream->last_sent_index)
Fixes #863
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sun, 23 Nov 2014 16:30:33 +0000 (11:30 -0500)]
Fix: Handle empty daemon configuration file lines
Empty daemon configuration file lines such as
my_option=
will cause set_option to be called with an arg value of length 0
which should display a warning.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sun, 23 Nov 2014 15:37:06 +0000 (10:37 -0500)]
Docs: Add -f/--config option to lttng-sessiond man page
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:36:36 +0000 (18:36 +0100)]
Cleanup: spaghetti function return path
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:38:37 +0000 (18:38 +0100)]
Fix: relayd: unbalanced RCU read-side lock/unlock
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:42:05 +0000 (18:42 +0100)]
Fix: relayd: unbalanced RCU read lock/unlock
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:47:52 +0000 (18:47 +0100)]
Fix: lttng-relayd: unhandled out of memory error
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Fri, 21 Nov 2014 17:49:08 +0000 (18:49 +0100)]
Fix: relayd viewer stream: unhandled out of memory error
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 19 Nov 2014 22:01:01 +0000 (17:01 -0500)]
Build fix: Apps defining _LGPL_SOURCE must link to urcu-bp
Defining _LGPL_SOURCE causes lttng-ust tracepoint headers to
inline uses of userspace-rcu, which make linking against urcu
necessary.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 19 Nov 2014 19:14:12 +0000 (14:14 -0500)]
Define _LGPL_SOURCE in test apps' tracepoint provider files
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 19 Nov 2014 16:06:43 +0000 (11:06 -0500)]
Define _LGPL_SOURCE in test applications
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:30:56 +0000 (14:30 -0500)]
Fix: Missing rcu_read_lock in cmd_list_events()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:30:17 +0000 (14:30 -0500)]
Fix: Missing rcu_read_lock in list_lttng_agent_events()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:19:43 +0000 (14:19 -0500)]
Fix: Missing rcu_read_lock in cmd_list_channels()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:15:07 +0000 (14:15 -0500)]
Fix: Missing rcu_read_locks in cmd_list_domains()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:10:14 +0000 (14:10 -0500)]
Fix: Missing rcu_read_lock in cmd_snapshot_list_outputs()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 19:09:36 +0000 (14:09 -0500)]
Fix: Missing rcu_read_lock in save_domains()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 18:37:29 +0000 (13:37 -0500)]
Fix: Missing rcu_read_lock in ust_app_get_nb_stream()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 18 Nov 2014 16:33:23 +0000 (17:33 +0100)]
Fix: UST subbuffers silently dropped on moderate trace traffic
Well, it looks like we really screwed up on this one.
lttng-tools commit
02b3d1769d5f8a33e4109b1e681141c9295dfda6 introduced
an important regression for lttng-ust tracing in the consumer daemon:
after reading a sub-buffer, a check has been added to see whether there
are more sub-buffers available to read, and if it is the case, it
ensures the wakeup pipe will be awakened again.
The issue lies in the use of ustctl_put_next_subbuf() in this check.
This acts as if the sub-buffer has been read, when in reality it has not
been read. It therefore trashes the data contained by this sub-buffer.
This check should use ustctl_put_subbuf(), which does not move the
consumer position.
This is a severe bug, and the fix needs to be applied to stable-2.6,
stable-2.5, and stable-2.4.
Fixes #861
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 18 Nov 2014 14:35:48 +0000 (09:35 -0500)]
Fix: Missing rcu_read_lock in get_session_max_subbuf_size()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Julien Desfossez [Wed, 12 Nov 2014 23:36:17 +0000 (18:36 -0500)]
Fix: create/destroy a splice_pipe per stream
We had a per-thread splice_pipe (one for data and one for metadata), but
in case of error, we would end up filling the write side of the pipe and
never emptying it. This could lead to leaking data from one session to
the other, but also to stall the consumer trying to splice into a full
pipe.
Now we create a splice_pipe per-stream, so it is destroyed when the
session is destroyed.
Fixes: #726
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 12 Nov 2014 20:19:49 +0000 (15:19 -0500)]
Note find_ust_app_context must be called with RCU read lock
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Julien Desfossez [Tue, 11 Nov 2014 20:57:48 +0000 (15:57 -0500)]
Fix: empty indexes_ht before destroying it.
Fixes: #722
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Julien Desfossez [Tue, 11 Nov 2014 20:57:47 +0000 (15:57 -0500)]
Fix: removed useless key from relay_index
This field was never used except in debug messages (instead of using the
good value that is part of index_n).
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 15 Nov 2014 05:20:15 +0000 (00:20 -0500)]
Fix: Ambiguous agent event filter bytecode ownership
A shared ownership of the filter bytecode between UST events
and Agent event led to a leak in cmd_enable_event() which was
fixed previously. However, that fix introduced a bug which
passed NULL to the agent event creation function.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 13 Nov 2014 22:18:16 +0000 (17:18 -0500)]
Fix: filter bytecode and string memory leak on error
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 13 Nov 2014 21:22:33 +0000 (16:22 -0500)]
Fix: define _LGPL_SOURCE in C files
Defining this in headers is a bad practice, since the header is not
necessarily the first in the include list.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 15 Nov 2014 04:38:36 +0000 (23:38 -0500)]
Fix: HT must not be destroyed with a rcu_read_lock held
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Sat, 15 Nov 2014 04:35:45 +0000 (23:35 -0500)]
Fix: agent events HT should be destroyed from the cleanup thread
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Nov 2014 21:27:40 +0000 (16:27 -0500)]
Fix: missing rcu_read_lock in trace_ust_destroy_session()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Nov 2014 21:23:04 +0000 (16:23 -0500)]
Fix: missing rcu_read_lock when calling trace_ust_find_agent()
Added a comment to note that this function is assumed to be
called with the rcu_read_lock held.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 13 Nov 2014 21:09:57 +0000 (16:09 -0500)]
Fix: missing rcu_read_lock in cmd_start_trace()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 12 Nov 2014 23:18:33 +0000 (18:18 -0500)]
Cleanup: remove "disabled" flag for new release cycle
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 12 Nov 2014 23:18:32 +0000 (18:18 -0500)]
Fix: filter attach vs event enable race
In order to correctly handle the use-case where events are enabled
_after_ trace is started, and _after_ applications are already being
traced, the event should be created in a "disabled" state, so that it
does not trace events until its filter is attached.
This fix needs to be done both in lttng-tools and lttng-ust. In order to
keep ABI compatibility between tools and ust within a stable release
cycle, we introduce a new "disabled" within struct lttng_ust_event
padding (previously zeroed). Newer LTTng-UST checks this flag, and
fallback on the old racy behavior (enabling the event on creation) if it
is unset.
Therefore, old session daemon works with newer lttng-ust of the same
stable release, and vice-versa. However, building lttng-tools requires
an upgraded lttng-ust, which contains the communication protocol with
the new "disabled" field.
This patch should be backported to stable-2.4, stable-2.5, stable-2.6
branches.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 11 Nov 2014 19:36:15 +0000 (14:36 -0500)]
Fix: Mark libxml2 as a mandatory dependency
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Christian Babeux [Fri, 7 Nov 2014 23:18:43 +0000 (18:18 -0500)]
Fix: Warn the user when enabling an event in a new domain
This patch warn the user when trying to enable an event in a new domain
that was not configured prior to the tracing start.
Fixes #826
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 7 Nov 2014 22:58:15 +0000 (17:58 -0500)]
Fix: Don't report an error when listing a session with no channels
The LTTng sessiond daemon reports an error when the list_channel
command is invoked on a session which only has a metadata channel.
The error lies in assuming that a session which has an enabled
domains also has (user-visible) channels.
The metadata channel should be listed in a future fix.
Fixes #855
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 7 Nov 2014 21:10:46 +0000 (16:10 -0500)]
Bypass 0 byte allocation when no domains are enabled
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Christian Babeux [Fri, 7 Nov 2014 17:17:02 +0000 (12:17 -0500)]
Fix: Add missing URCU_TLS access to error_log_time
Fixes #849
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 6 Nov 2014 22:34:08 +0000 (17:34 -0500)]
Fix: check userspace perf counter name when looking up contexts
create_ust_app_channel_context() looks for a context's existance
in a channel before adding it. However, it only checks for
context types. This is valid for all context types except for
LTTNG_UST_CONTEXT_PERF_THREAD_COUNTER since multiple perf
thread counters may be enabled at the same time.
This fix ensures that the perf counter name is taken into
consideration when checking for a context's presence in a
channel.
Reported-by: Alexander Grigoriev <alexgri@tbricks.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 5 Nov 2014 22:34:14 +0000 (17:34 -0500)]
Update maintainer section of the man pages
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 5 Nov 2014 20:51:29 +0000 (15:51 -0500)]
Update maintainer section of README.md
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 4 Nov 2014 22:59:29 +0000 (17:59 -0500)]
Fix: add README.md to documentation files
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
David Goulet [Fri, 31 Oct 2014 17:23:29 +0000 (13:23 -0400)]
Fix: UST consumer sync all available metadata
In live mode, the sync metadata function was only working on one single
metadata stream of a given session ID. However, we can have multiple
metadata stream for the same session ID thus failing to send the data in
live mode correctly for the other streams.
This fixes it by simply iterating over all metadata stream for a session
ID and syncing them all.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Nathan Lynch [Tue, 28 Oct 2014 02:00:06 +0000 (21:00 -0500)]
Test: remove bogus argument from prove invocation
An argument of "$2" was added to the prove command line in tests/run.sh
by
68270f0f604e "Mi test: Basic test structure". This is harmless since
run.sh is never called with more than one argument, but it is confusing,
and it breaks patches in OE that add support for running tests on the
target.
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Sat, 25 Oct 2014 20:47:31 +0000 (16:47 -0400)]
Fix: typo in pythong test Makefile
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 23 Oct 2014 14:16:06 +0000 (10:16 -0400)]
Fix: memory leak in libconfig
Fixes Coverity issue
1191755.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 14 Oct 2014 15:15:22 +0000 (11:15 -0400)]
Add Python agent support
Support the new Python agent shipped in liblttng-ust.
This adds the -p, --python option to the list and enable/disable-event
command to control the domain exactly like JUL and LOG4J.
The agent support is for the Python "logging" module.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 7 Oct 2014 19:05:48 +0000 (15:05 -0400)]
Fix: return EINVAL if agent registration fails
The errno value might be 0 thus not returning an error if so. It has
been seen with an unstable python agent code base which means it could
happen in the future if a third part decides to create an agent.
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.042438 seconds and 4 git commands to generate.