lttng-tools.git
10 years agoMerge branch 'master' into memleak-finder memleak-finder
David Goulet [Thu, 24 Oct 2013 14:23:34 +0000 (10:23 -0400)] 
Merge branch 'master' into memleak-finder

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: use after free in jul_list_events
David Goulet [Thu, 17 Oct 2013 19:39:44 +0000 (15:39 -0400)] 
Fix: use after free in jul_list_events

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: memory leak in error path in JUL list
David Goulet [Wed, 16 Oct 2013 19:42:52 +0000 (15:42 -0400)] 
Fix: memory leak in error path in JUL list

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: JUL domain support with --disable-lttng-ust
David Goulet [Wed, 16 Oct 2013 15:41:36 +0000 (11:41 -0400)] 
Fix: JUL domain support with --disable-lttng-ust

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd lttng list -j command to list possible events
David Goulet [Thu, 3 Oct 2013 19:20:07 +0000 (15:20 -0400)] 
Add lttng list -j command to list possible events

For the JUL domain, add the -j/--jul support for lttng list.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd jul-app ABI/API and handle registration
David Goulet [Tue, 1 Oct 2013 18:22:22 +0000 (14:22 -0400)] 
Add jul-app ABI/API and handle registration

Registration is done in the jul thread and the created jul-app are
attached to existing UST app.

At this stage, there is no need for the UST app to be linked to the JUL
app but in the future, by adding new features, this will be needed.

Enable/Disable one or all events are supported. Also, once a JUL
application registers, it's updated with the already enabled events.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd JUL registration thread
David Goulet [Mon, 30 Sep 2013 21:28:16 +0000 (17:28 -0400)] 
Add JUL registration thread

Listening on port 5345 by default and adds the --jul-tcp-port option to
the session daemon command line options.

At this commit, the thread is started and listening for incoming
registration but they are not handled.

This commit adds a new thread to the session daemon that is spawned by
default once the launched.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd jul.c/.h to sessiond code
David Goulet [Mon, 30 Sep 2013 19:06:27 +0000 (15:06 -0400)] 
Add jul.c/.h to sessiond code

This adds data structures to handle the JUL domain. The domain is added
to a ust session and created/destroyed in the trace-ust.c API.

Nothing is working yet, just putting the piece together.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd -j/--jul to lttng UI and ABI
David Goulet [Mon, 30 Sep 2013 16:23:16 +0000 (12:23 -0400)] 
Add -j/--jul to lttng UI and ABI

The JUL domain is set as unsupported in the session daemon so only the
client side is implemented with help updated.

Again, on the session daemon side, this is set as unsupported.

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 agoAdd --live to lttng.1 man page
David Goulet [Thu, 10 Oct 2013 18:41:46 +0000 (14:41 -0400)] 
Add --live to lttng.1 man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: put ctf trace ht ref. inside stream
David Goulet [Thu, 10 Oct 2013 16:24:43 +0000 (12:24 -0400)] 
Fix: put ctf trace ht ref. inside stream

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove relative include for health check
David Goulet [Wed, 9 Oct 2013 20:50:29 +0000 (16:50 -0400)] 
Fix: remove relative include for health check

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDeprecate lttng-health-check.3 man page
David Goulet [Wed, 9 Oct 2013 20:44:36 +0000 (16:44 -0400)] 
Deprecate lttng-health-check.3 man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoUpdate health check regression tests
Mathieu Desnoyers [Wed, 9 Oct 2013 18:32:31 +0000 (14:32 -0400)] 
Update health check regression tests

Update to new health_check program output.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agotests: health check: OK if consumerd is not running
Mathieu Desnoyers [Wed, 9 Oct 2013 18:06:18 +0000 (14:06 -0400)] 
tests: health check: OK if consumerd is not running

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: consumerd/relayd health paths
Mathieu Desnoyers [Wed, 9 Oct 2013 18:00:13 +0000 (14:00 -0400)] 
Fix: consumerd/relayd health paths

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoUnlink rundir files individually
Mathieu Desnoyers [Wed, 9 Oct 2013 17:50:34 +0000 (13:50 -0400)] 
Unlink rundir files individually

