lttng-tools.git
10 years agoUpdate version to v2.3.2 v2.3.2
David Goulet [Fri, 28 Feb 2014 18:06:11 +0000 (13:06 -0500)] 
Update version to v2.3.2

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: minor rephrasing of the lttng.1 man page
David Goulet [Wed, 26 Feb 2014 17:04:57 +0000 (12:04 -0500)] 
Fix: minor rephrasing of the lttng.1 man page

Fixes #730

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: possible NULL deref. in sessiond error path
Stefan Seefeld [Wed, 26 Feb 2014 03:44:30 +0000 (22:44 -0500)] 
Fix: possible NULL deref. in sessiond error path

Fxies #735

Signed-off-by: Stefan Seefeld <stefan@codesourcery.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: flag that kernel streams FDs has been sent
David Goulet [Tue, 25 Feb 2014 20:24:53 +0000 (15:24 -0500)] 
Fix: flag that kernel streams FDs has been sent

Flag the session *after* every stream was successfully sent.

Fixes #731

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: forbid session name creation if contains /
David Goulet [Tue, 25 Feb 2014 19:45:08 +0000 (14:45 -0500)] 
Fix: forbid session name creation if contains /

This adds a validation function for session name which for now denies
any session name containing '/'.

This is in response of bug #721 that actually uses a path as a session
name such as "test/../session1" which would then be concatenated to the
session path adding a relative path to it making this a serious security
issue.

Because of this issue, this is backported from master up to stable-2.3.

Fixes #721

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't start session if no channel
David Goulet [Tue, 25 Feb 2014 19:22:19 +0000 (14:22 -0500)] 
Fix: don't start session if no channel

This adds a new error code that indicates that the session contains NO
channel.

Fixes #715

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: report error if consumer can't be spawned
David Goulet [Tue, 25 Feb 2014 18:55:12 +0000 (13:55 -0500)] 
Fix: report error if consumer can't be spawned

On error of the UST consumer execl(), we now exit the forked process
like the kernel does.

Furthermore, fix an error handling value when timing out when waiting
for the consumer to bootstrap thus returning an error to the client and
not continuing with the command thinking that the consumer was actually
spawned.

So, the expected behavior is to wait for the pthread condition and if a
timeout is seen, the client is informed thus making the client command
hang for the default timeout value of 30 seconds.

Fixes #702

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: lttng list -u <name> should only list UST
David Goulet [Tue, 25 Feb 2014 17:42:04 +0000 (12:42 -0500)] 
Fix: lttng list -u <name> should only list UST

Fixes #654

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: kernel channel destroy on consumer if sent
David Goulet [Tue, 25 Feb 2014 17:21:32 +0000 (12:21 -0500)] 
Fix: kernel channel destroy on consumer if sent

An enable-channel immediately followed by a destroy session triggered an
assert on the consumer followed by the shutdown of the consumer thread
for the kernel.

This fix make sure we don't ask the consumer to destroy a channel if not
previously sent to it and handle not found channel on destroy.

Fixes #643

Signed-off-by: David Goulet <dgoulet@efficios.com>
Conflicts:
src/common/kernel-consumer/kernel-consumer.c
- No health in stable-2.3 thus had to remove a health update
code statement.

10 years agoFix: Define __STDC_LIMIT_MACROS to fix C++ builds
Jérémie Galarneau [Mon, 10 Feb 2014 16:04:22 +0000 (11:04 -0500)] 
Fix: Define __STDC_LIMIT_MACROS to fix C++ builds

Necessary to include the fixed-width type limits on glibc versions
older than 2.18 when building with a C++ compiler.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove unused goto label
David Goulet [Tue, 4 Feb 2014 20:12:49 +0000 (15:12 -0500)] 
Fix: remove unused goto label

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: relayd: add LPOLLERR to events
Mathieu Desnoyers [Mon, 27 Jan 2014 04:26:53 +0000 (23:26 -0500)] 
Fix: relayd: add LPOLLERR to events

Same as session daemon.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Conflicts:
(does not exists) src/bin/lttng-relayd/live.c

10 years agoFix: relayd: initialize lttcomm inet
Mathieu Desnoyers [Mon, 27 Jan 2014 03:45:10 +0000 (22:45 -0500)] 
Fix: relayd: initialize lttcomm inet

