Fix: only create UST metadata on start trace

Fixes #739

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Update changelog with stable 2.3 and 2.4 branch

Signed-off-by: David Goulet <dgoulet@efficios.com>
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>
Fix: lttng list -u <name> should only list UST

Fixes #654

Signed-off-by: David Goulet <dgoulet@efficios.com>
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>
Fix: add missing relayd option to man page

Fixes #706

Signed-off-by: David Goulet <dgoulet@efficios.com>
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>
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>
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>
Fix: format + PACKAGE_URL for dynamic printing

Signed-off-by: David Goulet <dgoulet@efficios.com>
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>
Fix: add some sane default values to --live opt

The lttng create --live now takes optional arguments meaning if no USEC
or/and -U are found, some defaults value are used.

Fixes #738

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: Warn user if JUL port is already being used

Fixes #740

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: minor rephrasing of the lttng.1 man page

Fixes #730

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: add loglevel type to lttng list <name>

For range loglevel, the <= is used and for single ==. For instance:

ev_log_range (loglevel <= TRACE_WARNING (4)) (type: tracepoint)
ev_log_single (loglevel == TRACE_NOTICE (5)) (type: tracepoint)

Fixes #628

Signed-off-by: David Goulet <dgoulet@efficios.com>
Tests fix: Missing waitpid in fork test

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: keep metadata channel attr in UST session

This is so that if we have NO application we can use the metadata
channel attributes once one appears.

Signed-off-by: David Goulet <dgoulet@efficios.com>
Test fix: use temp file sync. of test app

Fixes #736

Signed-off-by: David Goulet <dgoulet@efficios.com>
Fix: handle the registration done command for JUL

Lockstep with lttng-ust.

Part of the fix for issue #692

Signed-off-by: David Goulet <dgoulet@efficios.com>
Revert "Fix: format + PACKAGE_URL for dynamic printing"

This changes the lttng version output considered as a stable ABI in RC
cycle. This will apply to 2.5.

This reverts commit 9afbd878f072d5e0577811acf1d3340f65cf2e26.