lttng-tools.git
8 years agoFix: big relayd cleanup and refactor
David Goulet [Wed, 22 Jan 2014 17:32:56 +0000 (12:32 -0500)] 
Fix: big relayd cleanup and refactor

Due to a number of race conditions between the live feature and the data
threads, we had to refactor the relayd which mostly splits the different
objects in their own files creating APIs for each of them.

That done, we are able to remove duplicate code, centralize code path
to help with cleanup and having a flow that makes more sense when
handling multiple objects.

This commits adds a lot of fixes with the live feature and cleanup code
path of a session since some objects are shared between threads like
ctf-trace and stream.

So yeah, this is quite a BIG commit and unfortunately this work was
essential in order to fix a lof of issues and have a way more
maintainable code base for the relayd.

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: code refactoring of viewer streams in relayd
David Goulet [Mon, 20 Jan 2014 17:24:26 +0000 (12:24 -0500)] 
Fix: code refactoring of viewer streams in relayd

This also renames the lttng-viewer.h to lttng-viewer-abi.h which
represents the live reading ABI.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: handle new streams in live mode in relayd
Julien Desfossez [Wed, 15 Jan 2014 15:32:44 +0000 (10:32 -0500)] 
Fix: handle new streams in live mode in relayd

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: notify the viewer if new streams got added
Julien Desfossez [Wed, 15 Jan 2014 16:54:38 +0000 (11:54 -0500)] 
Fix: notify the viewer if new streams got added

As soon as new streams are available, the viewer must start reading
them, otherwise we risk to ignore complete streams.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: send the streams sent message after metadata
Julien Desfossez [Wed, 15 Jan 2014 16:29:36 +0000 (11:29 -0500)] 
Fix: send the streams sent message after metadata

We now make sure that we only sent the streams_sent message to the relay
when all the streams (including the metadata) are sent.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoAdd extern C to the health-check header
Jérémie Galarneau [Thu, 6 Feb 2014 19:13:56 +0000 (14:13 -0500)] 
Add extern C to the health-check header

This makes it possible to include health.h in a C++ program.

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>
8 years agoFix: memory leak in unit test
David Goulet [Wed, 5 Feb 2014 16:48:48 +0000 (11:48 -0500)] 
Fix: memory leak in unit test

Fixes coverity issue #1128896

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoMan: add JUL DOMAIN section to lttng.1
David Goulet [Wed, 5 Feb 2014 16:44:16 +0000 (11:44 -0500)] 
Man: add JUL DOMAIN section to lttng.1

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: bad indentation of lttng list in man page
David Goulet [Tue, 4 Feb 2014 20:32:52 +0000 (15:32 -0500)] 
Fix: bad indentation of lttng list in man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: handle invalid URL passed to lttng_create_session_live
David Goulet [Tue, 4 Feb 2014 19:52:49 +0000 (14:52 -0500)] 
Fix: handle invalid URL passed to lttng_create_session_live

uri_parse_str_urls() returns 0 if the URL passed is NULL thus using
lttng_create_session_live() without an URL is invalid.

Reported-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: add --jul-tcp-port to sessiond man page
David Goulet [Tue, 4 Feb 2014 19:51:50 +0000 (14:51 -0500)] 
Fix: add --jul-tcp-port to sessiond man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 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>
8 years agoFix: remove free in unit test not needed anymore
Zifei Tong [Tue, 4 Feb 2014 18:55:11 +0000 (13:55 -0500)] 
Fix: remove free in unit test not needed anymore

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: relay create session for version before 2.4
Julien Desfossez [Mon, 27 Jan 2014 20:27:51 +0000 (15:27 -0500)] 
Fix: relay create session for version before 2.4

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: memory leak when UST events are enabled with exclusions
Jérémie Galarneau [Mon, 20 Jan 2014 17:51:12 +0000 (12:51 -0500)] 
Fix: memory leak when UST events are enabled with exclusions

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
8 years agohealth check tests: test relayd and consumerd
Mathieu Desnoyers [Mon, 27 Jan 2014 04:53:21 +0000 (23:53 -0500)] 
health check tests: test relayd and consumerd

