lttng-tools.git
12 years agocompat fcntl.h: add cygwin support
Mathieu Desnoyers [Thu, 24 May 2012 15:00:11 +0000 (11:00 -0400)] 
compat fcntl.h: add cygwin support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMove futex.c/.h to libcommon
David Goulet [Tue, 8 May 2012 19:47:53 +0000 (15:47 -0400)] 
Move futex.c/.h to libcommon

This is done so the future lttng-relayd and other possible binaries
could use it.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate version to 2.0.1 stable
David Goulet [Thu, 19 Apr 2012 15:12:09 +0000 (11:12 -0400)] 
Update version to 2.0.1 stable

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: test script for kernel module validation
David Goulet [Thu, 19 Apr 2012 15:03:38 +0000 (11:03 -0400)] 
Fix: test script for kernel module validation

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: report error to client on consumerd error
David Goulet [Thu, 19 Apr 2012 14:58:42 +0000 (10:58 -0400)] 
Fix: report error to client on consumerd error

Adds a consumer daemon state flag that allows us to know the state of
the consumer during client command processing.

Please refer to the comment in lttng-sessiond/main.c above the
definition of those flags for more information and a possible race
condition issue.

This is a quick fix for bug #137 that will be merged in 2.0-stable
branch.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: replace 'modprobe -l' by lsmod in kernel test
David Goulet [Mon, 16 Apr 2012 15:37:49 +0000 (11:37 -0400)] 
Fix: replace 'modprobe -l' by lsmod in kernel test

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add missing ht_destroy at consumer teardown
Mathieu Desnoyers [Thu, 12 Apr 2012 15:45:36 +0000 (11:45 -0400)] 
Fix: add missing ht_destroy at consumer teardown

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoRemove useless test and fix message output
David Goulet [Mon, 16 Apr 2012 15:19:15 +0000 (11:19 -0400)] 
Remove useless test and fix message output

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoWait for all apps in high-throughput test
David Goulet [Thu, 12 Apr 2012 18:54:28 +0000 (14:54 -0400)] 
Wait for all apps in high-throughput test

Don't wait an arbitrary amount of time for application to end.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd multi-session test for UST
David Goulet [Thu, 12 Apr 2012 18:22:55 +0000 (14:22 -0400)] 
Add multi-session test for UST

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: consumer fd recv thread should write into non-blocking pipe
Mathieu Desnoyers [Thu, 12 Apr 2012 01:57:31 +0000 (21:57 -0400)] 
Fix: consumer fd recv thread should write into non-blocking pipe

Writing into a blocking pipe will cause the writer thread to block on
the poll fds thread when the pipe is full. Given that we would like to
batch stream array reallocation as much as possible, this wakeup should
not block.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: work-around glibc __nptl_setxid vs clone hang
Mathieu Desnoyers [Thu, 12 Apr 2012 01:07:13 +0000 (21:07 -0400)] 
Fix: work-around glibc __nptl_setxid vs clone hang

hash table resize threads exit end up setting a "locked" state within
libc pthread, which deadlocks with seteuid/setegid called from the
cloned process in runas.c when runas() is called exactly when a resize
thread exits.

Temporarily fix this issue by adding a mutex cross this resize
operation, which holds mutual exclusion with runas() usage.

We should investigate whether we want to properly call exec() from the
runas.c clone child before touching any non-async-signal-safe libc call.
However, given that this change is more intrusive, let's first use this
mutex-based work-around.

Before this fix, running 1000 instances of "demo-trace 300" with
sessiond running as root, and:

lttng create
lttng enable-event -u -a
lttng start

would sometimes lead to consumerd hang with the following clone child
backtrace:

setxid_mark_thread (cmdp=<optimized out>, t=0x7f52dd47c700)
    at allocatestack.c:995