Cannot use rm -rf anymore since relayd now need to have the lttng rundir
available beyond the lifetime of sessiond.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: join live threads after joining others
Mathieu Desnoyers [Wed, 9 Oct 2013 15:57:26 +0000 (11:57 -0400)] 
Fix: join live threads after joining others

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd health thread to relayd
Mathieu Desnoyers [Wed, 9 Oct 2013 14:21:14 +0000 (10:21 -0400)] 
Add health thread to relayd

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agohealth consumerd: add missing extern
Mathieu Desnoyers [Wed, 9 Oct 2013 13:46:40 +0000 (09:46 -0400)] 
health consumerd: add missing extern

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agolttng ctl health: add string description of relayd live threads
Mathieu Desnoyers [Wed, 9 Oct 2013 13:38:37 +0000 (09:38 -0400)] 
lttng ctl health: add string description of relayd live threads

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agorelayd: add health check support for live threads
Mathieu Desnoyers [Wed, 9 Oct 2013 13:36:56 +0000 (09:36 -0400)] 
relayd: add health check support for live threads

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoHealth check test: add relayd check support
Mathieu Desnoyers [Sat, 5 Oct 2013 00:53:55 +0000 (20:53 -0400)] 
Health check test: add relayd check support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoHealth check: implement health check query in sessiond and consumerd
Mathieu Desnoyers [Sat, 5 Oct 2013 00:15:19 +0000 (20:15 -0400)] 
Health check: implement health check query in sessiond and consumerd

At this stage, tests/regression/tools/health/health_check queries
sessiond and consumerd with the new API, however, the scripts using this
program have not yet been changed, and are therefore expected to fail.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agohealth check API
Mathieu Desnoyers [Mon, 30 Sep 2013 21:34:19 +0000 (17:34 -0400)] 
health check API

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement consumer health check thread
Mathieu Desnoyers [Tue, 24 Sep 2013 18:35:42 +0000 (14:35 -0400)] 
Implement consumer health check thread

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoMove health comm to health-internal.h
Mathieu Desnoyers [Tue, 24 Sep 2013 16:20:41 +0000 (12:20 -0400)] 
Move health comm to health-internal.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoconsumerd: add health instrumentation into threads
Mathieu Desnoyers [Mon, 16 Sep 2013 22:54:42 +0000 (17:54 -0500)] 
consumerd: add health instrumentation into threads

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoconsumerd: register threads to health monitoring
Mathieu Desnoyers [Mon, 16 Sep 2013 22:44:22 +0000 (17:44 -0500)] 
consumerd: register threads to health monitoring

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agorelayd: add health instrumentation to threads
Mathieu Desnoyers [Mon, 16 Sep 2013 14:47:16 +0000 (09:47 -0500)] 
relayd: add health instrumentation to threads

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agorelayd: register threads to health monitoring
Mathieu Desnoyers [Mon, 16 Sep 2013 14:30:34 +0000 (09:30 -0500)] 
relayd: register threads to health monitoring

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoMove health into its own common/ static library
Mathieu Desnoyers [Sun, 15 Sep 2013 22:03:24 +0000 (17:03 -0500)] 
Move health into its own common/ static library

- Introduce lttng/health-internal.h (not installed)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoTurn health.h/health.c into a library
Mathieu Desnoyers [Sun, 15 Sep 2013 21:52:54 +0000 (16:52 -0500)] 
Turn health.h/health.c into a library

All app-specific state is now in an object: struct health_app.

This moves the per-application enumeration into health-sessiond.h (for
sessiond).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup: health.h
Mathieu Desnoyers [Sun, 15 Sep 2013 20:07:58 +0000 (15:07 -0500)] 
Cleanup: health.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: sessiond poll thread normal error path should return 0
Mathieu Desnoyers [Tue, 24 Sep 2013 18:35:59 +0000 (14:35 -0400)] 
Fix: sessiond poll thread normal error path should return 0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: relayd: incorrectly placed exit labels
Mathieu Desnoyers [Mon, 16 Sep 2013 13:33:15 +0000 (08:33 -0500)] 
Fix: relayd: incorrectly placed exit labels

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: add missing pthread_join in sessiond
Mathieu Desnoyers [Mon, 16 Sep 2013 13:31:28 +0000 (08:31 -0500)] 
Fix: add missing pthread_join in sessiond

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: set_health_socket_path() as tracing group
Mathieu Desnoyers [Sun, 15 Sep 2013 22:35:34 +0000 (17:35 -0500)] 
Fix: set_health_socket_path() as tracing group

