lttng-tools.git
11 years agoRevert adding LTTNG_PACKED in lttng.h
David Goulet [Fri, 14 Dec 2012 15:28:31 +0000 (10:28 -0500)] 
Revert adding LTTNG_PACKED in lttng.h

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: cleanup high_throughput_limits test
David Goulet [Fri, 14 Dec 2012 14:47:21 +0000 (09:47 -0500)] 
Fix: cleanup high_throughput_limits test

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: set started flag of ust app after ustctl
David Goulet [Fri, 14 Dec 2012 01:40:53 +0000 (20:40 -0500)] 
Fix: set started flag of ust app after ustctl

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: memory leak in add relayd socket error path
David Goulet [Fri, 14 Dec 2012 01:30:50 +0000 (20:30 -0500)] 
Fix: memory leak in add relayd socket error path

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMove relay commands out of lttcomm_sessiond_command
Julien Desfossez [Fri, 14 Dec 2012 01:01:52 +0000 (20:01 -0500)] 
Move relay commands out of lttcomm_sessiond_command

Introduce a new enum for relayd commands: lttcomm_relayd_command. This
will make further additions to either enum cleaner.

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Add health check testpoint fail test
Christian Babeux [Thu, 13 Dec 2012 23:39:13 +0000 (18:39 -0500)] 
Tests: Add health check testpoint fail test

This test trigger a failure in a specified thread by using the testpoint
mechanism. The testpoints behavior is implemented in health_fail.c. The
testpoint code simply return 1 (non-zero values are considered as errors
for testpoints) to trigger the specific thread error handling mechanism.

This test ensure that we can detect health failure for each thread error
handling paths.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd return code to the testpoint mechanism
Christian Babeux [Thu, 13 Dec 2012 23:38:56 +0000 (18:38 -0500)] 
Add return code to the testpoint mechanism

The testpoint processing could fail and currently there is no mechanism
to notify the caller of such failures. This patch adds an int return
code to the testpoint prototype. Non-zero return code indicate failure.

When using the testpoint mechanism, the caller should properly handle
testpoint failure cases and trigger the appropriate response (error
handling, thread teardown, etc.).

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: put back the high-throughput test removed by mistake
David Goulet [Thu, 13 Dec 2012 23:27:23 +0000 (18:27 -0500)] 
Fix: put back the high-throughput test removed by mistake

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Bad error handling when enable channel fails
David Goulet [Thu, 13 Dec 2012 23:15:56 +0000 (18:15 -0500)] 
Fix: Bad error handling when enable channel fails

Fixes #403

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoTests: Fix sleep interruption in health stall test
Christian Babeux [Mon, 10 Dec 2012 19:46:15 +0000 (14:46 -0500)] 
Tests: Fix sleep interruption in health stall test

The sleep(3) call can return the number of seconds left to sleep if
interrupted. Handle the intteruption in the health stall test.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: RCU unlock out of error path
David Goulet [Thu, 13 Dec 2012 22:51:45 +0000 (17:51 -0500)] 
Fix: RCU unlock out of error path

On channel error, RCU was not unlocking the read side. Furthermore,
remove a check for a NULL session that was also not going through an RCU
unlock. Change it to an assert.

This also adds a channel subbuf size check when enabling a channel.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: update file listing for licensing
David Goulet [Thu, 13 Dec 2012 22:30:40 +0000 (17:30 -0500)] 
Fix: update file listing for licensing

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: missing health exit in registration app thread
David Goulet [Thu, 13 Dec 2012 21:55:08 +0000 (16:55 -0500)] 
Fix: missing health exit in registration app thread

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: add packed attribute to filter structure
David Goulet [Thu, 13 Dec 2012 21:41:57 +0000 (16:41 -0500)] 
Fix: add packed attribute to filter structure