995 allocatestack.c: No such file or directory.
(gdb) bt full
    at allocatestack.c:995
        ch = <optimized out>
    at allocatestack.c:1088
        t = 0x80
        signalled = <optimized out>
        result = <optimized out>
        runp = 0x7f52dd47c9c0
    at ../sysdeps/unix/sysv/linux/setegid.c:44
        __p = 0xfffffffffffffe00
        __cmd = {syscall_no = 119, id = {-1, 1000, -1}, cntr = 0}
        result = <optimized out>
        data = 0x7f52e66e1930
        writelen = <optimized out>
        writeleft = <optimized out>
        index = <optimized out>
        sendret = {i = 0, c = "\000\000\000"}
        ret = <optimized out>
        __func__ = "child_run_as"
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
No locals.
No symbol table info available.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: consumer fd recv poll should be sensitive to POLLPRI too
Mathieu Desnoyers [Wed, 11 Apr 2012 22:15:24 +0000 (18:15 -0400)] 
Fix: consumer fd recv poll should be sensitive to POLLPRI too

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix consumer lttng_consumer_poll_socket poll revents check bug
Mathieu Desnoyers [Wed, 11 Apr 2012 22:06:08 +0000 (18:06 -0400)] 
Fix consumer lttng_consumer_poll_socket poll revents check bug

Was causing the sessiond to fail to receive streams under heavy load,
because this test needs to be done with a mask rather than equality.
Testing equality was failing as soon as POLLPRI (or any other flag) was
set.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: increase consumer open files limit
David Goulet [Wed, 11 Apr 2012 21:56:29 +0000 (17:56 -0400)] 
Fix: increase consumer open files limit

Set ulimit of consumer when root so it can scales up to the session
daemon number of open files.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate README: document dep on modprobe for kernel tracing
Mathieu Desnoyers [Wed, 11 Apr 2012 00:33:57 +0000 (20:33 -0400)] 
Update README: document dep on modprobe for kernel tracing

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix tests: add missing session2 destroy
Mathieu Desnoyers [Tue, 10 Apr 2012 21:39:40 +0000 (17:39 -0400)] 
Fix tests: add missing session2 destroy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: increase wait time for UST high-throughput test
David Goulet [Tue, 10 Apr 2012 17:45:46 +0000 (13:45 -0400)] 
Fix: increase wait time for UST high-throughput test

On slower system, this test failed due to the time period the test does
for applications to at least start tracing.

Add a warning on stdout telling that this is an arbitrary time and might
fail on slower system.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: wait for sessiond to stop in tests
David Goulet [Tue, 10 Apr 2012 17:42:46 +0000 (13:42 -0400)] 
Fix: wait for sessiond to stop in tests

Before returning from stop_sessiond bash function, we wait that the
sessiond daemon completely stopped. If it hungs up at that point, the
kill did not work and investigation can begin.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: tests: error handling labels are in the wrong order
Mathieu Desnoyers [Tue, 10 Apr 2012 15:38:49 +0000 (11:38 -0400)] 
Fix: tests: error handling labels are in the wrong order

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: remove unused return variable
David Goulet [Tue, 10 Apr 2012 14:59:07 +0000 (10:59 -0400)] 
Fix: remove unused return variable

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: kernel test scripts
David Goulet [Fri, 6 Apr 2012 19:27:03 +0000 (15:27 -0400)] 
Fix: kernel test scripts

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoDon't report back error on syscalls fail for -a -k
David Goulet [Fri, 6 Apr 2012 19:24:53 +0000 (15:24 -0400)] 
Don't report back error on syscalls fail for -a -k

lttng enable-event -a -k will not report an error anymmore if enabling
syscall events has failed. Please refer to the commitdiff for a detailed
comment on why this is done like so.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: destroy context hash table being NULL
David Goulet [Thu, 5 Apr 2012 19:56:43 +0000 (15:56 -0400)] 
Fix: destroy context hash table being NULL

Passing an event unknown loglevel type to the session daemon (for UST
domain) was triggering an error code path to destroy the context hash
table of the event which is not created once the error is hit.

Fix a segfault completely killing the session daemon.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd channel command in utils.sh of tests
David Goulet [Thu, 5 Apr 2012 19:49:32 +0000 (15:49 -0400)] 
Add channel command in utils.sh of tests

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoImprove UST tracing actions test
David Goulet [Thu, 5 Apr 2012 19:48:23 +0000 (15:48 -0400)] 
Improve UST tracing actions test