liblttng-ctl running as tracing group should talk to root sessiond, not
per-user sessiond (missing return 0 there). Take care of cleaning up
this function while we are there (the if (uid && is_tracing) {} if
(!uid) {} are misleading).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix: add missing pthread_join in sessiond
David Goulet [Mon, 30 Sep 2013 20:24:48 +0000 (16:24 -0400)] 
Fix: add missing pthread_join in sessiond

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: session's hostname wrongly assigned
David Goulet [Mon, 30 Sep 2013 17:19:01 +0000 (13:19 -0400)] 
Fix: session's hostname wrongly assigned

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove bad UST header in consumer-timer.c
David Goulet [Mon, 30 Sep 2013 15:19:13 +0000 (11:19 -0400)] 
Fix: remove bad UST header in consumer-timer.c

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use global thread quit pipe in live
David Goulet [Fri, 27 Sep 2013 22:05:17 +0000 (18:05 -0400)] 
Fix: use global thread quit pipe in live

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: use session id when deleting viewer streams
David Goulet [Fri, 27 Sep 2013 21:41:42 +0000 (17:41 -0400)] 
Fix: use session id when deleting viewer streams

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: remove debug error message
David Goulet [Fri, 27 Sep 2013 20:35:22 +0000 (16:35 -0400)] 
Fix: remove debug error message

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoDocumentation of live usage and protocol
Julien Desfossez [Fri, 27 Sep 2013 20:28:40 +0000 (16:28 -0400)] 
Documentation of live usage and protocol

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
10 years agoRelicense lttng-index and lttng-viewer to BSD
Julien Desfossez [Thu, 12 Sep 2013 20:05:50 +0000 (16:05 -0400)] 
Relicense lttng-index and lttng-viewer to BSD

Signed-off-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
10 years agoFix: add missing break in switch for relayd create session
David Goulet [Fri, 27 Sep 2013 19:46:59 +0000 (15:46 -0400)] 
Fix: add missing break in switch for relayd create session

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: don't create index on snapshot
David Goulet [Fri, 27 Sep 2013 19:46:13 +0000 (15:46 -0400)] 
Fix: don't create index on snapshot

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: add index destruction in destroy stream call
David Goulet [Fri, 27 Sep 2013 19:18:13 +0000 (15:18 -0400)] 
Fix: add index destruction in destroy stream call

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: make indexes HT global for real
David Goulet [Fri, 27 Sep 2013 18:54:03 +0000 (14:54 -0400)] 
Fix: make indexes HT global for real

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: rename close_stream and use it in delete session
David Goulet [Fri, 27 Sep 2013 18:48:57 +0000 (14:48 -0400)] 
Fix: rename close_stream and use it in delete session

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: assign values to relayd connection type enum
David Goulet [Fri, 27 Sep 2013 18:40:19 +0000 (14:40 -0400)] 
Fix: assign values to relayd connection type enum

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoMake viewer streams HT global
David Goulet [Fri, 27 Sep 2013 18:35:27 +0000 (14:35 -0400)] 
Make viewer streams HT global

This hash table is meant to be global by design thus making it globally
accessible in the relayd so we don't pass it around in every function
call.

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: compile without UST support
David Goulet [Fri, 27 Sep 2013 18:20:51 +0000 (14:20 -0400)] 
Fix: compile without UST support

Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTest for new metadata at each packet
Julien Desfossez [Thu, 12 Sep 2013 15:04:22 +0000 (11:04 -0400)] 
Test for new metadata at each packet

After sending each data packet in live, we need to check if new metadata
is available before sending the index informing the viewer it can read
the trace.

Since the data and the metadata are handled by two different threads,
this patch introduces a rendez-vous point: if new metadata is available,
the data thread flushes the metadata stream and waits on a conditionnal
variable. When the metadata thread finishes to send its data, it wakes
up the data thread which can send its index.

That way, the viewer is informed new metadata is available before
attempting to read a packet that might require an update of the
metadata.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoImplement the relayd live features
Julien Desfossez [Sun, 28 Jul 2013 22:57:41 +0000 (18:57 -0400)] 
Implement the relayd live features

