David Goulet [Fri, 7 Dec 2012 17:05:24 +0000 (12:05 -0500)]
Fix: check ht_del ret value of ust app session
UST app sesion can be destroyed by two execution paths. Either the app
unregisters or a destroy session is triggered. So, allowing a ht_del to
fail means that the session is already scheduled for teardown in a rcu
call.
Furthermore, this means that when looking up for a ust app session that
is not found becomes valid since it means it is in the teardown process.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 4 Dec 2012 23:10:45 +0000 (18:10 -0500)]
Fix: locking order between consumer and stream
Also, lock the stream BEFORE calling the read subbuffer so not to race
with the data pending command.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 4 Dec 2012 23:17:55 +0000 (18:17 -0500)]
Fix: don't steal key when adding a metadata stream
This was causing a stream corruption of the node key if the stream->key
of the metadata was matching a stream wait_fd making the stream not
findable and asserting when getting out of the metadata poll wait.
Now we lookup the stream before adding it to make sure it's unique and
don't try to steal the key anymore since wait_fd is unique to the
consumer.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Thu, 6 Dec 2012 14:20:11 +0000 (09:20 -0500)]
Consumer hold mutex for add stream
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
David Goulet [Mon, 3 Dec 2012 21:57:57 +0000 (16:57 -0500)]
Fix: audit all close/fclose and check returned code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 21:43:43 +0000 (16:43 -0500)]
Fix: update/clean lttng.h comments
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 21:14:31 +0000 (16:14 -0500)]
Fix: install lttng health check man page
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 21:07:45 +0000 (16:07 -0500)]
Fix: ship relevant documentations with tarball
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 21:01:09 +0000 (16:01 -0500)]
Remove useles AUTHORS and NEWS files
Authors are in each code files associated with the copyright statement.
AUTHORS is useless and out of date. NEWS contains nothing.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 21:00:45 +0000 (16:00 -0500)]
Fix: update urcu version in README and configure.ac
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 20:08:48 +0000 (15:08 -0500)]
Update version to v2.1.0-rc9
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 19:15:25 +0000 (14:15 -0500)]
Fix: set the stream ht static in consumer file
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 18:08:25 +0000 (13:08 -0500)]
Update sessiond man page with new env var
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 3 Dec 2012 17:59:03 +0000 (12:59 -0500)]
Update lttng.1 man page
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 28 Nov 2012 20:30:37 +0000 (15:30 -0500)]
Fix: enable-consumer for all domains missing dir
So the fix here is to enable consumer for all domains if no domain is
given to the command line. This way, the session daemon can handle
correctly the trace directory path for the right domain.
Note that there is *no* switch for all domains (-a, --all) so omitting
the domain (-u or -k) automatically creates a UST and kernel session, if
none, and set the consumer for both of them. If one fails, the command
is stopped. All in all, to be sure, use a domain with the command ;).
Fixes #333
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 28 Nov 2012 16:05:09 +0000 (11:05 -0500)]
Fix: Add missing fct prototypes when disabling UST
Signed-off-by: David Goulet <dgoulet@efficios.com>
Andrew Gabbasov [Wed, 28 Nov 2012 14:43:26 +0000 (08:43 -0600)]
Fix a typo in lttng-probe-module name
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 27 Nov 2012 18:52:10 +0000 (13:52 -0500)]
Assign values to enum lttcomm_sessiond_command
These command's code are part of a communication protocol so numbering
them is important.
Note that the RELAYD command should be in a seperate enum but until we
wrote the specs of the protocol with the commands value, this is fine
for now.
Fixes #397
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 27 Nov 2012 18:51:45 +0000 (13:51 -0500)]
Fix: run health test only if root
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Mon, 26 Nov 2012 20:58:08 +0000 (15:58 -0500)]
Clarify empty string/NULL filter errors
Fixes #404
Reported-by: Jesus Garcia <jesus.garcia@ericsson.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:45:28 +0000 (14:45 -0500)]
Fix: add missing padding for UST filter
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:11:15 +0000 (14:11 -0500)]
Update version to v2.1.0-rc8
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 19:04:09 +0000 (14:04 -0500)]
Fix: Uninit. variable in lttng view
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 16:54:50 +0000 (11:54 -0500)]
Add already enabled UST event error code
Return this error if the event is already enabled when found during an
enable event command.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 22 Nov 2012 15:22:09 +0000 (10:22 -0500)]
lttng.h API update: set filter becomes enable event with filter
The lttng_set_event_filter() is changed to
lttng_enable_event_with_filter() taking the same arguments. The lttng UI
now only uses this call. Note that the original lttng_enable_event() is
still available but will set the filter to NULL.
This is done since now UST allows to enable the same event with
different filters or/and loglevels. So, the events are still hashed by
name but matched by the name/filter/loglevel triplet. In order to add an
event to the hash table, those three attributes are needed at the
creation time thus adding this API call which takes them all at once.
There is some fixes in the match functions and filter setting from the
previous commit that were needed to make the overlap.sh tests works.
The loglevel_match function is removed because it is now only done in
the hash table match function which will eventually get merged making a
single loglevel match call site hence this function becomes useless.
Furthermore, the filter.c/.h are no longer required since the filter is
now added at event creation and CAN NOT be set after.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 21 Nov 2012 17:28:03 +0000 (12:28 -0500)]
Change the UST event hash table match function
The event are now matched, when looked up, with the name/filter/loglevel
triplet since the UST tracer now allows us to enable the same event with
different filters or/and loglevels.
The disable command however only takes the event name so for now it
disable all events matching that name which is why we still hash by
event name.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 19 Nov 2012 19:02:23 +0000 (14:02 -0500)]
Pass lttng_event struct to the set_filter API call
This is the first commit which aims at changing the event hash table key
from the single event name to event_name/filter/loglevel triplet.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 20 Nov 2012 18:33:23 +0000 (13:33 -0500)]
Adding context to an event is no longer possible
The UST tracer does not allow to add context to an event so we've
removed that.
It is completely removed from the lttng UI so it's not possible either
to add one to the kernel. The "event_name" of lttng_add_context is now
ignored.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 16 Nov 2012 18:38:11 +0000 (13:38 -0500)]
Add UST overlap tests
Tests the overlap of event names, wildcards, loglevels and filters.
Not added yet to the make check since this depends on lttng-ust 2.1 not
yet released.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 16 Nov 2012 20:14:47 +0000 (15:14 -0500)]
Add filter sequence number to UST
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 20:10:48 +0000 (15:10 -0500)]
Fix: Typo from a previous patch in an assert()
Typo got in with commit:
49c336c1679295a31b92223dca05feccfe3e3464
Fixes #399
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 18:42:44 +0000 (13:42 -0500)]
Fix: Warn if session is running with lttng view
Fixes #156
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 18:26:02 +0000 (13:26 -0500)]
Fix: Add bash requirement to README for make check
Fixes #387
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 14 Nov 2012 17:40:32 +0000 (12:40 -0500)]
Fix: add the notion of domain to lttng.1 man page
Fixes #194
Signed-off-by: David Goulet <dgoulet@efficios.com>
Woegerer, Paul [Wed, 14 Nov 2012 12:55:59 +0000 (13:55 +0100)]
Enable additional kernel probes
http://lists.lttng.org/pipermail/lttng-dev/2012-November/019046.html
Commit id in lttng-modules:
b283666ff19841a28b0448c6a867beb2f809f11a
Signed-off-by: Paul Woegerer <Paul_Woegerer@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 20:32:33 +0000 (15:32 -0500)]
Update CodingStyle
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:43 +0000 (14:28 -0500)]
Use the new functions for default subbuf sizes
Use the functions added by the previous commit. All the occurences of
the previous defines were replaced.
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:42 +0000 (14:28 -0500)]
Add default subbuf sizes getter functions
This patch adds functions to retrieve defaults subbuf sizes. It uses the
DEFAULT_*_SUBBUF_SIZE defines from defaults.h but also make sure that
the values are at least as big as the page size.
The functions are defined as static inline in defaults.h.
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Simon Marchi [Tue, 13 Nov 2012 19:28:41 +0000 (14:28 -0500)]
Add max() and min() macro in common
Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 18:44:38 +0000 (13:44 -0500)]
Update version to v2.1.0-rc7
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 13 Nov 2012 18:44:02 +0000 (13:44 -0500)]
Fix: remove temporary directory for valid filters test
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 20:28:06 +0000 (15:28 -0500)]
Fix: Add pointer check when freeing poll events
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 20:23:48 +0000 (15:23 -0500)]
Fix: FD leak on thread error
Also, don't spawn the kernel thread if not root and the no-kernel option
is set.
Fixes #316
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:52:39 +0000 (13:52 -0500)]
Fix: Wrong fd used by kernel_wait_quiescent
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:37:25 +0000 (13:37 -0500)]
Support new lttng-ust error code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 18:36:02 +0000 (13:36 -0500)]
Fix: Don't set filter if enable event fails
Furthermore, the session daemon now returns an already exist error if
the event is enabled twice. Since we can now set filter, it's misleading
the user to tell him/her that the event was enabled but the filter
failed and than disabling the already enabled event by a previous
command.
Fixes #363 #364
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 9 Nov 2012 16:36:51 +0000 (11:36 -0500)]
Fix: Wrong data port when listing session
Fixes #377
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 8 Nov 2012 19:08:28 +0000 (14:08 -0500)]
Fix: Enable event after start command
Refer to the bug tracker for more information on this bug. In a
nutshell, it was not possible to enable channel/event after a start
command has been issued (for both kernel and UST).
Note that it is still NOT possible to enable a channel after a start but
the use case here was the following:
$ lttng create
$ lttng start
$ lttng enable-event -a -u (or -k)
The first starts does NOT create a kernel or UST session so the
following enable event creates the session for the given domain but
failed to start the session after.
https://bugs.lttng.org/issues/346
https://bugs.lttng.org/issues/394
Fixes #346 #394
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Thu, 8 Nov 2012 19:19:51 +0000 (14:19 -0500)]
Fix: Teardown of thread_manage_clients on failure of listen/create_poll
Currently, if the call to lttcomm_listen_unix_sock or
create_thread_poll_set fails, the error handling and thread teardown
code path is triggered via a jump to an error label. This error handling
path closes the sockets that were used and cleanup the poll set. If the
listen fails, the poll set will tentatively be cleaned even though it
has never been initialized.
This patch add 2 labels to differentiate the error handling paths needed
in case of failure of lttcomm_listen_unix_sock or
create_thread_poll_set.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 15:24:22 +0000 (11:24 -0400)]
Add a timeout to UST application socket
By default, a 5 seconds timeout is set on every UST application socket
just after the accept() for both recv and send operation.
This value can be changed through a new environment variable (seconds)
of the session daemon.
This is the first step to fix bug386 where a stopped application can
stalls indefinitely the session daemon when a new command is sent.
The bug 386 is also fixed with the lttng-ust commit:
7bc53e94a229963972aa78880b361b1510fdd268
Fixes #386
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 7 Nov 2012 20:32:13 +0000 (15:32 -0500)]
Revert "Fix cross-compile"
This reverts commit
5692e22beeb7119d68055d6450b924972b5f20d0.
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Wed, 7 Nov 2012 20:13:21 +0000 (15:13 -0500)]
Fix cross-compile
configure.ac should use --target, not --host to get the target info we
want to compile for. --host is for the host that does the build.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 20:55:58 +0000 (15:55 -0500)]
Fix: Consumerd error socket connect race
Fixes #366
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 31 Oct 2012 19:12:00 +0000 (15:12 -0400)]
Fix: Set CLOEXEC flag on every created sockets
Every new socket created by an accept() in the session daemon is set
with the CLOEXEC flag so when the consumer is spawned we don't leak.
Fixes #367
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 15:18:26 +0000 (10:18 -0500)]
Remove consumer poll timeout in data thread
This was originally used to stop any poll() after a grace period when a
session daemon dies in case of weird stuck fd(s).
However, things have changed a bit especially on the UST tracer side
where all stream handles are now cleaned up if the session daemon socket
hang up which than release every stream on the consumer and finally
quits gracefully.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 20:21:18 +0000 (15:21 -0500)]
Fix: RCU hash table seed
Remove the dangerous static value 0x42UL. Use time(NULL) value to set
the new lttng_ht_seed variable when the hash table library constructor
is called.
Fixes #388
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 6 Nov 2012 18:32:05 +0000 (13:32 -0500)]
Fix: Do not install health tests helper libraries
The libraries libhealthexit and libhealthstall should not be installed
on the user system. They are only useful for the health check tests.
Furthermore, when adding libraries to noinst_LTLIBRARIES, libtool will
only build these as static libraries (see [1] for a workaround). This is
fine for most use cases, but for the health tests, we _must_ have shared
libraries (the nature of the tests require LD_PRELOAD), hence we force
the build of a shared object.
Forcing shared object has the unfortunate side-effect of breaking builds
where configure was invoked with "--disable-shared" flag. Instead of
failing badly, detect this flag and skip the health tests altogether.
noinst shared libs:
[1] - https://lists.gnu.org/archive/html/libtool/2008-06/msg00082.html
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 19:35:43 +0000 (14:35 -0500)]
Fix: Create default channel on add-context if none
For both kernel and UST, if no channel exists and an add-context command
is sent, the default channel0 is created and the context(es) are set.
Fixes #391
Signed-off-by: David Goulet <dgoulet@efficios.com>
Mathieu Desnoyers [Tue, 6 Nov 2012 18:47:17 +0000 (13:47 -0500)]
Support new liblttng-ust-ctl error code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 6 Nov 2012 14:41:35 +0000 (09:41 -0500)]
Fix: Add EPIPE error handling on buffer splice
Even though this is _not_ documented in splice(2), if the fd_out is a
socket but closed on one end, splice returns a negative value and set
errno to EPIPE. The man page specifies a EBADF but I guess both are
possible (and it is according to the kernel 3.6.2 source).
So, when streaming a kernel session (using splice), if the relayd quits,
a splice on the socket returns an EPIPE.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 5 Nov 2012 22:03:19 +0000 (17:03 -0500)]
Fix: Channel creation error return code was not set
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 5 Nov 2012 21:49:40 +0000 (16:49 -0500)]
Fix: Wrong poll events on UST application socket
The thread manage apps was adding UST sockets to the poll set with the
POLLIN event registered. However, the thread was not handling this event
which could ultimately cause an infinite loop if the application sends
data.
This has been observed with the bug386 when an application is stopped
and a lttng command is sent.
https://bugs.lttng.org/issues/386
Furthermore, a time window between the send and the reply recv of an UST
command was making the app manager loop actively because of a POLLIN
event on the socket caused by the reply from the application which is
finally handled a bit after by the client thread. This was not that
problematic but lead to a lot of repeated debug message and CPU time
lost.
This application thread is *only* handling error event usually triggered
by a close() on the UST socket thus OK to *not* wait for POLLIN/POLLOUT
event.
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 2 Nov 2012 19:04:02 +0000 (15:04 -0400)]
Fix: Remove dependency to urcu-cds in tools tests
The -lurcu-cds link flag is not mandatory to link any of the tests.
Also, adding this flag can cause multiple symbol definition errors when
linking statically because the libhashtable contains symbol names that
are also present in urcu-cds.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Fri, 2 Nov 2012 19:03:17 +0000 (15:03 -0400)]
Fix: Missing librt dependency in configure check for lttng-ust-ctl
The lttng-ust-ctl library depends on librt. The AC_CHECK_LIBRARY macro
can't automatically resolve dependents libraries (ala libtool), so any
additionnals dependencies must be manually specified.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 18:14:26 +0000 (14:14 -0400)]
Fix: Don't append datetime to default session name
The liblttng-ctl was appending the date and time to the "auto" session
if detected. The 'auto' keyword is only used by lttng command line
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 17:45:05 +0000 (13:45 -0400)]
Fix: Deny session creation name 'auto'
This is a reserved keyword for default session(s). Note that this is
only for the lttng command line tool. Using 'auto' is possible with the
API but the current date and time is automatically appended to it for
now so be aware of that.
Fixes #359
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 17:16:29 +0000 (13:16 -0400)]
Fix: Add space for stream name CPU number
Fixes #358
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 16:38:33 +0000 (12:38 -0400)]
Fix: Add output option to enable-channel command
Allow to specify an output mode for the channel (MMAP or SPLICE).
A new error code is introduced to notify the user that the operation is
not supported. Useful for user space tracing which does NOT support
splice mode.
Fixes #335
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 2 Nov 2012 15:31:28 +0000 (11:31 -0400)]
Update version to v2.1.0-rc6
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Wed, 31 Oct 2012 13:00:45 +0000 (09:00 -0400)]
Tests: Add filtering tests for uncovered cases
While investigating the code coverage of the filtering feature, a couple
of possible tests cases were uncovered:
Error tests:
* Strings can't be IR root node
* Unary ! not allowed on string type
* Comparison with string type not allowed
* Logical operator not allowed with string types
* Nesting of binary operator not allowed
Valid tests:
* Cover all left/right operands permutations with
fields ref. and numeric values.
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 20:27:08 +0000 (16:27 -0400)]
Fix: Sync issue when deleting a data stream
A data stream was rescheduled for deletion after a flush on hang up.
Once in a normal read code path, on error, the stream is deleted and
then processed for ERR|HUP error which could also delete again the
stream causing an assert() and a failed trace.
We fix that by setting the local array to NULL for that stream once
deleted and ignoring the stream is subsequent loop if NULL.
Fixes #390
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 1 Nov 2012 17:02:58 +0000 (13:02 -0400)]
Rename data_available to data_pending
This is just a rename and a change of semantic.
The lttng_data_pending returns 0 if _NO_ data is pending meaning that
the buffers are ready to be read safely. A value of 1 means that data is
still pending so the buffers are not ready for any read.
This is the same semantic as lttng_data_available but in reverse order.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 31 Oct 2012 16:39:19 +0000 (12:39 -0400)]
Fix: consumer health state
Fixes #389
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 19:17:06 +0000 (15:17 -0400)]
Fix: Add the ACCOUNTING flag to ht creation and set bucket size to 0
The resize feature does not work well without the accounting :)
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 19:11:18 +0000 (15:11 -0400)]
Fix: Bad return error code handling
Two things here. First, if the tracer dies before we have time to create
the session on it, the returned value (-1) was not handled creating a
segfault on the following loop.
Second, we no longer assert on the application PID hash table delete
return value since we use add_replace on app. registration creating a
possible key reuse for a different node.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Tue, 30 Oct 2012 14:39:41 +0000 (10:39 -0400)]
Fix: Use after free() of the rundir string
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 29 Oct 2012 18:49:50 +0000 (14:49 -0400)]
Fix: Cleanup UST app session on ustctl create session error
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 29 Oct 2012 16:02:14 +0000 (12:02 -0400)]
Fix: add missing pthread_join in sessiond
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:30:08 +0000 (13:30 -0400)]
Fix: free running directory string
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:23:25 +0000 (13:23 -0400)]
Fix: UST app clean list node usage
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:12:47 +0000 (13:12 -0400)]
Add liblttng-ctl destructor to cleanup memory
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:09:29 +0000 (13:09 -0400)]
Fix: Cleanup URIs on teardown
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 17:04:27 +0000 (13:04 -0400)]
Fix: relayd memleaks
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 16:32:42 +0000 (12:32 -0400)]
Fix: Memory leaks of allocated URIs
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 16:20:41 +0000 (12:20 -0400)]
Fix: consumer output memory leak on creation
The sockets hash table was allocated two times hence losing the first
reference at the second allocation.
Furthermore, when a kernel/ust session is created, a default consumer is
allocated but was lost short after that when the tracing session current
consumer was copied and the pointer was overwritten.
Note that this fixes the memory leak but there is a code logic that
seems wrong when it comes to handle the consumer object trace path and
subdir during the session creation. A comment has been added and it
should be fixed.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:48:19 +0000 (11:48 -0400)]
Fix: missing addrlen initialization before accept(2)
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:23:15 +0000 (11:23 -0400)]
Fix: relayd trace file padding memleak
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 15:18:12 +0000 (11:18 -0400)]
Fix: Remove useless consumer subdir string concatenation
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 14:33:16 +0000 (10:33 -0400)]
Fix: lttng create allocated path memleak
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Fri, 26 Oct 2012 14:28:21 +0000 (10:28 -0400)]
Fix: Cppcheck memleakOnRealloc mistake
Common realloc mistake: "data_buffer" nulled but not freed upon failure.
Common realloc mistake: "tmp" nulled but not freed upon failure
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 25 Oct 2012 19:48:15 +0000 (15:48 -0400)]
Fix: Synchronization issue for data available command
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Thu, 25 Oct 2012 19:34:59 +0000 (15:34 -0400)]
Fix: consumer relayd cleanup on disconnect
Improve the resilience of the consumer by cleaning up a relayd object
and all associated streams when a write error is detected on a relayd
socket.
Fixes #385
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 23 Oct 2012 19:36:41 +0000 (15:36 -0400)]
Fix: Handle the unary bitwise negation operator (~) in the XML printer
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Christian Babeux [Tue, 23 Oct 2012 19:36:17 +0000 (15:36 -0400)]
Fix: Possible memory leaks when creating filter IR root node
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Wed, 24 Oct 2012 16:40:59 +0000 (12:40 -0400)]
Fix: Delete stream on write error in consumer
Whenever a write() error occured, both on network or local trace file,
the consumer thread just died considering the error a fatal one.
This commit fixes that by simply deleting the stream, removing it from
the poll set of the thread and freeing it.
Furthermore, on a write() error, a SIGPIPE is usually raised if the FD
is invalid. The consumer is catching this signal but was initiating a
should exit action thus ultimately cleaning all threads. We now still
catch SIGPIPE but don't set the should quit flag so normal cleanup can
be done by the threads.
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:24:40 +0000 (17:24 -0400)]
Fix: Error handling when sending relayd sockets to consumer
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:18:44 +0000 (17:18 -0400)]
Add stream lock comment for nesting
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:16:38 +0000 (17:16 -0400)]
Fix: Mutex and RCU lock nesting in consumer
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 21:15:19 +0000 (17:15 -0400)]
Fix: Uninitialized ret code
Signed-off-by: David Goulet <dgoulet@efficios.com>
David Goulet [Mon, 22 Oct 2012 20:44:51 +0000 (16:44 -0400)]
Fix: Remove bad condition and fix overflow issue
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.043908 seconds and 4 git commands to generate.