Not doing so does not take into account env. var. timeouts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: consumerd: HT init/teardown with program
Mathieu Desnoyers [Mon, 27 Jan 2014 03:39:44 +0000 (22:39 -0500)] 
Fix: consumerd: HT init/teardown with program

Hash tables shared between threads should not be initialized by a
specific thread, because the other threads could start using it before
it is initialized.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Conflicts:
src/bin/lttng-consumerd/lttng-consumerd.c
src/common/consumer.c

10 years agoFix: consumerd should initialize lttcomm
Mathieu Desnoyers [Mon, 27 Jan 2014 03:08:27 +0000 (22:08 -0500)] 
Fix: consumerd should initialize lttcomm

Missing initialization makes the consumer daemon not care about the
env. var. specifying the timeouts.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: measure UST clock offset with best sample (v2)
Mathieu Desnoyers [Thu, 30 Jan 2014 22:06:30 +0000 (17:06 -0500)] 
Fix: measure UST clock offset with best sample (v2)

Fixes #729

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: report to client when snapshot will be empty
David Goulet [Tue, 14 Jan 2014 20:44:55 +0000 (15:44 -0500)] 
Fix: report to client when snapshot will be empty

This adds a new lttng error code being the "snapshot nodata".

Fixes #662

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing reset when listing UST fields for multiple PIDs
David Goulet [Thu, 9 Jan 2014 15:39:19 +0000 (10:39 -0500)] 
Fix: missing reset when listing UST fields for multiple PIDs

Fixes #627

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: filter: check binary op nesting
Mathieu Desnoyers [Tue, 7 Jan 2014 21:24:53 +0000 (21:24 +0000)] 
Fix: filter: check binary op nesting

Should pass nesting + 1 as parameter rather than nesting++. Worked in
when nesting was in one direction (due to side-effect of the first ++),
but not the other.

Fixes #688

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove break in epoll loop of apps. thread
David Goulet [Wed, 18 Dec 2013 23:34:44 +0000 (18:34 -0500)] 
Fix: remove break in epoll loop of apps. thread

In *heavy* stress test with a large number of applications (> 7000 a
second), the manage application thread could starve the delete process
by breaking just after adding an application to the poll set.

Also, we've observed that somehow the application unregister process is
not done on most of the application by breaking the loop at each delete
from the poll set. We are still uncertain why but one theory is that
epoll detects that an I/O operation is ready (here a shutdown) and an
other subsystem of the session daemon uses that socket for I/O which
flags the poll event as "has been taken care of" thus the loop never
sees it because of that break.

The notify socket thread does not use a break between poll operation
which leads us to that conclusion with the manage apps thread.

We don't use epoll with edge-trigger thus a POLLERR/POLLHUP should
always be return as long as it's not taken care of.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: wrong comment in snapshot public API
David Goulet [Tue, 17 Dec 2013 18:33:44 +0000 (13:33 -0500)] 
Fix: wrong comment in snapshot public API

Reported-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove bad code from previous backport patch
David Goulet [Tue, 3 Dec 2013 19:39:29 +0000 (14:39 -0500)] 
Fix: remove bad code from previous backport patch

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: bad logical check of error codes
David Goulet [Tue, 3 Dec 2013 16:35:31 +0000 (11:35 -0500)] 
Fix: bad logical check of error codes

Fixes #701

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: resource leak in enable-event command
David Goulet [Thu, 28 Nov 2013 21:02:14 +0000 (16:02 -0500)] 
Fix: resource leak in enable-event command

Fix coverity issue 1129187.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: unchecked return value in ust app delete
David Goulet [Thu, 28 Nov 2013 20:55:05 +0000 (15:55 -0500)] 
Fix: unchecked return value in ust app delete

Fix coverity issue 1132897.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: dereference after null check in UST registry
David Goulet [Thu, 28 Nov 2013 20:52:25 +0000 (15:52 -0500)] 
Fix: dereference after null check in UST registry

Fix coverity issue 1132896.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Resource leak in ust registry
David Goulet [Thu, 28 Nov 2013 20:40:44 +0000 (15:40 -0500)] 
Fix: Resource leak in ust registry