Also fix the internal UST abi by swapping two variables and fit the
upstream UST abi.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Add missing health code update for consumer command
David Goulet [Thu, 13 Dec 2012 21:35:44 +0000 (16:35 -0500)] 
Fix: Add missing health code update for consumer command

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: packed every sessiond-comm.h structure pass over sockets
David Goulet [Thu, 13 Dec 2012 20:25:03 +0000 (15:25 -0500)] 
Fix: packed every sessiond-comm.h structure pass over sockets

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd LTTNG_PACKED macro
David Goulet [Thu, 13 Dec 2012 20:15:10 +0000 (15:15 -0500)] 
Add LTTNG_PACKED macro

This adds the macro and set it on all lttng.h structure. Also, replace
the already packed relayd structure with the macro.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: clear the fixme in high_throughput_limits
David Goulet [Thu, 13 Dec 2012 18:58:31 +0000 (13:58 -0500)] 
Fix: clear the fixme in high_throughput_limits

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix data pending for inflight streaming
David Goulet [Thu, 13 Dec 2012 01:16:33 +0000 (20:16 -0500)] 
Fix data pending for inflight streaming

The consumer_data_pending() function call had a bad label naming. The
goto label data_not_pending was actually going to the return value of
pending data (1). So, this patch fixes that by renaming the label to the
right meaning.

Add a missing destroy of the relayd session id mapping hash table.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMap session id of relayd and sessiond in consumer
David Goulet [Wed, 12 Dec 2012 22:39:06 +0000 (17:39 -0500)] 
Map session id of relayd and sessiond in consumer

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAdd the relayd create session command
David Goulet [Wed, 12 Dec 2012 22:05:45 +0000 (17:05 -0500)] 
Add the relayd create session command

This is needed in order to fix a specific condition of the data pending
where we need to have streams associated with a session and this command
will be used for new feature in the future.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoMake the consumer sends a ACK after each command
David Goulet [Wed, 12 Dec 2012 16:23:20 +0000 (11:23 -0500)] 
Make the consumer sends a ACK after each command

This is needed to avoid buffer bloating when throttling communication
between the consumer and the relayd. Considering a very low bandwith
limit between the relayd and consumerd, the session daemon would send a
high debit of commands to the consumer without ever

emptying the unix socket queue, which makes the UNIX socket reach buffer
full conditions, which is prone to trigger corner-cases behaviors in
blocking send/recv with MSG_WAITALL, which is likely the cause of hang
experienced when limiting relayd bandwidth.

Adding an ACK to each command makes sure that we acknowledge the session
daemon that we, the consumer, have emptied the unix socket buffer.

NOTE: In consumer_add_relayd_socket(), there might be a problem with the
error path and message status to the sessiond. A subsequent patch might
fix a possible issue but for now it is not at all critical since any
critical error on the consumer side will notify the sessiond through the
error socket.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoRemove MSG_WAITALL on every recvmsg() socket type
David Goulet [Wed, 12 Dec 2012 18:39:37 +0000 (13:39 -0500)] 
Remove MSG_WAITALL on every recvmsg() socket type

In order to handle messages that are possibly larger than the socket
buffer size set by wmem_max and rmem_max /proc files, ensure that the
recv-side reads the data chunk-wise rather than hanging on a
MSG_WAITALL.

In addition to fixing this issue, chances are that it will also help
fixing hangs detected due to UNIX socket buffers filling up. The
MSG_WAITALL behavior in such situations might be unexpected.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: overlap bash escaping for wildcard event name
David Goulet [Mon, 10 Dec 2012 23:24:42 +0000 (18:24 -0500)] 
Fix: overlap bash escaping for wildcard event name

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Wrong path in the overlap test
David Goulet [Mon, 10 Dec 2012 22:18:23 +0000 (17:18 -0500)] 
Fix: Wrong path in the overlap test

Also, activate the overlap.sh tests by default in the make check.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Add missing relayd ht cleanup and ht destroy
David Goulet [Mon, 10 Dec 2012 21:27:55 +0000 (16:27 -0500)] 
Fix: Add missing relayd ht cleanup and ht destroy

Add a function to cleanup every element of the relayd ht and free them
in a call_rcu.