- Cover relayd and consumerd,
- Add a test_thread_ok test (no issue found by test) to fast_regression,
- Merge duplicated code into test_health.sh.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agotests: Add stop_lttng_relayd_nocheck
Mathieu Desnoyers [Wed, 29 Jan 2014 15:47:37 +0000 (10:47 -0500)] 
tests: Add stop_lttng_relayd_nocheck

Used in cases where the relay daemon might not be running.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: add missing JUL loglevel handling
David Goulet [Fri, 24 Jan 2014 17:36:44 +0000 (12:36 -0500)] 
Fix: add missing JUL loglevel handling

JUL loglevels are directly mapped to the Level class from the JUL
interface. A complete listing has been added to the enable-event help
command and to the lttng.h ABI as lttng_loglevel_jul.

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agorelayd: add testpoints
Mathieu Desnoyers [Mon, 27 Jan 2014 04:51:55 +0000 (23:51 -0500)] 
relayd: add testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agorelayd: use same pipe for live and main
Mathieu Desnoyers [Mon, 27 Jan 2014 04:34:17 +0000 (23:34 -0500)] 
relayd: use same pipe for live and main

Don't use a duplicate of file descriptors. Ownership is easier to track
without a copy.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoCleanup relayd live comment
Mathieu Desnoyers [Mon, 27 Jan 2014 04:28:06 +0000 (23:28 -0500)] 
Cleanup relayd live comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 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>
8 years agoFix: relayd: notify parent of readiness when all threads ready
Mathieu Desnoyers [Mon, 27 Jan 2014 04:23:36 +0000 (23:23 -0500)] 
Fix: relayd: notify parent of readiness when all threads ready

- relayd start using daemonize common lib,
- wait for health check thread, listener and live listener threads to be
  ready before letting the parent know it is ready (in daemon and
  background modes).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: tests: start relayd in background mode (-b)
Mathieu Desnoyers [Mon, 27 Jan 2014 03:16:47 +0000 (22:16 -0500)] 
Fix: tests: start relayd in background mode (-b)

Ensure that relayd health check is ready to receive queries by starting
relayd in background mode with '-b' rather than putting it in background
by the shell (&).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agolttng-relayd: implement background cmd line option
Mathieu Desnoyers [Mon, 27 Jan 2014 04:09:41 +0000 (23:09 -0500)] 
lttng-relayd: implement background cmd line option

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agosessiond: add missing testpoints
Mathieu Desnoyers [Mon, 27 Jan 2014 04:01:06 +0000 (23:01 -0500)] 
sessiond: add missing testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agotests: use --background for session daemon
Mathieu Desnoyers [Mon, 27 Jan 2014 03:32:35 +0000 (22:32 -0500)] 
tests: use --background for session daemon

Will now show errors when they happen.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agosessiond: add --background argument
Mathieu Desnoyers [Mon, 27 Jan 2014 03:59:31 +0000 (22:59 -0500)] 
sessiond: add --background argument

Allow starting sessiond like --daemonize, but keeps console open.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoUse lib common daemonize
Mathieu Desnoyers [Mon, 27 Jan 2014 03:55:43 +0000 (22:55 -0500)] 
Use lib common daemonize

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: sessiond: wait for health check readiness
Mathieu Desnoyers [Mon, 27 Jan 2014 03:54:15 +0000 (22:54 -0500)] 
Fix: sessiond: wait for health check readiness