Fix coverity issue 1019918.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: backported from urcu commit 92af1a30
David Goulet [Thu, 28 Nov 2013 19:55:07 +0000 (14:55 -0500)] 
Fix: backported from urcu commit 92af1a30

commit 92af1a30ca6a70945b167c31631c8598a626c71a
Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date:   Thu Nov 28 18:41:13 2013 +0100

    Fix undefined NULL pointer arithmetic

    Clang 3.3 with -O2 optimisations is especially picky about arithmetic
    on NULL pointers. This undefined behavior is turned into optimized out
    NULL checks by clang 3.3. Fix the undefined behavior by checking against
    the pointer directly, without going back and forth around NULL with
    pointer arithmetic.

Reported-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: update back the metadata len sent on failure
David Goulet [Thu, 28 Nov 2013 18:20:15 +0000 (13:20 -0500)] 
Fix: update back the metadata len sent on failure

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't fail on push metadata if no channel
David Goulet [Thu, 28 Nov 2013 18:08:10 +0000 (13:08 -0500)] 
Fix: don't fail on push metadata if no channel

The comments in the code explains it well but in a nutshell, this is an
acceptable race between the creation of the metadata on the consumer
side and the push metadata from the session daemon for that channel.

This race is resolved by either having the consumer requesting metadata
or the session is stopped which will in both situation push the metadata
to the consumer.

Without that fix, the session daemon flags the registry's metadata to be
"closed" which usually indicates that the consumer is not responding
leading to the consumer thread exiting in the session daemon.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: comparison of unsigned enum expression >= 0
David Goulet [Mon, 25 Nov 2013 19:15:51 +0000 (14:15 -0500)] 
Fix: comparison of unsigned enum expression >= 0

Signed-off-by: David Goulet <dgoulet@efficios.com>
Conflicts:
src/common/ust-consumer/ust-consumer.c

10 years agoAdd libuuid as dependency in README
Zifei Tong [Mon, 25 Nov 2013 12:40:41 +0000 (20:40 +0800)] 
Add libuuid as dependency in README

Signed-off-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: implicit conversion of enum types in consumer
David Goulet [Mon, 25 Nov 2013 19:16:39 +0000 (14:16 -0500)] 
Fix: implicit conversion of enum types in consumer

This actually remove the use of LTTNG_ERR* code in the sessiond/consumer
protocol since it should NOT be used and some comparison of enum
(lttng_error_code vs lttcomm_return_code) were broken and dangerous.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Conflicts:
src/bin/lttng-sessiond/ust-consumer.c
src/common/kernel-consumer/kernel-consumer.c

10 years agoFix: implicit conversion of enum types in sessiond
David Goulet [Mon, 25 Nov 2013 20:06:13 +0000 (15:06 -0500)] 
Fix: implicit conversion of enum types in sessiond

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: comparison of unsigned value agains < 0
David Goulet [Mon, 25 Nov 2013 19:15:17 +0000 (14:15 -0500)] 
Fix: comparison of unsigned value agains < 0

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.3.1 v2.3.1
David Goulet [Wed, 13 Nov 2013 21:45:07 +0000 (16:45 -0500)] 
Update version to v2.3.1

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: typo in --sig-parent help
David Goulet [Tue, 12 Nov 2013 14:56:45 +0000 (09:56 -0500)] 
Fix: typo in --sig-parent help

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: application SIGBUS when starting in parallel with sessiond
David Goulet [Wed, 6 Nov 2013 15:49:43 +0000 (10:49 -0500)] 
Fix: application SIGBUS when starting in parallel with sessiond

There is a race between application startup and sessiond startup, where there
is an intermediate state where applications can SIGBUS if they see a zero-sized
shm, if the shm has been created, but not ftruncated yet.

On the sessiond side, we need to ensure that the shared memory is writeable by
applications as long as its size is 0, which allow applications to perform
ftruncate and extend its size.

On the UST side, another commit needs to ensure that UST can read the shared
memory file descriptor with a read() system call before they try accessing it
through a memory map (which triggers the SIGBUS if the access goes beyond the
file size)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing LTTNG_OK return value for snapshot
David Goulet [Mon, 4 Nov 2013 21:27:00 +0000 (16:27 -0500)] 
Fix: missing LTTNG_OK return value for snapshot