Also, destroy the stream_list_ht on cleanup.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Allocate stream hash table in respective threads
David Goulet [Mon, 10 Dec 2012 21:11:15 +0000 (16:11 -0500)] 
Fix: Allocate stream hash table in respective threads

Allocation and destroy are now in the same thread for both metadata and
data hash table.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Use stream deletion function when cleaning up
David Goulet [Mon, 10 Dec 2012 21:03:58 +0000 (16:03 -0500)] 
Fix: Use stream deletion function when cleaning up

In theory, once the destroy stream ht function is called with the hash
table, it should be empty. However, for some fatal errors, it might not
so it's imperative that we gracefully delete the stream and free it
using an RCU call so both hash tables (stream and the one for the
pending command) are synchronized.

Simply freeing the stream could have created possible fd leaks and
invalid node for the data pending hash table.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Missing umask when using run as no clone
David Goulet [Mon, 10 Dec 2012 18:45:45 +0000 (13:45 -0500)] 
Fix: Missing umask when using run as no clone

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Relayd and sessiond version check
David Goulet [Mon, 10 Dec 2012 17:16:15 +0000 (12:16 -0500)] 
Fix: Relayd and sessiond version check

Now only checks for the major version to be equal. After 2.1 stable
release, both components will adapt to the lowest minor version for the
same major version. For this, the session daemon now send it's version
values to the relayd so slight change in the protocol here.

For instance, a relayd 2.4 talking to a sessiond 2.8, the communication
and available feature will only be those of 2.4 version.

For a relayd let say 3.2 and a sessiond 2.2, the communication stops
right there since both major version differs.

Acked-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: FD leak on consumer add relayd socket error
David Goulet [Mon, 10 Dec 2012 16:38:35 +0000 (11:38 -0500)] 
Fix: FD leak on consumer add relayd socket error

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Consumer sockets leak on error
David Goulet [Mon, 10 Dec 2012 16:20:30 +0000 (11:20 -0500)] 
Fix: Consumer sockets leak on error

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Use endpoint status enum value in checks
David Goulet [Fri, 7 Dec 2012 21:03:04 +0000 (16:03 -0500)] 
Fix: Use endpoint status enum value in checks

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: protect consumer_find_channel with rcu locking
David Goulet [Fri, 7 Dec 2012 21:00:48 +0000 (16:00 -0500)] 
Fix: protect consumer_find_channel with rcu locking

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Rename ust_app_destroy_trace and set it static
David Goulet [Fri, 7 Dec 2012 20:54:19 +0000 (15:54 -0500)] 
Fix: Rename ust_app_destroy_trace and set it static

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: UST app session teardown process
David Goulet [Fri, 7 Dec 2012 18:54:44 +0000 (13:54 -0500)] 
Fix: UST app session teardown process

This patch removes the ht_del of sessions from the delete_ust_app RCU
call and puts it in the unregister app function just before the call_rcu
is done.

To be able to free the sessions in the call rcu, a list is added for
which, when in tearing down an application or session, this list is used
to get the session reference for deletion.

Note that when in the RCU call, we are assured that the list is
exclusively accessed thus no need for any locking.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: check ht_del ret value of ust app session
David Goulet [Fri, 7 Dec 2012 17:05:24 +0000 (12:05 -0500)] 
Fix: check ht_del ret value of ust app session

UST app sesion can be destroyed by two execution paths. Either the app
unregisters or a destroy session is triggered. So, allowing a ht_del to
fail means that the session is already scheduled for teardown in a rcu
call.

Furthermore, this means that when looking up for a ust app session that
is not found becomes valid since it means it is in the teardown process.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: locking order between consumer and stream
David Goulet [Tue, 4 Dec 2012 23:10:45 +0000 (18:10 -0500)] 
Fix: locking order between consumer and stream

Also, lock the stream BEFORE calling the read subbuffer so not to race
with the data pending command.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: don't steal key when adding a metadata stream
David Goulet [Tue, 4 Dec 2012 23:17:55 +0000 (18:17 -0500)] 
Fix: don't steal key when adding a metadata stream