Wait for health check readiness before notifying the parent.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 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>
8 years agoConsumer: add testpoints
Mathieu Desnoyers [Mon, 27 Jan 2014 03:43:13 +0000 (22:43 -0500)] 
Consumer: add testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 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>
8 years agoCleanup: lttng-ctl-health comment
Mathieu Desnoyers [Mon, 27 Jan 2014 03:31:40 +0000 (22:31 -0500)] 
Cleanup: lttng-ctl-health comment

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd daemonize() to libcommon
Mathieu Desnoyers [Mon, 27 Jan 2014 03:23:09 +0000 (22:23 -0500)] 
Add daemonize() to libcommon

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: tests: wait for consumerd to complete
Mathieu Desnoyers [Mon, 27 Jan 2014 03:15:56 +0000 (22:15 -0500)] 
Fix: tests: wait for consumerd to complete

Wait for consumerd to complete when stopping sessiond.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: consumerd: use DBG rather than DBG2
Mathieu Desnoyers [Mon, 27 Jan 2014 03:11:55 +0000 (22:11 -0500)] 
Fix: consumerd: use DBG rather than DBG2

DBG2 is never visible.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: consumerd: only return readiness when health is ready
Mathieu Desnoyers [Mon, 27 Jan 2014 03:10:34 +0000 (22:10 -0500)] 
Fix: consumerd: only return readiness when health is ready

Wait for health check to be ready before returning readiness to session
daemon.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 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>
8 years agoFix health check: signal parent before exit testpoint
Mathieu Desnoyers [Thu, 23 Jan 2014 03:14:59 +0000 (22:14 -0500)] 
Fix health check: signal parent before exit testpoint

We need to signal parent for readiness before hitting the thread exit
testpoint, otherwise we hang the test.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoTest health: add test_thread_ok
Mathieu Desnoyers [Wed, 22 Jan 2014 20:24:33 +0000 (15:24 -0500)] 
Test health: add test_thread_ok

Tests sessiond, consumerd (UST+kernel) and relayd health "ok" case in
simple scenarios.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agohealth check: change --relayd-path arg to --relayd-path=arg
Mathieu Desnoyers [Wed, 22 Jan 2014 19:48:28 +0000 (14:48 -0500)] 
health check: change --relayd-path arg to --relayd-path=arg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agorelayd: add LTTNG_RELAYD_HEALTH env var
Mathieu Desnoyers [Wed, 22 Jan 2014 19:48:07 +0000 (14:48 -0500)] 
relayd: add LTTNG_RELAYD_HEALTH env var

Allow override of path leading to health check named pipe.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoAdd sessiond/SESSIOND_ prefix to sessiond testpoints
Mathieu Desnoyers [Wed, 13 Nov 2013 21:40:53 +0000 (16:40 -0500)] 
Add sessiond/SESSIOND_ prefix to sessiond testpoints

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 years agoFix: zero out data structure before using it
David Goulet [Wed, 15 Jan 2014 20:30:47 +0000 (15:30 -0500)] 
Fix: zero out data structure before using it

Fixes #716

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: delete metadata stream before destroying it
Julien Desfossez [Tue, 14 Jan 2014 20:47:10 +0000 (15:47 -0500)] 
Fix: delete metadata stream before destroying it

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
8 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>
8 years agoFix: metadata stream should be always flagged as ready
Julien Desfossez [Fri, 10 Jan 2014 16:45:53 +0000 (11:45 -0500)] 
Fix: metadata stream should be always flagged as ready

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: wrong check before destroying the viewer metadata stream
Julien Desfossez [Mon, 13 Jan 2014 16:28:07 +0000 (11:28 -0500)] 
Fix: wrong check before destroying the viewer metadata stream

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: race with the viewer and readiness of streams
Julien Desfossez [Thu, 9 Jan 2014 17:15:26 +0000 (12:15 -0500)] 
Fix: race with the viewer and readiness of streams

Add a message to inform the relayd that all the streams of a certain
channels were sent so it can make them available to the viewer. This
fixes a race where the viewer could start reading some streams before
having received them all.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 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>
8 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>
8 years agoFix: relayd cmd line option for live port
Anik Mishra [Tue, 7 Jan 2014 21:11:28 +0000 (16:11 -0500)] 
Fix: relayd cmd line option for live port

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 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>
8 years agoPython: add create_snapshot
Mathieu Desnoyers [Wed, 18 Dec 2013 14:48:23 +0000 (09:48 -0500)] 
Python: add create_snapshot