After a successful kernel snapshot, the ret = LTTNG_OK was missing thus
returning 0 to the caller which was expecting LTTNG_OK.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: arguments in the wrong order for fd-limit
David Goulet [Mon, 4 Nov 2013 18:19:06 +0000 (13:19 -0500)] 
Fix: arguments in the wrong order for fd-limit

This is related to a bug we've been seeing with a very HIGH load of
applications registering at the same time where the get/put counters get
out of sync. exhausting the fd pool quite rapidely even though there was
no fd leak.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: Some corrections to the lttng man page
Jérémie Galarneau [Wed, 23 Oct 2013 16:08:47 +0000 (12:08 -0400)] 
Fix: Some corrections to the lttng man page

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: recv creds comm should handle partial receive
David Goulet [Fri, 11 Oct 2013 20:02:13 +0000 (16:02 -0400)] 
Fix: recv creds comm should handle partial receive

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set app socket timeout just after accept()
David Goulet [Fri, 11 Oct 2013 18:59:45 +0000 (14:59 -0400)] 
Fix: set app socket timeout just after accept()

This is to make sure the socket has a timeout *before* doing any I/O
operations on it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix typo in lttng snapshot add-output example of lttng(1)
Christian Babeux [Wed, 25 Sep 2013 14:06:05 +0000 (10:06 -0400)] 
Fix typo in lttng snapshot add-output example of lttng(1)

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.3.0 v2.3.0
David Goulet [Wed, 4 Sep 2013 01:25:31 +0000 (21:25 -0400)] 
Update version to v2.3.0

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove periodical flush test from make check
David Goulet [Tue, 3 Sep 2013 21:50:34 +0000 (17:50 -0400)] 
Fix: remove periodical flush test from make check

This test is racy for the following reasons. It expects that the
subbuffer flush timer always produce a coherent trace after a period of
time but this cannot be guaranteed without the upcoming live feature.

A test based on time expectation is a bit flacky so disable it for now
until we have live tracing.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate version to v2.3.0-rc3 v2.3.0-rc3
David Goulet [Fri, 30 Aug 2013 19:09:39 +0000 (15:09 -0400)] 
Update version to v2.3.0-rc3

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: hashtable: take split_count_order into account
Mathieu Desnoyers [Fri, 30 Aug 2013 18:31:48 +0000 (14:31 -0400)] 
Fix: hashtable: take split_count_order into account

This makes check_resize() handle split-counters more precisely.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove wrong doing asserts in sessiond
David Goulet [Fri, 30 Aug 2013 14:04:16 +0000 (10:04 -0400)] 
Fix: remove wrong doing asserts in sessiond

Asserting on the fd and socket was wrong since the two fds can be set to
-1 concurrently when calling this function.

Fixes #624

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: fix periodical flush tests to stop app
David Goulet [Thu, 29 Aug 2013 21:48:47 +0000 (17:48 -0400)] 
Tests: fix periodical flush tests to stop app

The test now SIGSTOP the application before validating the trace and
once done, SIGKILL them. This way we make sure we test the periodical
flush feature by letting the application live, stopping it from creating
more events and validating the flush.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: correctly close metadata on sessiond thread shutdown
David Goulet [Thu, 29 Aug 2013 21:40:58 +0000 (17:40 -0400)] 
Fix: correctly close metadata on sessiond thread shutdown

Introduce a _close_metadata() function that does not take any locks so
it can be used by multiple call sites with different locking scheme.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: delete the trace directory used for the test
David Goulet [Thu, 29 Aug 2013 14:49:24 +0000 (10:49 -0400)] 
Fix: delete the trace directory used for the test

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove bad check after epoll wait in consumer
David Goulet [Thu, 29 Aug 2013 14:38:12 +0000 (10:38 -0400)] 
Fix: remove bad check after epoll wait in consumer

The returned nb_fd value is the number of FD ready for the requested I/O
so having and revents set to 0 is possible since not all fd are ready
thus making this check irrelevant and actually ressource consuming.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing data pending signess conversion
David Goulet [Thu, 29 Aug 2013 13:48:43 +0000 (09:48 -0400)] 
Fix: missing data pending signess conversion

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: consumer data pending for empty streams
Mathieu Desnoyers [Thu, 29 Aug 2013 02:47:20 +0000 (22:47 -0400)] 
Fix: consumer data pending for empty streams