Test all possible lttng command for UST domain.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd wildcard test to UST
David Goulet [Thu, 5 Apr 2012 19:46:52 +0000 (15:46 -0400)] 
Add wildcard test to UST

Rename test file and add two event wildcard type to the test.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: make lttng expand path for trace output opt
David Goulet [Thu, 5 Apr 2012 15:39:59 +0000 (11:39 -0400)] 
Fix: make lttng expand path for trace output opt

lttng create --output was passing the path string to the session daemon
and thus, for relative path like './mytraces', it was created in the
current directory of the session daemon.

Now lttng command line uses the realpath(3) of the --output string and
denies creation if multiple level of directory does not exist (Ex:
/tmp/foo/bar/chap, if foo/ does not exist, it is refused).

Directory creation still occurs on the session daemon side.

Reported-by: Ettore Del Negro <ettore@ettoredelnegro.me>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: remove tests from runall script
David Goulet [Tue, 3 Apr 2012 18:36:14 +0000 (14:36 -0400)] 
Fix: remove tests from runall script

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: return value signedness
David Goulet [Tue, 3 Apr 2012 18:29:01 +0000 (14:29 -0400)] 
Fix: return value signedness

Also remove repeated include headers.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: man page environment variable name error
David Goulet [Tue, 3 Apr 2012 16:09:16 +0000 (12:09 -0400)] 
Fix: man page environment variable name error

Reported-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: check return value on getenv USER
David Goulet [Tue, 3 Apr 2012 14:48:04 +0000 (10:48 -0400)] 
Fix: check return value on getenv USER

System with no environment variable USER, one of the easter egg caused a
segfault on certain embedded linux platforms.

Other getenv() of the project were audited to ensure that the return
value is checked.

Reported-by: Ryan Kyser <Ryan.Kyser@jci.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoRemove useless test
David Goulet [Mon, 2 Apr 2012 20:30:51 +0000 (16:30 -0400)] 
Remove useless test

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd before-after test
David Goulet [Mon, 2 Apr 2012 18:44:55 +0000 (14:44 -0400)] 
Add before-after test

Test tracing before and after application execution.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoCleanup debug printf in test
David Goulet [Mon, 2 Apr 2012 16:14:53 +0000 (12:14 -0400)] 
Cleanup debug printf in test

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix tests when lttng-ust is disabled
David Goulet [Mon, 2 Apr 2012 16:10:05 +0000 (12:10 -0400)] 
Fix tests when lttng-ust is disabled