This was causing a stream corruption of the node key if the stream->key
of the metadata was matching a stream wait_fd making the stream not
findable and asserting when getting out of the metadata poll wait.

Now we lookup the stream before adding it to make sure it's unique and
don't try to steal the key anymore since wait_fd is unique to the
consumer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoConsumer hold mutex for add stream
Mathieu Desnoyers [Thu, 6 Dec 2012 14:20:11 +0000 (09:20 -0500)] 
Consumer hold mutex for add stream

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
11 years agoFix: audit all close/fclose and check returned code
David Goulet [Mon, 3 Dec 2012 21:57:57 +0000 (16:57 -0500)] 
Fix: audit all close/fclose and check returned code

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: update/clean lttng.h comments
David Goulet [Mon, 3 Dec 2012 21:43:43 +0000 (16:43 -0500)] 
Fix: update/clean lttng.h comments

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: install lttng health check man page
David Goulet [Mon, 3 Dec 2012 21:14:31 +0000 (16:14 -0500)] 
Fix: install lttng health check man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: ship relevant documentations with tarball
David Goulet [Mon, 3 Dec 2012 21:07:45 +0000 (16:07 -0500)] 
Fix: ship relevant documentations with tarball

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoRemove useles AUTHORS and NEWS files
David Goulet [Mon, 3 Dec 2012 21:01:09 +0000 (16:01 -0500)] 
Remove useles AUTHORS and NEWS files

Authors are in each code files associated with the copyright statement.

AUTHORS is useless and out of date. NEWS contains nothing.

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: update urcu version in README and configure.ac
David Goulet [Mon, 3 Dec 2012 21:00:45 +0000 (16:00 -0500)] 
Fix: update urcu version in README and configure.ac

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate version to v2.1.0-rc9 v2.1.0-rc9
David Goulet [Mon, 3 Dec 2012 20:08:48 +0000 (15:08 -0500)] 
Update version to v2.1.0-rc9

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: set the stream ht static in consumer file
David Goulet [Mon, 3 Dec 2012 19:15:25 +0000 (14:15 -0500)] 
Fix: set the stream ht static in consumer file

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate sessiond man page with new env var
David Goulet [Mon, 3 Dec 2012 18:08:25 +0000 (13:08 -0500)] 
Update sessiond man page with new env var

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoUpdate lttng.1 man page
David Goulet [Mon, 3 Dec 2012 17:59:03 +0000 (12:59 -0500)] 
Update lttng.1 man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: enable-consumer for all domains missing dir
David Goulet [Wed, 28 Nov 2012 20:30:37 +0000 (15:30 -0500)] 
Fix: enable-consumer for all domains missing dir

So the fix here is to enable consumer for all domains if no domain is
given to the command line. This way, the session daemon can handle
correctly the trace directory path for the right domain.

Note that there is *no* switch for all domains (-a, --all) so omitting
the domain (-u or -k) automatically creates a UST and kernel session, if
none, and set the consumer for both of them. If one fails, the command
is stopped. All in all, to be sure, use a domain with the command ;).

Fixes #333

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: Add missing fct prototypes when disabling UST
David Goulet [Wed, 28 Nov 2012 16:05:09 +0000 (11:05 -0500)] 
Fix: Add missing fct prototypes when disabling UST

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix a typo in lttng-probe-module name
Andrew Gabbasov [Wed, 28 Nov 2012 14:43:26 +0000 (08:43 -0600)] 
Fix a typo in lttng-probe-module name

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoAssign values to enum lttcomm_sessiond_command
David Goulet [Tue, 27 Nov 2012 18:52:10 +0000 (13:52 -0500)] 
Assign values to enum lttcomm_sessiond_command

These command's code are part of a communication protocol so numbering
them is important.

Note that the RELAYD command should be in a seperate enum but until we
wrote the specs of the protocol with the commands value, this is fine
for now.