We should at least output one packet before a stream can be considered
as readable. So far, for PID buffers, if an application exits at the
wrong timing before a stop waiting for data pending, empty streams could
be visible by a babeltrace executed after data pending incorrectly
returned false.

Fix it by considering a stream for which the consumerd has written 0
bytes to the output as having data pending.

This applies to 2.3-rc and stable-2.2.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: hash table growth (for small tables) should be limited (v2)
Mathieu Desnoyers [Tue, 27 Aug 2013 22:11:04 +0000 (18:11 -0400)] 
Fix: hash table growth (for small tables) should be limited (v2)

Buckets with many entries encountered in a hash table could cause it to
grow to a large size, beyond the scope for which this mechanism is
expected to play a role when node accounting is available. Indeed, when
the hash table grows to larger size, split-counter node accounting is
expected to deal with resize/shrink rather than relying on an heuristic
based on the largest bucket size.

This is fixing an issue where we see hash tables sometimes reaching 65k
entries index (65536*8 = 524288 bytes) for a workload limited to adding
1000 entries and then removing all of them, done in a loop (random
keys).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: run_as gid/uid test should return result to parent
Mathieu Desnoyers [Tue, 27 Aug 2013 20:24:55 +0000 (16:24 -0400)] 
Fix: run_as gid/uid test should return result to parent

Failure to do so could cause the parent to hang on read() waiting for
the return value from the child.

Targets: 2.3-rc and stable-2.2 branches.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: missing check for metadata data pending
David Goulet [Tue, 27 Aug 2013 21:30:51 +0000 (17:30 -0400)] 
Fix: missing check for metadata data pending

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: change buffers UID test to PID
David Goulet [Tue, 27 Aug 2013 21:30:45 +0000 (17:30 -0400)] 
Tests: change buffers UID test to PID

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: fix health tests to use custom socket timeout
David Goulet [Tue, 27 Aug 2013 20:12:39 +0000 (16:12 -0400)] 
Tests: fix health tests to use custom socket timeout

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove health test from fast regression
David Goulet [Tue, 27 Aug 2013 20:06:44 +0000 (16:06 -0400)] 
Fix: remove health test from fast regression

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse socket timeout value for tcp timeout if available
David Goulet [Tue, 27 Aug 2013 20:04:36 +0000 (16:04 -0400)] 
Use socket timeout value for tcp timeout if available

Make the inet subsystem initialize the tcp timeout value with the env.
variable LTTNG_NETWORK_SOCKET_TIMEOUT if available.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: set the health delta tcp timeout aware
David Goulet [Tue, 27 Aug 2013 19:23:18 +0000 (15:23 -0400)] 
Fix: set the health delta tcp timeout aware

The health check subsystem now initialized the time delta using the TCP
timeout. It takes the maximum value between our default internal delta
and the TCP timeout fetched by the lttcomm inet subsytem.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoGet the maximum TCP timeout in sessiond
David Goulet [Tue, 27 Aug 2013 19:11:40 +0000 (15:11 -0400)] 
Get the maximum TCP timeout in sessiond

This actually just open some /proc files when calling
lttcomm_init_inet() and computes the maximum value a TCP timeout for
every possible operations (send/recv/connect).

This is the first patch to fix the health check issue of having a
smaller delta than the TCP maximum possible timeout.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't report error if UST app dies
David Goulet [Tue, 27 Aug 2013 17:56:57 +0000 (13:56 -0400)] 
Fix: don't report error if UST app dies

An application dying unexpectedly is a normal behavior so the execution
must continue and not report an error when sending commands onto the
dying application.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: support VPATH build for tests
David Goulet [Mon, 26 Aug 2013 20:21:18 +0000 (16:21 -0400)] 
Fix: support VPATH build for tests

Fixes #613

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImprove comments after review
David Goulet [Mon, 26 Aug 2013 19:34:06 +0000 (15:34 -0400)] 
Improve comments after review

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoRename consumer socket fd to fd_ptr
David Goulet [Mon, 26 Aug 2013 19:18:44 +0000 (15:18 -0400)] 
Rename consumer socket fd to fd_ptr