(close #200)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd low-throughput test
David Goulet [Mon, 2 Apr 2012 15:57:23 +0000 (11:57 -0400)] 
Add low-throughput test

Test during 20 minutes events at each minute, 10 minutes and 20 minutes.
It validates the event order with an incremental counter.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoAdd high-throughput test
David Goulet [Tue, 27 Mar 2012 20:04:27 +0000 (16:04 -0400)] 
Add high-throughput test

This tests high number of events being recorded with multiple concurrent
instrumented applications.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoImprove tests and change tests/ directory layout
David Goulet [Tue, 6 Mar 2012 21:59:55 +0000 (16:59 -0500)] 
Improve tests and change tests/ directory layout

Add run-report.py and test_list.py files which are an extended test framework
providing memory and CPU sampling of the session daemon during the tests.

Tests are now divided on a per package basis. The kernel/ directory contains
integration tests for lttng-modules (kernel tracer). ust/ directory contains
tests for lttng-ust and tools/ directory has the unit tests of lttng-tools
itself which does not test tracer integration.

First patch aimed at improving test coverage of the lttng 2.0 toolchain and
provide the python framework for more detailled analysis.

Use make check to run them all or use run-report.py and select which tests to
run in test_list.py.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate version to 2.0.0 stable v2.0.0
David Goulet [Tue, 20 Mar 2012 22:32:45 +0000 (18:32 -0400)] 
Update version to 2.0.0 stable

ROCK ON!!!

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoUpdate version to v2.0.0-rc4 v2.0.0-rc4
David Goulet [Tue, 20 Mar 2012 20:42:48 +0000 (16:42 -0400)] 
Update version to v2.0.0-rc4

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add small detail to enable-channel man page
David Goulet [Tue, 20 Mar 2012 20:19:16 +0000 (16:19 -0400)] 
Fix: add small detail to enable-channel man page

(close #192)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: warned of arbitrary time for ust-nprocesses test
David Goulet [Tue, 20 Mar 2012 20:15:56 +0000 (16:15 -0400)] 
Fix: warned of arbitrary time for ust-nprocesses test

(close #157)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix. add limitation to man page
David Goulet [Tue, 20 Mar 2012 20:09:51 +0000 (16:09 -0400)] 
Fix. add limitation to man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: minor changes to lttng.1
David Goulet [Tue, 20 Mar 2012 19:53:22 +0000 (15:53 -0400)] 
Fix: minor changes to lttng.1

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add exit values to lttng.1 man page
David Goulet [Tue, 20 Mar 2012 19:51:14 +0000 (15:51 -0400)] 
Fix: add exit values to lttng.1 man page

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: add delay before validating apps in test nproc
David Goulet [Tue, 20 Mar 2012 19:33:10 +0000 (15:33 -0400)] 
Fix: add delay before validating apps in test nproc

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: error handling in lttng enable-event
David Goulet [Tue, 20 Mar 2012 19:32:43 +0000 (15:32 -0400)] 
Fix: error handling in lttng enable-event

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: document structure init. to 0 in lttng.h
Raphaël Beamonte [Sun, 18 Mar 2012 02:02:53 +0000 (22:02 -0400)] 
Fix: document structure init. to 0 in lttng.h

Document the fact that the structures should be initialized to zero in
lttng.h since there is no init function.

(close #135)

Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: uninitialized variable
David Goulet [Tue, 20 Mar 2012 18:55:52 +0000 (14:55 -0400)] 
Fix: uninitialized variable

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoKeep track of FD used for UST applications (v2)
Mathieu Desnoyers [Tue, 20 Mar 2012 18:53:07 +0000 (14:53 -0400)] 
Keep track of FD used for UST applications (v2)

Allow to keep 25% of file descriptors reserved for commands/kernel
tracing/internal communication within the sessiond by limiting
applications to 75% of the available file descriptors. This ensures
traced applications cannot cause a sessiond denial of service.

Changelog since v1:
- Add missing fd-limit.h

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: lttng view, error message and exit code
Julien Desfossez [Tue, 20 Mar 2012 15:19:14 +0000 (11:19 -0400)] 
Fix: lttng view, error message and exit code

lttng view is a frontend command, when the viewer is not found in the
path, the error message should be human readable (no need for the
developper-oriented debug message).

Also the return code must indicate that something went wrong if the
viewer is not on the system.

(fix #144)

Signed-off-by: Julien Desfossez <julien.desfossez@efficios.com>
Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoSmall fixes to lttng man pages (v2)
Yannick Brosseau [Tue, 20 Mar 2012 15:37:09 +0000 (11:37 -0400)] 
Small fixes to lttng man pages (v2)

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
12 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Tue, 20 Mar 2012 18:35:38 +0000 (14:35 -0400)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

12 years agoFix: handle EINTR for sendmsg syscall
David Goulet [Tue, 20 Mar 2012 18:33:23 +0000 (14:33 -0400)] 
Fix: handle EINTR for sendmsg syscall

(close #170)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: lttng UI exit value and error message
David Goulet [Tue, 20 Mar 2012 18:27:12 +0000 (14:27 -0400)] 
Fix: lttng UI exit value and error message

Change lttcomm error code starting value from 1000 to 10. This way, bash
can return the exact error code since 255 is the maximum.

Fix multiple warning, error and message output.

Some return code could still be not "standardize" but for stable it's
ok. Fixes can come later on.

(close #105)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: session lock use after free
Mathieu Desnoyers [Tue, 20 Mar 2012 17:39:20 +0000 (13:39 -0400)] 
Fix: session lock use after free

The session lock is broken in that it does not handle teardown correctly
(use after free). Surround each usage by the session list lock for now
to fix this issue, and don't unlock the session lock after free. Since
each session lock usage is surrounded by session list lock, no other
thread will be left waiting on this lock when the session destroy is
performed.

This effectively renders useless the per-session lock. Leave it there
for now to minimize code change before 2.0 final.

This locking scheme will be revisited for lttng 2.1.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix kernel_list_events memleaks
Mathieu Desnoyers [Tue, 20 Mar 2012 17:15:01 +0000 (13:15 -0400)] 
Fix kernel_list_events memleaks

- The fscanf %m allocation was leaking the "event" (needs to be freed
  explicitly).
- The error handling of realloc should free the previous pointer.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix debug message use uninitialized variable
Mathieu Desnoyers [Tue, 20 Mar 2012 16:58:19 +0000 (12:58 -0400)] 
Fix debug message use uninitialized variable

Reported-by: Yannick Brosseau <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: trace_ust_destroy_metadata should check for NULL pointer
Mathieu Desnoyers [Mon, 19 Mar 2012 22:15:50 +0000 (18:15 -0400)] 
Fix: trace_ust_destroy_metadata should check for NULL pointer

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: various memleaks
Mathieu Desnoyers [Mon, 19 Mar 2012 22:02:45 +0000 (18:02 -0400)] 
Fix: various memleaks

Thanks to valgrind.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: hash table allocation out of order on error
David Goulet [Mon, 19 Mar 2012 21:16:28 +0000 (17:16 -0400)] 
Fix: hash table allocation out of order on error

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agofix: lttng_ht_destroy memleak
Mathieu Desnoyers [Mon, 19 Mar 2012 21:10:20 +0000 (17:10 -0400)] 
fix: lttng_ht_destroy memleak

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoUpdate version to v2.0.0-rc3 v2.0.0-rc3
David Goulet [Fri, 16 Mar 2012 19:38:56 +0000 (15:38 -0400)] 
Update version to v2.0.0-rc3

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix missing headers for make dist
David Goulet [Fri, 16 Mar 2012 19:33:52 +0000 (15:33 -0400)] 
Fix missing headers for make dist

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: install lttng-consumerd in lib/lttng/libexec/
Mathieu Desnoyers [Thu, 15 Mar 2012 18:30:43 +0000 (14:30 -0400)] 
Fix: install lttng-consumerd in lib/lttng/libexec/

This program is not meant to be executed by end-users: it is spawned
only by the session daemon.

Closes #46

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: Redefine MAP_STACK to 0 if not defined by the architecture
Avik Sil [Thu, 15 Mar 2012 12:22:02 +0000 (08:22 -0400)] 
Fix: Redefine MAP_STACK to 0 if not defined by the architecture

This patch fixes build error on architectures (e.g., armel, armhf) that
do not define MAP_STACK.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix consumer CPU hotplug support
David Goulet [Tue, 13 Mar 2012 21:14:17 +0000 (17:14 -0400)] 
Fix consumer CPU hotplug support

This is a quick fix to handle stream update on CPU hotplug. Please look
at #ref 168 for more information and explanation on the real fix.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix double PID registration race
David Goulet [Tue, 13 Mar 2012 15:13:25 +0000 (11:13 -0400)] 
Fix double PID registration race

Introduce a second hash table indexed by application socket which have
the exact same content as the hash table indexed by PID.

On unregister, we now use a direct lookup per socket instead of using
the key map between sock and PID. This prevents the PID-sock lookup race
when the unregister happens just after the replace and before the
close(fd).

We also use an add_replace call on application registration for the PID
hash table and kept the add_unique for the socket hash table.

(closes #7)

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoMake libcompat independent not to confuse automake
David Goulet [Tue, 13 Mar 2012 15:34:28 +0000 (11:34 -0400)] 
Make libcompat independent not to confuse automake

Moving libcompat.la to the compat/ subdirectory and building it before
every other libs.

(closes #101 #153)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoClarify the license of lttng-ust-abi.h
Alexandre Montplaisir [Sat, 10 Mar 2012 21:59:00 +0000 (16:59 -0500)] 
Clarify the license of lttng-ust-abi.h

That file's license was not recognized by licensecheck. I suggest using
the MIT/X11 text which is quite similar, and is already used elsewhere
in the project (in Babeltrace).

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoLicense header fixes
Alexandre Montplaisir [Sat, 10 Mar 2012 21:58:59 +0000 (16:58 -0500)] 
License header fixes

Most of the source files had the wrong FSF address. Also reworded the
first paragraph so that licensecheck's regexes actually pick up the
version number.

I made sure lttng.h and lttng-ctl.c advertise LGPL-2.1. Every other file
touched in this patch was and remains under GPL2, please make sure this
is correct. (Some files related to the RCU hashtable are under
LGPL-2.1+, but their headers were already clean).

(closes #155)

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix wrong return value on consumer socket creation
David Goulet [Thu, 8 Mar 2012 23:10:38 +0000 (18:10 -0500)] 
Fix wrong return value on consumer socket creation

A failing call to mkdir() returned 0 instead of an error and was
creating a segfault later on since some memory was not initialized.

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: test for UST invalid channel parameters at channel creation
Mathieu Desnoyers [Thu, 8 Mar 2012 16:07:13 +0000 (11:07 -0500)] 
Fix: test for UST invalid channel parameters at channel creation

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: recvmsg should handle EINTR
Mathieu Desnoyers [Tue, 6 Mar 2012 23:16:12 +0000 (18:16 -0500)] 
Fix: recvmsg should handle EINTR

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix error.h non-static variables for liblttng-ctl
David Goulet [Tue, 6 Mar 2012 16:16:26 +0000 (11:16 -0500)] 
Fix error.h non-static variables for liblttng-ctl

Linking with liblttng-ctl made the variable opt_quiet and opt_verbose
undefined if nonexistent in the linked application.

Rename the variables adding the prefix lttng_* and declaring them in
liblttng-ctl as global variable. The user can now control the verbosity
of the library by simply setting them.

Future work will mostly add an API call to control verbosity.

(closes #151)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix missing _GNU_SOURCE define
David Goulet [Tue, 6 Mar 2012 15:44:55 +0000 (10:44 -0500)] 
Fix missing _GNU_SOURCE define

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoFix: improve need root for kernel tracing error message
Mathieu Desnoyers [Tue, 6 Mar 2012 15:40:06 +0000 (10:40 -0500)] 
Fix: improve need root for kernel tracing error message

Reported-by: "Thibault, Daniel" <Daniel.Thibault@drdc-rddc.gc.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix start/stop lttng message error
David Goulet [Mon, 5 Mar 2012 14:56:40 +0000 (09:56 -0500)] 
Fix start/stop lttng message error

Add the already started/stopped error message and print a more
meaningful error on the command line.

(closes #47)

Signed-off-by: David Goulet <dgoulet@efficios.com>
12 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Mon, 5 Mar 2012 14:27:50 +0000 (09:27 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

12 years agoUpdate version to v2.0.0-rc2 v2.0.0-rc2
Mathieu Desnoyers [Fri, 2 Mar 2012 23:35:37 +0000 (18:35 -0500)] 
Update version to v2.0.0-rc2

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: meaningful error message
Mathieu Desnoyers [Fri, 2 Mar 2012 23:17:33 +0000 (18:17 -0500)] 
Fix: meaningful error message

Show a meaningful error message to users attempting to do kernel tracing
without root sessiond/tracing group creds.

Reported-by: "Brosseau, Yannick" <yannick.brosseau@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: UST consumer need to iterate on streams, just change their key
Mathieu Desnoyers [Fri, 2 Mar 2012 22:26:10 +0000 (17:26 -0500)] 
Fix: UST consumer need to iterate on streams, just change their key

We need iteration to still be able to see the stream/channel, but not
lookups from sessiond query.

Ensure that teardown does not lookup by key.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: add missing rcu read lock across RCU HT iteration
Mathieu Desnoyers [Fri, 2 Mar 2012 21:56:13 +0000 (16:56 -0500)] 
Fix: add missing rcu read lock across RCU HT iteration

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: kernel session closes fd 0 after create
Mathieu Desnoyers [Fri, 2 Mar 2012 21:16:02 +0000 (16:16 -0500)] 
Fix: kernel session closes fd 0 after create

This fix the make check test for kernel session handling. We ensure that
all FDs that are unset are set to -1.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: sendmsg EPIPE should be quiet by default (expected)
Mathieu Desnoyers [Fri, 2 Mar 2012 20:53:09 +0000 (15:53 -0500)] 
Fix: sendmsg EPIPE should be quiet by default (expected)

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: thread_registration_apps should set its local sock to -1 when passing it
Mathieu Desnoyers [Fri, 2 Mar 2012 20:45:11 +0000 (15:45 -0500)] 
Fix: thread_registration_apps should set its local sock to -1 when passing it

.. to another thread.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: clock -> sock typo
Mathieu Desnoyers [Fri, 2 Mar 2012 20:20:45 +0000 (15:20 -0500)] 
Fix: clock -> sock typo

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Fri, 2 Mar 2012 20:19:52 +0000 (15:19 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

12 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Fri, 2 Mar 2012 20:18:33 +0000 (15:18 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

12 years agoFix: consumer race: should allow reuse of FD key
Mathieu Desnoyers [Fri, 2 Mar 2012 20:13:18 +0000 (15:13 -0500)] 
Fix: consumer race: should allow reuse of FD key

Issue was triggered by running "hello" UST test program in a loop while
tracing was active.

Acked-by: David Goulet <dgoulet@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Fri, 2 Mar 2012 20:00:16 +0000 (15:00 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

12 years agoFix: Use PERROR all across lttng-tools, never make it quiet
Mathieu Desnoyers [Fri, 2 Mar 2012 19:01:42 +0000 (14:01 -0500)] 
Fix: Use PERROR all across lttng-tools, never make it quiet

We never want to hide these errors, even in quiet mode. For those
"errors" that are expected and part of the normal operation (e.g. send
consumer channel: Socket operation on non-socket), we will have to
handle the return values and errno explicitly in the code.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: test all close return values in sessiond
Mathieu Desnoyers [Fri, 2 Mar 2012 18:10:11 +0000 (13:10 -0500)] 
Fix: test all close return values in sessiond

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: All perror turned into PERROR to show file and line number
Mathieu Desnoyers [Fri, 2 Mar 2012 18:03:38 +0000 (13:03 -0500)] 
Fix: All perror turned into PERROR to show file and line number

Needed to find error culprits.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: large audit of close() use in sessiond main.c
Mathieu Desnoyers [Fri, 2 Mar 2012 17:57:38 +0000 (12:57 -0500)] 
Fix: large audit of close() use in sessiond main.c

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: main.c client/apps sockets and kernel_trace_fd close(0)
Mathieu Desnoyers [Fri, 2 Mar 2012 17:10:32 +0000 (12:10 -0500)] 
Fix: main.c client/apps sockets and kernel_trace_fd close(0)

thread_registration_apps and thread_manage_clients threads are closing
sock == 0 in error handling path, which is an error.

They also may use kernel_tracer_fd at 0 value if no kernel tracer has
been found. cleanup() can close this 0 socket too, which should never
happen.

Set all these sockets as "-1" when unset.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: incorrect close of fd 0 for syscall kernel event destroy
Mathieu Desnoyers [Fri, 2 Mar 2012 16:54:13 +0000 (11:54 -0500)] 
Fix: incorrect close of fd 0 for syscall kernel event destroy

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix: sessiond has incorrect missing 0 value in FD check
Mathieu Desnoyers [Fri, 2 Mar 2012 16:12:26 +0000 (11:12 -0500)] 
Fix: sessiond has incorrect missing 0 value in FD check

When run with daemon(), the 0 file descriptor can be re-used for
something else than stdout.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoMerge branch 'master' into compat-freebsd
David Goulet [Thu, 1 Mar 2012 18:04:18 +0000 (13:04 -0500)] 
Merge branch 'master' into compat-freebsd

This page took 0.04358 seconds and 4 git commands to generate.