Fixes #397

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoFix: run health test only if root
David Goulet [Tue, 27 Nov 2012 18:51:45 +0000 (13:51 -0500)] 
Fix: run health test only if root

Signed-off-by: David Goulet <dgoulet@efficios.com>
11 years agoClarify empty string/NULL filter errors
Mathieu Desnoyers [Mon, 26 Nov 2012 20:58:08 +0000 (15:58 -0500)] 
Clarify empty string/NULL filter errors

Fixes #404

Reported-by: Jesus Garcia <jesus.garcia@ericsson.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add missing padding for UST filter
David Goulet [Thu, 22 Nov 2012 19:45:28 +0000 (14:45 -0500)] 
Fix: add missing padding for UST filter

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate version to v2.1.0-rc8 v2.1.0-rc8
David Goulet [Thu, 22 Nov 2012 19:11:15 +0000 (14:11 -0500)] 
Update version to v2.1.0-rc8

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Uninit. variable in lttng view
David Goulet [Thu, 22 Nov 2012 19:04:09 +0000 (14:04 -0500)] 
Fix: Uninit. variable in lttng view

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd already enabled UST event error code
David Goulet [Thu, 22 Nov 2012 16:54:50 +0000 (11:54 -0500)] 
Add already enabled UST event error code

Return this error if the event is already enabled when found during an
enable event command.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agolttng.h API update: set filter becomes enable event with filter
David Goulet [Thu, 22 Nov 2012 15:22:09 +0000 (10:22 -0500)] 
lttng.h API update: set filter becomes enable event with filter

The lttng_set_event_filter() is changed to
lttng_enable_event_with_filter() taking the same arguments. The lttng UI
now only uses this call. Note that the original lttng_enable_event() is
still available but will set the filter to NULL.

This is done since now UST allows to enable the same event with
different filters or/and loglevels. So, the events are still hashed by
name but matched by the name/filter/loglevel triplet. In order to add an
event to the hash table, those three attributes are needed at the
creation time thus adding this API call which takes them all at once.

There is some fixes in the match functions and filter setting from the
previous commit that were needed to make the overlap.sh tests works.

The loglevel_match function is removed because it is now only done in
the hash table match function which will eventually get merged making a
single loglevel match call site hence this function becomes useless.

Furthermore, the filter.c/.h are no longer required since the filter is
now added at event creation and CAN NOT be set after.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoChange the UST event hash table match function
David Goulet [Wed, 21 Nov 2012 17:28:03 +0000 (12:28 -0500)] 
Change the UST event hash table match function

The event are now matched, when looked up, with the name/filter/loglevel
triplet since the UST tracer now allows us to enable the same event with
different filters or/and loglevels.

The disable command however only takes the event name so for now it
disable all events matching that name which is why we still hash by
event name.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoPass lttng_event struct to the set_filter API call
David Goulet [Mon, 19 Nov 2012 19:02:23 +0000 (14:02 -0500)] 
Pass lttng_event struct to the set_filter API call

This is the first commit which aims at changing the event hash table key
from the single event name to event_name/filter/loglevel triplet.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdding context to an event is no longer possible
David Goulet [Tue, 20 Nov 2012 18:33:23 +0000 (13:33 -0500)] 
Adding context to an event is no longer possible

The UST tracer does not allow to add context to an event so we've
removed that.

It is completely removed from the lttng UI so it's not possible either
to add one to the kernel. The "event_name" of lttng_add_context is now
ignored.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd UST overlap tests
David Goulet [Fri, 16 Nov 2012 18:38:11 +0000 (13:38 -0500)] 
Add UST overlap tests

Tests the overlap of event names, wildcards, loglevels and filters.

Not added yet to the make check since this depends on lttng-ust 2.1 not
yet released.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd filter sequence number to UST
David Goulet [Fri, 16 Nov 2012 20:14:47 +0000 (15:14 -0500)] 
Add filter sequence number to UST

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Typo from a previous patch in an assert()
David Goulet [Wed, 14 Nov 2012 20:10:48 +0000 (15:10 -0500)] 
Fix: Typo from a previous patch in an assert()