By renaming this value, first the name as a better semantic and second
we are able to find every callsite that uses this variable thus making
sure we don't forget any assert or check made on it.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoLock consumer data before fd check during destroy
David Goulet [Mon, 26 Aug 2013 17:28:04 +0000 (13:28 -0400)] 
Lock consumer data before fd check during destroy

Also, a consumer state error is added just before update UST
applications on registration.

Fixes #595

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse single callsite for send/recv ops. for consumer in sessiond
David Goulet [Mon, 26 Aug 2013 17:11:39 +0000 (13:11 -0400)] 
Use single callsite for send/recv ops. for consumer in sessiond

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse consumer fd reference in consumer socket obj
David Goulet [Mon, 26 Aug 2013 16:26:10 +0000 (12:26 -0400)] 
Use consumer fd reference in consumer socket obj

This is done so we don't copy the fd value of the consumer thus having a
central control. This is part of a set of patches that makes the session
daemon stop sending command to an invalid consumer (dead, closed).

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate bash completion
Simon Marchi [Tue, 13 Aug 2013 20:26:24 +0000 (16:26 -0400)] 
Update bash completion

- Refactor options completion to remove a little bit of code
  duplication.
- Add subcommand completion for the snapshot command. It is not perfect,
  but it's a start.
- Add some comments to functions here and there.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd --list-commands option to the snapshot command
Simon Marchi [Tue, 13 Aug 2013 20:26:23 +0000 (16:26 -0400)] 
Add --list-commands option to the snapshot command

It lists snapshot sub-commands. This involves moving list_commands
to utils so that commands can use it.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoReorder functions _lttng_cmd_* functions in bash completion
Simon Marchi [Tue, 13 Aug 2013 20:26:22 +0000 (16:26 -0400)] 
Reorder functions _lttng_cmd_* functions in bash completion

Simply reorder them alphabetically to be consistent.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUse parse_size_suffix in snapshot
Simon Marchi [Tue, 13 Aug 2013 18:22:31 +0000 (14:22 -0400)] 
Use parse_size_suffix in snapshot

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: snapshot record error handling
David Goulet [Fri, 23 Aug 2013 19:00:36 +0000 (15:00 -0400)] 
Fix: snapshot record error handling

Fixes #617

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: improve error message when UST support is disabled
Mathieu Desnoyers [Thu, 22 Aug 2013 21:48:59 +0000 (17:48 -0400)] 
Fix: improve error message when UST support is disabled

Fixes #583

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: add missing short filter option in help
David Goulet [Thu, 22 Aug 2013 21:04:08 +0000 (17:04 -0400)] 
Fix: add missing short filter option in help

Fixes #587

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: typo in configure.ac for version check
David Goulet [Thu, 22 Aug 2013 20:59:21 +0000 (16:59 -0400)] 
Fix: typo in configure.ac for version check

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove calibrate syscall option from code
David Goulet [Thu, 22 Aug 2013 20:56:22 +0000 (16:56 -0400)] 
Fix: remove calibrate syscall option from code

Fixes #586

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: snapshot should fail if no successful snapshot is taken
Mathieu Desnoyers [Thu, 22 Aug 2013 20:46:58 +0000 (16:46 -0400)] 
Fix: snapshot should fail if no successful snapshot is taken

Fixes #606, #608

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: check UST float field mantissa length
Mathieu Desnoyers [Thu, 22 Aug 2013 20:05:58 +0000 (16:05 -0400)] 
Fix: check UST float field mantissa length

Fixes #473

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add UST context in the same order the user enabled them
David Goulet [Wed, 21 Aug 2013 16:04:02 +0000 (12:04 -0400)] 
Fix: add UST context in the same order the user enabled them

This is to avoid having different field order in different traces for
the same contexts enabled in the same order by the user.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoIntroduce configure --with-lttng-system-rundir
Mathieu Desnoyers [Mon, 19 Aug 2013 19:03:27 +0000 (15:03 -0400)] 
Introduce configure --with-lttng-system-rundir

Allow overriding the path where the system-wide sessiond keeps its
runtime files.

It does _not_ allow multiple instances of system-wide sessiond to run in
parallel though, because the wait shm files still requires having only
one single system-wide sessiond at any given time.

Fixes #521

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd .dirstamp to gitignore file
David Goulet [Mon, 19 Aug 2013 16:09:40 +0000 (12:09 -0400)] 
Add .dirstamp to gitignore file

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: snapshot with multiple UIDs
David Goulet [Mon, 19 Aug 2013 16:08:06 +0000 (12:08 -0400)] 
Fix: snapshot with multiple UIDs