Also fix documentation of create/destroy.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoLoad relay daemon options from configuration file
Jérémie Galarneau [Mon, 16 Dec 2013 05:47:50 +0000 (00:47 -0500)] 
Load relay daemon options from configuration file

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoLoad session daemon options from configuration file
Jérémie Galarneau [Mon, 16 Dec 2013 22:13:15 +0000 (17:13 -0500)] 
Load session daemon options from configuration file

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoAdd utils_generate_optstring() to libcommon
Jérémie Galarneau [Mon, 16 Dec 2013 22:15:04 +0000 (17:15 -0500)] 
Add utils_generate_optstring() to libcommon

This function generates the optstring argument exepected by getopt_long
from a NULL-terminated struct option array.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoAdd libconfig implementation and tests
Jérémie Galarneau [Sat, 14 Dec 2013 06:01:29 +0000 (01:01 -0500)] 
Add libconfig implementation and tests

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoAdd code from the inih library under libconfig
Jérémie Galarneau [Thu, 5 Dec 2013 22:45:24 +0000 (17:45 -0500)] 
Add code from the inih library under libconfig

This code is under BSD license. The ini.h/.c reference contains the
license and copyright.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoAdd daemon and session configuration save/restore RFC
Jérémie Galarneau [Thu, 5 Dec 2013 19:52:31 +0000 (14:52 -0500)] 
Add daemon and session configuration save/restore RFC

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 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>
8 years agoFix: clear the CTF traces when all the streams are closed
Julien Desfossez [Thu, 12 Dec 2013 21:37:03 +0000 (16:37 -0500)] 
Fix: clear the CTF traces when all the streams are closed

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoUpdate version to v2.4.0-rc2 v2.4.0-rc2
David Goulet [Tue, 10 Dec 2013 19:20:27 +0000 (14:20 -0500)] 
Update version to v2.4.0-rc2

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: add missing file for dist tarball
David Goulet [Tue, 10 Dec 2013 19:25:41 +0000 (14:25 -0500)] 
Fix: add missing file for dist tarball

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: close connection on incompatible version check
Julien Desfossez [Tue, 10 Dec 2013 16:18:31 +0000 (11:18 -0500)] 
Fix: close connection on incompatible version check

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: fields alignements in live protocol
Julien Desfossez [Tue, 10 Dec 2013 16:18:30 +0000 (11:18 -0500)] 
Fix: fields alignements in live protocol

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoTests: add regression test for Java JUL support
David Goulet [Tue, 10 Dec 2013 18:13:23 +0000 (13:13 -0500)] 
Tests: add regression test for Java JUL support

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: possible use after free
David Goulet [Thu, 5 Dec 2013 22:05:40 +0000 (17:05 -0500)] 
Fix: possible use after free

Fixes coverity issue 1135328 and 1135329

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: remove unused code in session daemon
David Goulet [Tue, 3 Dec 2013 19:33:24 +0000 (14:33 -0500)] 
Fix: remove unused code in session daemon

This also removes unused data structure in an unit test.

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: string format with unsigned value
David Goulet [Tue, 3 Dec 2013 16:54:00 +0000 (11:54 -0500)] 
Fix: string format with unsigned value

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 years agoFix: remove useless assert
David Goulet [Tue, 3 Dec 2013 16:45:44 +0000 (11:45 -0500)] 
Fix: remove useless assert