The live-reading feature allows a user to read the trace while it is
being recorded. In order to work, this feature requires the trace to be
streamed to lttng-relayd. Then, a viewer can connect to the relayd, list
the sessions, attach to one, and start reading the data. The
live-reading protocol, enforces the viewer to read all the metadata
before trying to read the trace, and checks all the streams for new
activity at a user-defined rate (configured by the new --live parameter
during the session creation).

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoFix: return -errno value on error in run_as mkdir
David Goulet [Mon, 16 Sep 2013 18:01:06 +0000 (14:01 -0400)] 
Fix: return -errno value on error in run_as mkdir

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
10 years agoSend indexes in streaming mode
Julien Desfossez [Mon, 19 Aug 2013 15:35:43 +0000 (11:35 -0400)] 
Send indexes in streaming mode

To write an index on disk, we need to know all the fields sent by the
RELAY_SEND_INDEX command as well as the offset of the data in the
tracefile.

Since the control and data connection are not synchronized, this process
happens in two separate steps synchronized by an HT indexed by the
index_handle and the net_seq_num.

When we receive data and when we receive an index, we lookup in the HT
if an entry already exists. If it does, it means that we only need to
fill the fields we just received and write the index on disk, otherwise,
we allocate a new index, set the fields we know and store it in the HT.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoHT support for keys with two uint64_t
Julien Desfossez [Mon, 19 Aug 2013 15:35:42 +0000 (11:35 -0400)] 
HT support for keys with two uint64_t

Add the support in the hashtable abstraction layer to handle a key
composed of a two uint64_t.

The hash function is a simple XOR between the two hashes and the compare
function resolves the eventual collisions by comparing the two values.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoLive timer set up
Julien Desfossez [Sun, 28 Jul 2013 22:03:47 +0000 (18:03 -0400)] 
Live timer set up

Add a new option to create to enable the live_timer being --live at
session creation. A new API call is added also to create as session in
live mode like the snapshot feature.

This timer is responsible to check all streams of a live session and
make sure the viewer receives periodic updates even for low-throughput
channels.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoBump version to 2.4.0-pre1
Julien Desfossez [Mon, 5 Aug 2013 19:48:15 +0000 (15:48 -0400)] 
Bump version to 2.4.0-pre1

We need to bump the version early in the development cycle since we
extend the relayd protocol.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoGenerate local kernel and UST indexes
Julien Desfossez [Thu, 8 Aug 2013 20:54:48 +0000 (16:54 -0400)] 
Generate local kernel and UST indexes

When the consumer creates a new trace file, it now creates as well an
index file that the viewers can use to navigate in the trace.  For now
these indexes are only local and not sent to the relayd.

This patch requires additionnal ioctl and ustctl calls implemented in
lttng-modules and lttng-ust in 2.4.

For now, no indexes are sent over the network and no indexes are
generated on snaphots.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd support for non unique add string in hashtable
Julien Desfossez [Wed, 28 Aug 2013 18:03:16 +0000 (14:03 -0400)] 
Add support for non unique add string in hashtable

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
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 agoTests: Add UST snapshots streaming test with custom URI
Christian Babeux [Mon, 9 Sep 2013 22:10:40 +0000 (18:10 -0400)] 
Tests: Add UST snapshots streaming test with custom URI

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoTests: Add UST snapshots list output and max-size tests
Christian Babeux [Mon, 9 Sep 2013 22:09:38 +0000 (18:09 -0400)] 
Tests: Add UST snapshots list output and max-size tests

Add two new tests to the UST snapshots tests:

test_ust_list_output:
Add/remove named outputs and validate with the list output command.

test_ust_local_snapshot_max_size:
Take a UST snapshot with max-size limits and validate that they are respected.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoEnable support for installcheck.
Stefan Seefeld [Thu, 12 Sep 2013 00:37:41 +0000 (20:37 -0400)] 
Enable support for installcheck.

Enable execution of tests via `make installcheck`, i.e. against a fully
installed
LTTng.

The patch simply adds the same rule to the installcheck target that is
used for check.  Testing with an OpenEmbedded build shows the unit_tests
suite to work fine, while the fast_regression suite contains many
failures not present when run as `make check`.

Stefan Seefeld (1):
  Enable support for installcheck.

Signed-off-by: Stefan Seefeld <stefan_seefeld@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
10 years agoAdd original snapshot proposal to documentation
David Goulet [Wed, 11 Sep 2013 15:08:51 +0000 (11:08 -0400)] 
Add original snapshot proposal to documentation

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>
This page took 0.04103 seconds and 4 git commands to generate.