Typo got in with commit: 49c336c1679295a31b92223dca05feccfe3e3464

Fixes #399

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Warn if session is running with lttng view
David Goulet [Wed, 14 Nov 2012 18:42:44 +0000 (13:42 -0500)] 
Fix: Warn if session is running with lttng view

Fixes #156

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Add bash requirement to README for make check
David Goulet [Wed, 14 Nov 2012 18:26:02 +0000 (13:26 -0500)] 
Fix: Add bash requirement to README for make check

Fixes #387

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add the notion of domain to lttng.1 man page
David Goulet [Wed, 14 Nov 2012 17:40:32 +0000 (12:40 -0500)] 
Fix: add the notion of domain to lttng.1 man page

Fixes #194

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoEnable additional kernel probes
Woegerer, Paul [Wed, 14 Nov 2012 12:55:59 +0000 (13:55 +0100)] 
Enable additional kernel probes

http://lists.lttng.org/pipermail/lttng-dev/2012-November/019046.html

Commit id in lttng-modules: b283666ff19841a28b0448c6a867beb2f809f11a

Signed-off-by: Paul Woegerer <Paul_Woegerer@mentor.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate CodingStyle
David Goulet [Tue, 13 Nov 2012 20:32:33 +0000 (15:32 -0500)] 
Update CodingStyle

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUse the new functions for default subbuf sizes
Simon Marchi [Tue, 13 Nov 2012 19:28:43 +0000 (14:28 -0500)] 
Use the new functions for default subbuf sizes

Use the functions added by the previous commit. All the occurences of
the previous defines were replaced.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd default subbuf sizes getter functions
Simon Marchi [Tue, 13 Nov 2012 19:28:42 +0000 (14:28 -0500)] 
Add default subbuf sizes getter functions

This patch adds functions to retrieve defaults subbuf sizes. It uses the
DEFAULT_*_SUBBUF_SIZE defines from defaults.h but also make sure that
the values are at least as big as the page size.

The functions are defined as static inline in defaults.h.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd max() and min() macro in common
Simon Marchi [Tue, 13 Nov 2012 19:28:41 +0000 (14:28 -0500)] 
Add max() and min() macro in common

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate version to v2.1.0-rc7 v2.1.0-rc7
David Goulet [Tue, 13 Nov 2012 18:44:38 +0000 (13:44 -0500)] 
Update version to v2.1.0-rc7

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: remove temporary directory for valid filters test
David Goulet [Tue, 13 Nov 2012 18:44:02 +0000 (13:44 -0500)] 
Fix: remove temporary directory for valid filters test

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Add pointer check when freeing poll events
David Goulet [Fri, 9 Nov 2012 20:28:06 +0000 (15:28 -0500)] 
Fix: Add pointer check when freeing poll events

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: FD leak on thread error
David Goulet [Fri, 9 Nov 2012 20:23:48 +0000 (15:23 -0500)] 
Fix: FD leak on thread error

Also, don't spawn the kernel thread if not root and the no-kernel option
is set.

Fixes #316

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Wrong fd used by kernel_wait_quiescent
David Goulet [Fri, 9 Nov 2012 18:52:39 +0000 (13:52 -0500)] 
Fix: Wrong fd used by kernel_wait_quiescent

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoSupport new lttng-ust error code
David Goulet [Fri, 9 Nov 2012 18:37:25 +0000 (13:37 -0500)] 
Support new lttng-ust error code

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Don't set filter if enable event fails
David Goulet [Fri, 9 Nov 2012 18:36:02 +0000 (13:36 -0500)] 
Fix: Don't set filter if enable event fails

Furthermore, the session daemon now returns an already exist error if
the event is enabled twice. Since we can now set filter, it's misleading
the user to tell him/her that the event was enabled but the filter
failed and than disabling the already enabled event by a previous
command.

