Jérémie Galarneau [Wed, 6 Jul 2016 04:14:26 +0000 (00:14 -0400)]
Fix: handle negative (unlimited) system stack size limits
This also changes the stack size selection policy to select
the largest of:
1) default pthread stack size (dictated by libc)
2) system soft limit
3) 2 MB
This is bounded by the system's hard limit on stack size.
If this limit is smaller than 2 MB, the default size mentionned
in pthread_create(3) for Linux, we warn the user that the daemons
may be unreliable and advise bumping this limit.
Note that is is most likely possible to operate the daemons with
way less than 2MB of stack space. However, this was not
extensively tested.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 5 Jul 2016 23:19:55 +0000 (19:19 -0400)]
Tests: adjust type declaration test count
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 5 Jul 2016 21:05:21 +0000 (17:05 -0400)]
Fix: protocol mismatch between UST and tools
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 5 Jul 2016 20:27:54 +0000 (16:27 -0400)]
ust-ctl: use fixed-size integer rather than enum
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Mon, 4 Jul 2016 22:24:19 +0000 (18:24 -0400)]
Test UST's autoincrementing enumeration values
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Mon, 4 Jul 2016 21:48:42 +0000 (17:48 -0400)]
Add support for UST's autoincrementing enum entries
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 5 Jul 2016 19:13:15 +0000 (15:13 -0400)]
Tests: eliminate process timeouts from Python tests
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Sebastien Boisvert [Tue, 28 Jun 2016 12:12:59 +0000 (08:12 -0400)]
Fix: English syntax errors in 'lttng status'
Signed-off-by: Sebastien Boisvert <sboisvert@gydle.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Julien Desfossez [Tue, 28 Jun 2016 21:45:52 +0000 (17:45 -0400)]
Test for select, poll and epoll syscall overrides
This test for root_regression checks if the syscall overrides for
select, pselect6, poll, ppoll, epoll_ctl, epoll_wait and epoll_pwait
work as expected on arm and x86 (32 and 64-bit).
There are 11 test cases that check for normal and abnormal behaviour. If
the test system has the Babeltrace python bindings, the test validates
the content of the events, otherwise only the presence of the generated
events is checked.
We also check if kernel OOPS, WARNING or BUG were generated during the
test.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 30 Jun 2016 20:37:57 +0000 (16:37 -0400)]
Tests: tap.sh spams tests' output when no plan is set
Some tests are implemented in C (using tap.h) or in Python
and don't use tap.sh's facilities. However, it is sourced
by utils.sh and prints an error message during its clean-up
because a plan was never set.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:07 +0000 (17:18 -0400)]
Fix: Set thread stack size to ulimit soft value
Some libc don't honor the limit set for the stack size and use their own
empirically chosen static value. Detect this behavior by checking if the
current stack size is smally than the soft limit and in that case set
the pthread stack size to soft limit value.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:06 +0000 (17:18 -0400)]
Fix: location of various standard headers
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:05 +0000 (17:18 -0400)]
Fix: missing include ctype.h for isdigit()
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:04 +0000 (17:18 -0400)]
Fix: strerror_r behavior is glibc specific
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:03 +0000 (17:18 -0400)]
Fix: error.h -> common/error.h
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 15 Jun 2016 21:18:02 +0000 (17:18 -0400)]
Fix: snapshot del-output with name on musl
Some implementations of strtol(), like the one in musl, will
return EINVAL in errno when no valid number was found in
the string.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 15 Jun 2016 21:18:03 +0000 (17:18 -0400)]
Fix: sessiond ht_match_event() check if filter is NULL
It looks like an agent event's filter expression is NULL when
it's created with -a, for example:
lttng enable-event -j -a
Since there's no check for this in ht_match_event(), strlen()
makes the session daemon segfault with this scenario:
lttng create
lttng enable-event -j -a
lttng disable-event -j -a
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 21 Jun 2016 20:29:38 +0000 (16:29 -0400)]
configure.ac: fix --enable/disable-kmod option
Now all the following work as expected:
* No option (defaults to --enable-kmod)
* --disable-kmod
* --enable-kmod
* --enable-kmod=no
* --enable-kmod=yes
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 17 Jun 2016 21:50:49 +0000 (17:50 -0400)]
Tests: spawn ht_cleanup thread in unit tests
Run the cleanup thread in the unit tests to ensure that the hash
tables are properly cleaned-up even in the context of tests. This
allows us to reliably check for memory leaks in the unit tests.
Jérémie Galarneau [Mon, 27 Jun 2016 19:18:38 +0000 (15:18 -0400)]
Lazily initialize max poll set size
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 17 Jun 2016 22:09:12 +0000 (18:09 -0400)]
Revert "Assert that a valid clean-up pipe exists on ht_cleanup_push"
This reverts commit
fc41443f7ee5fa95a942d0aedd61c75d622697b5.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 15:20:00 +0000 (11:20 -0400)]
tests: test ust snapshot with discard buffers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:59 +0000 (11:19 -0400)]
tests: test kernel snapshot with discard buffers
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:58 +0000 (11:19 -0400)]
Allow channel mode override in snapshot sessions
Allow the lttng cmd line and liblttng-ctl users to override the channel
mode in snapshot sessions.
Note that liblttng-ctl users expecting that an "overwrite" mode
explicitly set at the value "0" (discard) for a snapshot session will
now create a channel in discard mode.
The DEFAULT_CHANNEL_OVERWRITE used by liblttng-ctl
lttng_channel_set_default_attr() is changed to "-1".
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 20 Apr 2016 15:19:57 +0000 (11:19 -0400)]
Fix: validate number of subbuffers after tweaking properties
There are properties that are tweaked by each of ust and kernel channel
create functions after a validation on the number of subbuffers for
overwrite channels. Move validation after those properties
modifications.
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, 14 Jun 2016 16:46:02 +0000 (12:46 -0400)]
Use bool type for save command options
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 14 Jun 2016 16:41:39 +0000 (12:41 -0400)]
Clean-up: harmonize popt option declarations in save.c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 14 Jun 2016 16:41:09 +0000 (12:41 -0400)]
Clean-up: move mi_writer declaration with other declarations
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 14 Jun 2016 16:36:07 +0000 (12:36 -0400)]
Add name omission and output omission on save to lttng-ctl
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 14 Jun 2016 16:30:37 +0000 (12:30 -0400)]
Express overwrite attribute as a byte in communication protocol
There is no need for 4 bytes to express a boolean state.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 14 Jun 2016 16:29:24 +0000 (12:29 -0400)]
Assert that a valid clean-up pipe exists on ht_cleanup_push
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 9 Jun 2016 19:11:33 +0000 (15:11 -0400)]
Fix: do not refer to objects as .o
The extension of object files is platform dependant,
use $(OBJEXT) instead of .o when referring to objects.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 9 Jun 2016 19:11:32 +0000 (15:11 -0400)]
Fix: do not link against libtool .o objects
We should not link against libtool objects directly
since they have different names in static or shared
only build. Instead link on the full .la
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 9 Jun 2016 19:11:31 +0000 (15:11 -0400)]
Fix: Define MANPATH in config.h
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 9 Jun 2016 16:21:31 +0000 (12:21 -0400)]
Tests: Make warn_processes.sh more portable
Options to pgrep aren't standardised across coreutils
implementations, use a more common option.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Thu, 9 Jun 2016 16:21:30 +0000 (12:21 -0400)]
Fix: add missing script to dist
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 9 Jun 2016 20:14:28 +0000 (16:14 -0400)]
Fix: leak of UST app hash tables
The ht_cleanup thread is shut down before the queue of rcu
callbacks is emptied by the rcu_barrier(). Since callbacks added
by call_rcu can push hash tables through the ht_cleanup pipe, we run
into cases where the clean-up thread has been shutdown and
hash tables pushed through the clean-up pipe are leaked.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 8 Jun 2016 20:42:27 +0000 (16:42 -0400)]
Fix: leak of reply buffer on data pending check
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 8 Jun 2016 17:31:13 +0000 (13:31 -0400)]
Fix: call xmlCleanupParser to free global libxml2 allocations
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 8 Jun 2016 17:28:38 +0000 (13:28 -0400)]
Fix: missing "void" parameter of lib constructor and destructor
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 3 Jun 2016 18:11:44 +0000 (14:11 -0400)]
Docs: fix comment typos in lttng-sessiond's main.c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Fri, 3 Jun 2016 18:05:21 +0000 (14:05 -0400)]
Fix: lttng-relayd allow binding of privileged ports for non-root users
Non-root users could use authbind to bind to low-numbered ports.
Moreover, the check was inverted; !getuid() will only be true
for the root user.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 2 Jun 2016 20:27:36 +0000 (22:27 +0200)]
relayd: optimize receive throughput
For channels configured with large sub-buffer size, the relayd copies
the entire trace sub-buffer (trace packet) into a large buffer, and then
copies the large buffer to disk. It is inefficient from a point of view
of cache locality.
Use a 64k buffer on the stack instead, and move the data piece-wise.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 10:13:48 +0000 (06:13 -0400)]
Clean-up: harmonize kernctl API error checking
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 21:36:03 +0000 (17:36 -0400)]
Introduce LTTNG_IOCTL_CHECK and LTTNG_IOCTL_NO_CHECK macros
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 09:56:28 +0000 (05:56 -0400)]
Fix: enforce assumption that lttng-modules ioctl() return <= 0
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 09:19:50 +0000 (05:19 -0400)]
Fix: reduce scope of kconsumer consumed_pos and produced_pos
The consumed_pos and produced_pos accesses are protected by the
stream mutex, which is fine as-is. However, consumed_pos is
passed to consumer_get_consume_start_pos() and is flagged by
Coverity as a possible use of a "stale" consumed_pos.
From an analyzer's standpoint, this makes sense since
both lttng_kconsumer_get_produced_snapshot() and
lttng_kconsumer_get_consumed_snapshot() could leave their output
parameter uninitialized and return 0 since they both assume that
ioctl() will set errno if ret != 0.
IOCTL(3P) specifies that errno is only set if ret < 0.
A bug in lttng-modules could cause ioctl() to return a positive
value, leaving the errno variable unset. In such a case,
both functions would return 0, leaving the positions uninitialized.
A follow-up fix enforces this assumption (ret never > 0) as part
of the kernctl API.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 09:03:26 +0000 (05:03 -0400)]
Docs: document safety of consumer_thread_is_ready access
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 08:38:43 +0000 (04:38 -0400)]
Clean-up: unused ret values in thread_manage_health
Reported by Coverity as:
CID
1243014 (#1 of 15): Unused value (UNUSED_VALUE)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 2 Jun 2016 08:18:36 +0000 (04:18 -0400)]
Clean-up: remove dead code in sessiond's set_option()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Thu, 26 May 2016 22:14:37 +0000 (18:14 -0400)]
Fix: set the logger level to prevent unexpected level inheritance
BSF and other jars can ship with an embedded log4j.properties
file. This causes problem when launching an application with a general
class path (e.g /usr/share/java/*) since log4j will look for a
configuration file in all loaded jars. If any contains a directive for
the root logger, it will affect any logger with no level that are
directly under the root logger. This can result in an unexpected
behaviour (e.g no events triggered etc.).
Link: https://issues.apache.org/jira/browse/BSF-24
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Tue, 24 May 2016 18:28:46 +0000 (14:28 -0400)]
Typo: Stoping -> Stopping
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Tue, 24 May 2016 18:28:45 +0000 (14:28 -0400)]
Typo: occured -> occurred
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 22:48:16 +0000 (18:48 -0400)]
Fix: only perform lttng_consumer_sync_trace_file() in local mode
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 22:47:54 +0000 (18:47 -0400)]
Make lttng_consumer_sync_trace_file static
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 22:24:20 +0000 (18:24 -0400)]
Fix: don't negate posix_fadvise return value to check error
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 22:16:48 +0000 (18:16 -0400)]
Fix Solaris 10 build: use lttng_strnlen() wrapper
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 18:20:08 +0000 (14:20 -0400)]
Rename lttng_error_type to lttng_error_level
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 19 May 2016 15:57:45 +0000 (11:57 -0400)]
Cleanup error.h __lttng_print() used for message printing
The loglevels have never really been a mask, and it is useless to try to
use them as masks, because the compiler statically knows the value of
the loglevel requested, and can therefore optimise away all the logic.
This takes care of Coverity warning about mixed bitwise and boolean
logic, which was technically correct, but more complex than needed.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 19 May 2016 15:57:44 +0000 (11:57 -0400)]
Update coding style document for macro style
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 19 May 2016 15:57:43 +0000 (11:57 -0400)]
Fix: coding style document has erroneous semicolon at end of macro
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Thu, 19 May 2016 15:57:42 +0000 (11:57 -0400)]
Fix: add missing semicolons after MSG, DBG, ERR print macros
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 05:35:44 +0000 (01:35 -0400)]
Tests: inverted condition in test_kernel_data
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Thu, 19 May 2016 05:26:11 +0000 (01:26 -0400)]
OOT build fix: asciidoc.conf is now a source file
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 19 May 2016 02:59:12 +0000 (22:59 -0400)]
lttng-create(1): use attributes for default ports
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 19 May 2016 02:16:50 +0000 (22:16 -0400)]
lttng-create(1): add xrefs to creation mode definitions
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 19 May 2016 02:01:53 +0000 (22:01 -0400)]
lttng-create(1): use the correct DATAPORT/CTRLPORT variables
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Thu, 19 May 2016 02:01:08 +0000 (22:01 -0400)]
lttng-create(1): use def list for net protocols
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Wed, 18 May 2016 00:57:20 +0000 (20:57 -0400)]
lttng-create(1): add relay mode
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 17 May 2016 23:30:39 +0000 (19:30 -0400)]
doc/man: put AsciiDoc attributes in their own file
This facilitates the generation of man pages using another
asciidoc.conf file, but keeping the same attributes, without
having to split the generated configuration file.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:19 +0000 (14:04 -0400)]
test: UST tracing destroy flush behavior with tracefile rotation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:18 +0000 (14:04 -0400)]
test: kernel tracing destroy flush behavior with tracefile rotation
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:17 +0000 (14:04 -0400)]
Add environment variable to allow abort on error
The new environment variable LTTNG_ABORT_ON_ERROR allows each
lttng-tools program to call abort() on PERROR() and ERR() after the
error message has been printed to stderr.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:13 +0000 (14:04 -0400)]
Fix: ust-consumer: flush empty packets on snapshot channel
Snapshot operation on a non-stopped stream should use a "final" flush to
ensure empty packets are flushed, so we gather timestamps at the moment
where the snapshot is taken. This is important for streams that have a
low amount of activity, which might be on an empty packet when the
snapshot is triggered.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:16 +0000 (14:04 -0400)]
Fix: WARN() should print as WARN level, not ERR
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:15 +0000 (14:04 -0400)]
Fix: error.h: add missing parenthesis around macro parameter
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:14 +0000 (14:04 -0400)]
Fix: bogus mask on error.h PRINT types
PRINT_ERR maps to 0x1, PRINT_WARN maps to 0x2, which is fine so far to
use as masks, but PRINT_BUG maps to 0x3, which is the same as both
PRINT_ERR and PRINT_WARN, and does not make sense to use in masks with
__lttng_print:
(type & (PRINT_WARN | PRINT_ERR | PRINT_BUG))
Fix this by ensuring PRINT_BUG has its own mask, and express all
constants as shifts to eliminate the risk of re-introducing a similar
bug 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, 18 May 2016 18:04:12 +0000 (14:04 -0400)]
Fix: kernel tracing: flush after stop
We should flush the last packet after stop, not before. Otherwise, we
may end up with events written immediately after the flush, which
defeats the purpose of flushing.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:11 +0000 (14:04 -0400)]
Fix: UST should not generate packet at destroy after stop
In the following scenario:
- create, enable events (ust),
- start
- ...
- stop (await for data_pending to complete)
- destroy
- rm the trace directory
We would expect that the "rm" operation would not conflict with the
consumer daemon trying to output data into the trace files, since the
"stop" operation ensured that there was no data_pending.
However, the "destroy" operation currently generates an extra packet
after the data_pending check (the "on_stream_hangup"). This causes the
consumer daemon to try to perform trace file rotation concurrently with
the trace directory removal in the scenario above, which triggers
errors. The main reason why this empty packet is generated by "destroy"
is to deal with trace start/stop scenario which would otherwise generate
a completely empty stream.
Therefore, introduce the concept of a "quiescent stream". It is
initialized at false on stream creation (first packet is empty). When
tracing is started, it is set to false (for cases of start/stop/start).
When tracing is stopped, if the stream is not quiescent, perform a
"final" flush (which will generate an empty packet if the current packet
was empty), and set quiescent to true. On "destroy" stream and on
application hangup: if the stream is not quiescent, perform a "final"
flush, and set the quiescent state to true.
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, 18 May 2016 22:35:45 +0000 (18:35 -0400)]
Tests: remove flaky '*' kernel wildcard test
The test case for '*', which enables all events, is flaky by its
nature since buffers may be filled by other kernel events preventing
the test script from finding the test event (it is often discarded).
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Wed, 18 May 2016 18:04:10 +0000 (14:04 -0400)]
Fix: bad file descriptors on close after rotation error
Ensure we don't try to close output stream file descriptors twice when a
trace file rotation error occurs (once at tracefile rotation, once when
closing the stream). Set the fd value to -1 after the first close to
ensure we don't try to close it again.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Philippe Proulx [Tue, 17 May 2016 23:07:19 +0000 (19:07 -0400)]
Fix: configure.ac: allow --disable-python-bindings
Without using $enableval, it's not possible to disable the
Python bindings using --disable-python-bindings.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 18 May 2016 19:43:06 +0000 (15:43 -0400)]
Fix: merge tap tests stdout and stderr
This makes the output and error statement ordered in the log
file and ensure that the first line is the tap test plan. Some tap
parser are confused if the test plan is not on the first line.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 20:05:19 +0000 (16:05 -0400)]
Fix: posix_fadvise wrapper returns -ENOSYS on FreeBSD
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Michael Jeanson [Wed, 18 May 2016 16:17:27 +0000 (12:17 -0400)]
Fix: Double free in utils_partial_realpath error path
Fixes coverity #
1355521
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 16:31:23 +0000 (12:31 -0400)]
Fix: remove logically dead code in send_channel_uid_to_ust
Found by Coverity:
at_most: At condition ret < 0, the value of ret must be at most -1.
cannot_set: At condition ret < 0, the value of ret cannot be equal
to any of {-1030, -32}.
dead_error_condition: The condition ret < 0 must be true.
2825 } else if (ret < 0) {
2826 goto error_stream_unlock;
2827 }
CID
1323135 (#1 of 1): Logically dead code
(DEADCODE)dead_error_line: Execution cannot reach this statement: goto
error_stream_unlock;.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 16:22:44 +0000 (12:22 -0400)]
Fix: unchecked return value in low throughput test
Found by Coverity:
CID
1019967 (#1 of 1): Unchecked return value from library
(CHECKED_RETURN)2. check_return: Calling poll(NULL, 0UL, 60000) without
checking return value. This library function may fail and return an
error code.
We really don't care whether this poll succeeds or not.
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, 18 May 2016 19:21:41 +0000 (15:21 -0400)]
Tests: abort() exclusion test on allocation failure
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Tue, 17 May 2016 16:17:05 +0000 (12:17 -0400)]
Fix: unchecked posix_fadvise() return value
Found by Coverity:
CID
1019971 (#1 of 1): Unchecked return value from library
(CHECKED_RETURN)2. check_return: Calling posix_fadvise(outfd,
orig_offset - stream->max_sb_size, stream->max_sb_size, 4) without
checking return value. This library function may fail and return an
error code.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 16:13:13 +0000 (12:13 -0400)]
Fix: unchecked return value in relayd live.c
CID
1323137 (#1 of 1): Unchecked return value (CHECKED_RETURN)30.
check_return: Calling viewer_stream_get without checking return value
(as is done elsewhere 5 out of 6 times).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 16:06:45 +0000 (12:06 -0400)]
Fix: unchecked return value in trace_clock_read64_monotonic
Found by Coverity:
CID
1311498 (#1 of 1): Unchecked return value (CHECKED_RETURN)1.
check_return: Calling clock_gettime without checking return value (as is
done elsewhere 8 out of 9 times).
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, 18 May 2016 18:47:32 +0000 (14:47 -0400)]
Clean-up: remove unnecessary blank line
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jonathan Rajotte [Tue, 17 May 2016 15:52:47 +0000 (11:52 -0400)]
Fix: initialize the cur_event variable before using it
CID
1243041 (#1 of 1): Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized element of array *cur_event.name when
calling strcmp.
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 15:46:10 +0000 (11:46 -0400)]
Fix: Dereference after NULL check in consumer
Dereference after NULL check in consumer discarded events/lost packets
commands.
Found by Coverity:
CID
1040158 (#1 of 2): Dereference after null check (FORWARD_NULL)24.
var_deref_op: Dereferencing null pointer channel.
CID
1040158 (#2 of 2): Dereference after null check (FORWARD_NULL)24.
var_deref_op: Dereferencing null pointer channel.
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, 18 May 2016 18:40:51 +0000 (14:40 -0400)]
Tests: abort test on memory allocation failure
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 14:48:39 +0000 (10:48 -0400)]
Fix: pointer dereference after NULL check in test_create_ust_event_exclusion
CID
1256182 (#2 of 2): Dereference after null check (FORWARD_NULL)16.
var_deref_op: Dereferencing null pointer exclusion.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Mathieu Desnoyers [Tue, 17 May 2016 14:44:25 +0000 (10:44 -0400)]
Fix: NULL pointer dereference in relay_index_get_by_id_or_create
Found by Coverity:
CID
1323134 (#1 of 1): Dereference after null check (FORWARD_NULL)34.
var_deref_op: Dereferencing null pointer index.
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, 18 May 2016 18:22:14 +0000 (14:22 -0400)]
Clean-up verbosity incrementation in set_option
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 17:20:08 +0000 (13:20 -0400)]
Fix: Deference after null check in sessiond set_option
Found by Coverity:
2. var_compare_op: Comparing arg to null implies that arg might be null.
CID
1256137 (#1 of 9): Dereference after null check (FORWARD_NULL)14.
var_deref_model: Passing null pointer arg to strdup, which dereferences
it.
[... same for #2 through #9 ]
This should not really be an issue since
1) options that use the "arg" parameter will not be set by popt if one
is not provided,
2) the configuration file parser will never invoke set_option with
a NULL argument; if no "value" is provided in the file, an empty
string is passed.
The second point is the reason for the "arg && arg[0] == '\0'" check;
we already know that the argument is invalid since an empty string
is never a valid argument for the supported options.
Nonetheless, it makes sense for Coverity to flag this and moving
the check to individual cases, although very verbose, is clear.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Jérémie Galarneau [Wed, 18 May 2016 16:28:53 +0000 (12:28 -0400)]
Docs: clarify comment in parse_pid_string()
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.051581 seconds and 4 git commands to generate.