This commit refs #615. Waiting on the confirmation of the author to
close it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoPrepare for automake deprecation of missing subdir-objects
Mathieu Desnoyers [Fri, 16 Aug 2013 21:35:38 +0000 (17:35 -0400)] 
Prepare for automake deprecation of missing subdir-objects

Ensure old and new automake will behave in the same way.

Fixes #594

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: typos in --help and manpage
Mathieu Desnoyers [Fri, 16 Aug 2013 21:18:12 +0000 (17:18 -0400)] 
Fix: typos in --help and manpage

Fixes #604

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: add-context without -c apply to all channels
Mathieu Desnoyers [Fri, 16 Aug 2013 21:10:52 +0000 (17:10 -0400)] 
Fix: add-context without -c apply to all channels

Fixes #618

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: channels can be _enabled_ after tracing is started, but not created
Mathieu Desnoyers [Fri, 16 Aug 2013 20:58:02 +0000 (16:58 -0400)] 
Fix: channels can be _enabled_ after tracing is started, but not created

Fixes #619

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix filter parser segmentation fault with bison 3.0
Zifei Tong [Fri, 16 Aug 2013 20:52:21 +0000 (16:52 -0400)] 
Fix filter parser segmentation fault with bison 3.0

Replace deprecated YYLEX_PARAM with %lex-param

Tested with bison 2.4, 2.5, 2.7 and 3.0.

Signed-off-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: typo in error msg
Mathieu Desnoyers [Fri, 16 Aug 2013 20:50:43 +0000 (16:50 -0400)] 
Fix: typo in error msg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: imprecise error message about root sessiond/tracing group
Mathieu Desnoyers [Fri, 16 Aug 2013 20:48:08 +0000 (16:48 -0400)] 
Fix: imprecise error message about root sessiond/tracing group

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: don't skip chmod if tracing group is not found
Mathieu Desnoyers [Fri, 16 Aug 2013 20:07:54 +0000 (16:07 -0400)] 
Fix: don't skip chmod if tracing group is not found

Fixes #620

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoTracepoint probes don't need extern C
Mathieu Desnoyers [Thu, 15 Aug 2013 18:11:16 +0000 (14:11 -0400)] 
Tracepoint probes don't need extern C

tracepoint.h has the proper extern C guards, so every liblttng-ust API
called from the probe has the proper linkage.

The rest of the symbols are only meaningful within the probe, so we
don't care if they are mangled or not.

This fixes all UST applications in tests/

Fixes #597

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: Snapshot should be taken asap in core handler script
Christian Babeux [Thu, 15 Aug 2013 17:03:36 +0000 (13:03 -0400)] 
Fix: Snapshot should be taken asap in core handler script

Taking a snapshot should be the first thing the core handler does.
An enormous core file write to disk could potentially discard a lot
of tracing data if done before the snapshot.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: reset out_fd_offset when we rotate the trace file
Julien Desfossez [Tue, 13 Aug 2013 21:40:28 +0000 (17:40 -0400)] 
Fix: reset out_fd_offset when we rotate the trace file

This value is only used for the sync_file_range, but it has to be set
to 0 when we start to write in a new trace file, otherwise the values
passed to this call are bogus.

Applied to 2.3, but could probably be backported to 2.2.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: LTTNG_ERR_NEED_ROOT_SESSIOND error message
Jérémie Galarneau [Wed, 7 Aug 2013 18:58:05 +0000 (14:58 -0400)] 
Fix: LTTNG_ERR_NEED_ROOT_SESSIOND error message

A root session daemon _and_ "tracing" group user membership are required
to trace the kernel.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoinet/inet6 sockets: apply timeout
Mathieu Desnoyers [Thu, 8 Aug 2013 09:02:30 +0000 (05:02 -0400)] 
inet/inet6 sockets: apply timeout

Close #546

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement timeout for connect ipv4/ipv6
Mathieu Desnoyers [Thu, 8 Aug 2013 09:01:53 +0000 (05:01 -0400)] 
Implement timeout for connect ipv4/ipv6

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.042669 seconds and 4 git commands to generate.