Fixes #363 #364

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Wrong data port when listing session
David Goulet [Fri, 9 Nov 2012 16:36:51 +0000 (11:36 -0500)] 
Fix: Wrong data port when listing session

Fixes #377

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Enable event after start command
David Goulet [Thu, 8 Nov 2012 19:08:28 +0000 (14:08 -0500)] 
Fix: Enable event after start command

Refer to the bug tracker for more information on this bug. In a
nutshell, it was not possible to enable channel/event after a start
command has been issued (for both kernel and UST).

Note that it is still NOT possible to enable a channel after a start but
the use case here was the following:

$ lttng create
$ lttng start
$ lttng enable-event -a -u (or -k)

The first starts does NOT create a kernel or UST session so the
following enable event creates the session for the given domain but
failed to start the session after.

https://bugs.lttng.org/issues/346
https://bugs.lttng.org/issues/394

Fixes #346 #394

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Teardown of thread_manage_clients on failure of listen/create_poll
Christian Babeux [Thu, 8 Nov 2012 19:19:51 +0000 (14:19 -0500)] 
Fix: Teardown of thread_manage_clients on failure of listen/create_poll

Currently, if the call to lttcomm_listen_unix_sock or
create_thread_poll_set fails, the error handling and thread teardown
code path is triggered via a jump to an error label. This error handling
path closes the sockets that were used and cleanup the poll set. If the
listen fails, the poll set will tentatively be cleaned even though it
has never been initialized.

This patch add 2 labels to differentiate the error handling paths needed
in case of failure of lttcomm_listen_unix_sock or
create_thread_poll_set.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd a timeout to UST application socket
David Goulet [Thu, 1 Nov 2012 15:24:22 +0000 (11:24 -0400)] 
Add a timeout to UST application socket

By default, a 5 seconds timeout is set on every UST application socket
just after the accept() for both recv and send operation.

This value can be changed through a new environment variable (seconds)
of the session daemon.

This is the first step to fix bug386 where a stopped application can
stalls indefinitely the session daemon when a new command is sent.

The bug 386 is also fixed with the lttng-ust commit:
7bc53e94a229963972aa78880b361b1510fdd268

Fixes #386

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoRevert "Fix cross-compile"
David Goulet [Wed, 7 Nov 2012 20:32:13 +0000 (15:32 -0500)] 
Revert "Fix cross-compile"

This reverts commit 5692e22beeb7119d68055d6450b924972b5f20d0.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix cross-compile
Mathieu Desnoyers [Wed, 7 Nov 2012 20:13:21 +0000 (15:13 -0500)] 
Fix cross-compile

configure.ac should use --target, not --host to get the target info we
want to compile for. --host is for the host that does the build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Consumerd error socket connect race
David Goulet [Tue, 6 Nov 2012 20:55:58 +0000 (15:55 -0500)] 
Fix: Consumerd error socket connect race

Fixes #366

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Set CLOEXEC flag on every created sockets
David Goulet [Wed, 31 Oct 2012 19:12:00 +0000 (15:12 -0400)] 
Fix: Set CLOEXEC flag on every created sockets

Every new socket created by an accept() in the session daemon is set
with the CLOEXEC flag so when the consumer is spawned we don't leak.

Fixes #367

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoRemove consumer poll timeout in data thread
David Goulet [Tue, 6 Nov 2012 15:18:26 +0000 (10:18 -0500)] 
Remove consumer poll timeout in data thread

This was originally used to stop any poll() after a grace period when a
session daemon dies in case of weird stuck fd(s).

However, things have changed a bit especially on the UST tracer side
where all stream handles are now cleaned up if the session daemon socket
hang up which than release every stream on the consumer and finally
quits gracefully.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: RCU hash table seed
David Goulet [Tue, 6 Nov 2012 20:21:18 +0000 (15:21 -0500)] 
Fix: RCU hash table seed

Remove the dangerous static value 0x42UL. Use time(NULL) value to set
the new lttng_ht_seed variable when the hash table library constructor
is called.