Signed-off-by: David Goulet <dgoulet@efficios.com>
8 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 years agoTests: fix racy tests and misleading output messages
David Goulet [Thu, 28 Nov 2013 19:48:59 +0000 (14:48 -0500)] 
Tests: fix racy tests and misleading output messages

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTests: fix bad argument parsing in test app
David Goulet [Thu, 28 Nov 2013 19:47:50 +0000 (14:47 -0500)] 
Tests: fix bad argument parsing in test app

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: remove assert on fd in the read/write layer
David Goulet [Thu, 28 Nov 2013 18:25:25 +0000 (13:25 -0500)] 
Fix: remove assert on fd in the read/write layer

It is possible that an invalid fd is passed to read or write. This can
happen for instance if the endpoint of the transport (ex: relayd) dies
out while actively trying to send data. It is OK to let an invalid fd
where the syscall will return the right value along with errno being
populated with the corresponding code.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: missing lock/unlock when sending index
David Goulet [Thu, 28 Nov 2013 18:22:26 +0000 (13:22 -0500)] 
Fix: missing lock/unlock when sending index

This was creating out of order messages between the relayd and the
consumer leading to undesired behaviour for the tracing session being
streamed.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 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>
9 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>
9 years agoRename LTTng index in CTF index
Julien Desfossez [Mon, 25 Nov 2013 20:32:38 +0000 (15:32 -0500)] 
Rename LTTng index in CTF index

Also the magic becomes a uint32_t instead of 6 chars for more aligned
reads.

Apart from the CTF magic changes, this patch only renames stuff so no
behaviour is changed.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoFix: set the enable all event command type
David Goulet [Tue, 26 Nov 2013 15:10:20 +0000 (10:10 -0500)] 
Fix: set the enable all event command type

This was removed by mistake with the exclusion patch set.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 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>
9 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>
9 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>
9 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>
9 years agoFix: create a fast and a long UST snapshot test
David Goulet [Mon, 25 Nov 2013 19:55:57 +0000 (14:55 -0500)] 
Fix: create a fast and a long UST snapshot test

The fast one does 10 snapshots where the long one keeps the 1000
original value. The make check only executes the fast one.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTests: fix racy UST snapshot post mortem test
David Goulet [Mon, 25 Nov 2013 17:56:03 +0000 (12:56 -0500)] 
Tests: fix racy UST snapshot post mortem test

Fixes #666

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTests: remove useless sleep when spawning sessiond
David Goulet [Mon, 25 Nov 2013 16:33:59 +0000 (11:33 -0500)] 
Tests: remove useless sleep when spawning sessiond

The new daemonize scheme returns to the parent only when the session
daemon is ready to operate thus the sleep that was used to wait for the
session deamon to bootstrap is no longer needed.

Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd travis-ci configuration file
David Goulet [Mon, 25 Nov 2013 18:14:55 +0000 (13:14 -0500)] 
Add travis-ci configuration file

Contributed-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 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>
9 years agoTests: add valid test cases to test_utils_expand_path
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:28 +0000 (17:32 -0500)] 
Tests: add valid test cases to test_utils_expand_path

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoTests: add symlink tests for test_utils_expand_path
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:27 +0000 (17:32 -0500)] 
Tests: add symlink tests for test_utils_expand_path

These new test cases allows to test the utils_expand_path
function with an existing tree using symlinks. It allows
to verify the right behavior of the function in complex
situation.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
9 years agoFix: utils_expand_path now works for paths that ends with '/.' or '/..'
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:26 +0000 (17:32 -0500)] 
Fix: utils_expand_path now works for paths that ends with '/.' or '/..'

Cases where the path given ended with '/.' or '/..' were not handled
properly using the utils_expand_path function and the resulting path
was still showing this end part. This fix aims to treat that last
part and 'expand' it as expected.

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
9 years agoFix: comment indentation
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:25 +0000 (17:32 -0500)] 
Fix: comment indentation

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
9 years agoAdd missing copyright to utils.c
Raphaël Beamonte [Sat, 23 Nov 2013 22:32:24 +0000 (17:32 -0500)] 
Add missing copyright to utils.c

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.040657 seconds and 4 git commands to generate.