Fixes #388

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Do not install health tests helper libraries
Christian Babeux [Tue, 6 Nov 2012 18:32:05 +0000 (13:32 -0500)] 
Fix: Do not install health tests helper libraries

The libraries libhealthexit and libhealthstall should not be installed
on the user system. They are only useful for the health check tests.

Furthermore, when adding libraries to noinst_LTLIBRARIES, libtool will
only build these as static libraries (see [1] for a workaround). This is
fine for most use cases, but for the health tests, we _must_ have shared
libraries (the nature of the tests require LD_PRELOAD), hence we force
the build of a shared object.

Forcing shared object has the unfortunate side-effect of breaking builds
where configure was invoked with "--disable-shared" flag.  Instead of
failing badly, detect this flag and skip the health tests altogether.

noinst shared libs:
[1] - https://lists.gnu.org/archive/html/libtool/2008-06/msg00082.html

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Create default channel on add-context if none
David Goulet [Tue, 6 Nov 2012 19:35:43 +0000 (14:35 -0500)] 
Fix: Create default channel on add-context if none

For both kernel and UST, if no channel exists and an add-context command
is sent, the default channel0 is created and the context(es) are set.

Fixes #391

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoSupport new liblttng-ust-ctl error code
Mathieu Desnoyers [Tue, 6 Nov 2012 18:47:17 +0000 (13:47 -0500)] 
Support new liblttng-ust-ctl error code

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Add EPIPE error handling on buffer splice
David Goulet [Tue, 6 Nov 2012 14:41:35 +0000 (09:41 -0500)] 
Fix: Add EPIPE error handling on buffer splice

Even though this is _not_ documented in splice(2), if the fd_out is a
socket but closed on one end, splice returns a negative value and set
errno to EPIPE. The man page specifies a EBADF but I guess both are
possible (and it is according to the kernel 3.6.2 source).

So, when streaming a kernel session (using splice), if the relayd quits,
a splice on the socket returns an EPIPE.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Channel creation error return code was not set
David Goulet [Mon, 5 Nov 2012 22:03:19 +0000 (17:03 -0500)] 
Fix: Channel creation error return code was not set

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Wrong poll events on UST application socket
David Goulet [Mon, 5 Nov 2012 21:49:40 +0000 (16:49 -0500)] 
Fix: Wrong poll events on UST application socket

The thread manage apps was adding UST sockets to the poll set with the
POLLIN event registered. However, the thread was not handling this event
which could ultimately cause an infinite loop if the application sends
data.

This has been observed with the bug386 when an application is stopped
and a lttng command is sent.

https://bugs.lttng.org/issues/386

Furthermore, a time window between the send and the reply recv of an UST
command was making the app manager loop actively because of a POLLIN
event on the socket caused by the reply from the application which is
finally handled a bit after by the client thread. This was not that
problematic but lead to a lot of repeated debug message and CPU time
lost.

This application thread is *only* handling error event usually triggered
by a close() on the UST socket thus OK to *not* wait for POLLIN/POLLOUT
event.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Remove dependency to urcu-cds in tools tests
Christian Babeux [Fri, 2 Nov 2012 19:04:02 +0000 (15:04 -0400)] 
Fix: Remove dependency to urcu-cds in tools tests

The -lurcu-cds link flag is not mandatory to link any of the tests.
Also, adding this flag can cause multiple symbol definition errors when
linking statically because the libhashtable contains symbol names that
are also present in urcu-cds.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: Missing librt dependency in configure check for lttng-ust-ctl
Christian Babeux [Fri, 2 Nov 2012 19:03:17 +0000 (15:03 -0400)] 
Fix: Missing librt dependency in configure check for lttng-ust-ctl

The lttng-ust-ctl library depends on librt. The AC_CHECK_LIBRARY macro
can't automatically resolve dependents libraries (ala libtool), so any
additionnals dependencies must be manually specified.

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
This page took 0.042396 seconds and 4 git commands to generate.