[lttng-dev] lttng create freezes sometimes
Sébastien Barthélémy
barthelemy at crans.org
Thu Jan 5 05:54:10 EST 2012
On Wed, Jan 4, 2012 at 7:23 PM, Yannick Brosseau
<yannick.brosseau at gmail.com> wrote:
> The first thing you should do to provide more information is to run the
> lttng-sessiond by itself, with full logging activated.
> To do this, as the same user you were running lttng, just run
> lttng-sessiond -vvv
> and then run your lttng commands as usual. (Make sure you do not have other
> lttng-sessiond running)
>
> With that you will see the full output of the session daemon. We might see
> some errors there.
The lock occurs between lttng and the lttng-sessiond it just spawn.
If I run lttng-sessiond by itself beforehand, I cannot reproduce the lock.
However, I rebuilt lttng with the following patch applied, to run the
spawned daemon in verbose mode:
diff --git a/lttng/lttng.c b/lttng/lttng.c
index d0f2357..b4aac78 100644
--- a/lttng/lttng.c
+++ b/lttng/lttng.c
@@ -287,7 +287,7 @@ static int spawn_sessiond(char *pathname)
* Spawn session daemon and tell
* it to signal us when ready.
*/
- execlp(pathname, "lttng-sessiond", "--sig-parent",
"--quiet", NULL);
+ execlp(pathname, "lttng-sessiond", "--sig-parent",
"-vvv", NULL);
/* execlp only returns if error happened */
if (errno == ENOENT) {
ERR("No session daemon found. Use --sessiond-path.");
Here is a log of a successful session creation
$ lttng create
Spawning a session daemon
DEBUG3: Creating LTTng run directory: /home/nao/.lttng [in
create_lttng_rundir() at main.c:4085]
DEBUG1: Client socket path /home/nao/.lttng/client-lttng-sessiond [in
main() at main.c:4355]
DEBUG1: Application socket path /home/nao/.lttng/apps-lttng-sessiond
[in main() at main.c:4356]
DEBUG1: LTTng run directory path: /home/nao/.lttng [in main() at main.c:4357]
DEBUG2: UST consumer 32 bits err path:
/home/nao/.lttng/ustconsumerd32/error [in main() at main.c:4366]
DEBUG2: UST consumer 32 bits cmd path:
/home/nao/.lttng/ustconsumerd32/command [in main() at main.c:4368]
DEBUG2: UST consumer 64 bits err path:
/home/nao/.lttng/ustconsumerd64/error [in main() at main.c:4377]
DEBUG2: UST consumer 64 bits cmd path:
/home/nao/.lttng/ustconsumerd64/command [in main() at main.c:4379]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd64
[in set_consumer_sockets() at main.c:4127]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd32
[in set_consumer_sockets() at main.c:4127]
DEBUG1: Signal handler set for SIGTERM, SIGPIPE and SIGINT [in
set_signal_handler() at main.c:4218]
DEBUG1: epoll set max size is 90348 [in compat_epoll_set_max_size() at
compat/compat-epoll.c:217]
DEBUG1: [thread] Manage client started [in thread_manage_clients() at
main.c:3627]
DEBUG1: Accepting client command ... [in thread_manage_clients() at main.c:3659]
DEBUG1: Wait for client response [in thread_manage_clients() at main.c:3689]
DEBUG1: Receiving data from client ... [in thread_manage_clients() at
main.c:3724]
DEBUG1: Processing client command 8 [in process_client_msg() at main.c:3215]
DEBUG2: Trying to find session by name auto-20120105-104203 [in
session_find_by_name() at session.c:132]
DEBUG3: mkdir() recursive /home/nao/lttng-traces/auto-20120105-104203
with mode 504 for uid 1001 and gid 1001 [in mkdir_recursive_run_as()
at runas.c:280]
DEBUG1: Tracing session auto-20120105-104203 created in
/home/nao/lttng-traces/auto-20120105-104203 with ID 1 by UID 1001 GID
1001 [in session_create() at session.c:240]
DEBUG1: Sending response (size: 16, retcode: Success) [in
thread_manage_clients() at main.c:3758]
Session auto-20120105-104203 created.
Traces will be written in /home/nao/lttng-traces/auto-20120105-104203
DEBUG1: Clean command context structure [in clean_command_ctx() at main.c:499]
DEBUG1: Accepting client command ... [in thread_manage_clients() at main.c:3659]
DEBUG1: [thread] Dispatch UST command started [in
thread_dispatch_ust_registration() at main.c:1225]
DEBUG1: Futex n to 1 prepare done [in futex_nto1_prepare() at futex.c:74]
DEBUG1: Woken up but nothing in the UST command queue [in
thread_dispatch_ust_registration() at main.c:1235]
DEBUG1: [thread] Manage application registration started [in
thread_registration_apps() at main.c:1293]
DEBUG1: Notifying applications of session daemon state: 1 [in
notify_ust_apps() at main.c:652]
DEBUG1: Got the wait shm fd 15 [in get_wait_shm() at shm.c:113]
DEBUG1: Futex wait update active 1 [in futex_wait_update() at futex.c:63]
DEBUG1: Accepting application registration [in
thread_registration_apps() at main.c:1324]
DEBUG1: [thread] Manage application started [in thread_manage_apps()
at main.c:1092]
DEBUG1: Apps thread polling on 2 fds [in thread_manage_apps() at main.c:1113]
DEBUG1: Thread manage kernel started [in thread_manage_kernel() at main.c:835]
DEBUG1: Updating kernel poll set [in update_kernel_poll() at main.c:713]
DEBUG1: Thread kernel polling on 2 fds [in thread_manage_kernel() at main.c:864]
Here is a failing one, where I eventually abort with ctrl+C
$ lttng create
Spawning a session daemon
DEBUG3: Creating LTTng run directory: /home/nao/.lttng [in
create_lttng_rundir() at main.c:4085]
DEBUG1: Client socket path /home/nao/.lttng/client-lttng-sessiond [in
main() at main.c:4355]
DEBUG1: Application socket path /home/nao/.lttng/apps-lttng-sessiond
[in main() at main.c:4356]
DEBUG1: LTTng run directory path: /home/nao/.lttng [in main() at main.c:4357]
DEBUG2: UST consumer 32 bits err path:
/home/nao/.lttng/ustconsumerd32/error [in main() at main.c:4366]
DEBUG2: UST consumer 32 bits cmd path:
/home/nao/.lttng/ustconsumerd32/command [in main() at main.c:4368]
DEBUG2: UST consumer 64 bits err path:
/home/nao/.lttng/ustconsumerd64/error [in main() at main.c:4377]
DEBUG2: UST consumer 64 bits cmd path:
/home/nao/.lttng/ustconsumerd64/command [in main() at main.c:4379]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd64
[in set_consumer_sockets() at main.c:4127]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd32
[in set_consumer_sockets() at main.c:4127]
DEBUG1: Signal handler set for SIGTERM, SIGPIPE and SIGINT [in
set_signal_handler() at main.c:4218]
DEBUG1: epoll set max size is 90348 [in compat_epoll_set_max_size() at
compat/compat-epoll.c:217]
DEBUG1: [thread] Manage client started [in thread_manage_clients() at
main.c:3627]
DEBUG1: Accepting client command ... [in thread_manage_clients() at main.c:3659]
DEBUG1: [thread] Dispatch UST command started [in
thread_dispatch_ust_registration() at main.c:1225]
DEBUG1: Futex n to 1 prepare done [in futex_nto1_prepare() at futex.c:74]
DEBUG1: Woken up but nothing in the UST command queue [in
thread_dispatch_ust_registration() at main.c:1235]
DEBUG1: [thread] Manage application registration started [in
thread_registration_apps() at main.c:1293]
DEBUG1: Notifying applications of session daemon state: 1 [in
notify_ust_apps() at main.c:652]
DEBUG1: Got the wait shm fd 15 [in get_wait_shm() at shm.c:113]
DEBUG1: Futex wait update active 1 [in futex_wait_update() at futex.c:63]
DEBUG1: Accepting application registration [in
thread_registration_apps() at main.c:1324]
DEBUG1: [thread] Manage application started [in thread_manage_apps()
at main.c:1092]
DEBUG1: Apps thread polling on 2 fds [in thread_manage_apps() at main.c:1113]
DEBUG1: Thread manage kernel started [in thread_manage_kernel() at main.c:835]
DEBUG1: Updating kernel poll set [in update_kernel_poll() at main.c:713]
DEBUG1: Thread kernel polling on 2 fds [in thread_manage_kernel() at main.c:864]
^C # here I hit ctrl+C
DEBUG1: SIGINT catched [in sighandler() at main.c:4173]
DEBUG1: Terminating all threads [in stop_threads() at main.c:407]
DEBUG1: Futex n to 1 wake done [in futex_nto1_wake() at futex.c:101]
DEBUG1: Futex n to 1 wait done [in futex_nto1_wait() at futex.c:88]
DEBUG1: Dispatch thread dying [in thread_dispatch_ust_registration()
at main.c:1275]
DEBUG1: Kernel thread dying [in thread_manage_kernel() at main.c:917]
DEBUG1: Application communication apps dying [in thread_manage_apps()
at main.c:1204]
DEBUG1: UST Registration thread dying [in thread_registration_apps()
at main.c:1406]
DEBUG1: Notifying applications of session daemon state: 0 [in
notify_ust_apps() at main.c:652]
DEBUG1: Got the wait shm fd 9 [in get_wait_shm() at shm.c:113]
DEBUG1: Futex wait update active 0 [in futex_wait_update() at futex.c:63]
DEBUG1: Client thread dying [in thread_manage_clients() at main.c:3771]
DEBUG1: Clean command context structure [in clean_command_ctx() at main.c:499]
DEBUG1: Cleaning up [in cleanup() at main.c:427]
DEBUG1: Removing /home/nao/.lttng directory [in cleanup() at main.c:429]
DEBUG1: Cleaning up all session [in cleanup() at main.c:442]
DEBUG1: Closing all UST sockets [in cleanup() at main.c:457]
DEBUG2: UST app cleaning registered apps hash table [in
ust_app_clean_list() at ust-app.c:1439]
DEBUG1: *** assert failed :-) *** ==> Matthew, BEET driven development
works! [in cleanup() at main.c:475]
Here another failing one with strace
$ strace lttng create
execve("/usr/bin/lttng", ["lttng", "create"], [/* 24 vars */]) = 0
brk(0) = 0x8056000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f3b000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43959, ...}) = 0
mmap2(NULL, 43959, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f30000
close(3) = 0
open("/lib/tls/i586/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/lib/tls/i586", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/lib/tls/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/tls", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/lib/i586/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/lib/i586", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/lib/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
stat64("/lib", {st_mode=S_IFDIR|0755, st_size=5120, ...}) = 0
open("/usr/lib/tls/i586/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/usr/lib/tls/i586", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/tls", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/usr/lib/i586/liblttngctl.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/usr/lib/i586", 0xbf9cece4) = -1 ENOENT (No such file or directory)
open("/usr/lib/liblttngctl.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0@\25\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=51885, ...}) = 0
mmap2(NULL, 24808, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f29000
mmap2(0xb7f2d000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7f2d000
mmap2(0xb7f2f000, 232, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7f2f000
close(3) = 0
open("/lib/liblttng-ust-ctl.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib/liblttng-ust-ctl.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p4\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=88024, ...}) = 0
mmap2(NULL, 86668, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f13000
mmap2(0xb7f27000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7f27000
close(3) = 0
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\30\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=30640, ...}) = 0
mmap2(NULL, 33364, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f0a000
mmap2(0xb7f11000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb7f11000
close(3) = 0
open("/lib/liburcu-bp.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/liburcu-bp.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\27\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=17856, ...}) = 0
mmap2(NULL, 20964, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f04000
mmap2(0xb7f08000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7f08000
close(3) = 0
open("/lib/liburcu-common.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/usr/lib/liburcu-common.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\7\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=5352, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f03000
mmap2(NULL, 8232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7f00000
mmap2(0xb7f01000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0) = 0xb7f01000
close(3) = 0
open("/lib/libuuid.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\21\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=13964, ...}) = 0
mmap2(NULL, 16604, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7efb000
mmap2(0xb7efe000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb7efe000
close(3) = 0
open("/lib/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\n\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=9692, ...}) = 0
mmap2(NULL, 12408, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7ef7000
mmap2(0xb7ef9000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7ef9000
close(3) = 0
open("/usr/lib/libpopt.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\36\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38800, ...}) = 0
mmap2(NULL, 41600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7eec000
mmap2(0xb7ef5000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb7ef5000
close(3) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`I\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=112300, ...}) = 0
mmap2(NULL, 94700, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7ed4000
mmap2(0xb7ee8000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb7ee8000
mmap2(0xb7eea000, 4588, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7eea000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0m\1\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1331392, ...}) = 0
mmap2(NULL, 1341736, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE,
3, 0) = 0xb7d8c000
mprotect(0xb7ecd000, 4096, PROT_NONE) = 0
mmap2(0xb7ece000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141) = 0xb7ece000
mmap2(0xb7ed1000, 10536, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ed1000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d8b000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7d8a000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d8a730,
limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb7ece000, 8192, PROT_READ) = 0
mprotect(0xb7ee8000, 4096, PROT_READ) = 0
mprotect(0xb7ef5000, 4096, PROT_READ) = 0
mprotect(0xb7ef9000, 4096, PROT_READ) = 0
mprotect(0xb7efe000, 4096, PROT_READ) = 0
mprotect(0xb7f01000, 4096, PROT_READ) = 0
mprotect(0xb7f08000, 4096, PROT_READ) = 0
mprotect(0xb7f11000, 4096, PROT_READ) = 0
mprotect(0xb7f27000, 4096, PROT_READ) = 0
mprotect(0xb7f2d000, 4096, PROT_READ) = 0
mprotect(0x8054000, 4096, PROT_READ) = 0
mprotect(0xb7f58000, 4096, PROT_READ) = 0
munmap(0xb7f30000, 43959) = 0
set_tid_address(0xb7d8a798) = 3348
set_robust_list(0xb7d8a7a0, 0xc) = 0
futex(0xbf9cf200, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbf9cf200, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1,
NULL, bf9cf210) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb7ed8370, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb7ed8830, [], SA_RESTART|SA_SIGINFO}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM_INFINITY}) = 0
uname({sys="Linux", node="nao", ...}) = 0
brk(0) = 0x8056000
brk(0x8077000) = 0x8077000
rt_sigaction(SIGCHLD, {0x804ed60, [], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x804ed60, [], 0}, NULL, 8) = 0
getuid32() = 1001
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_FILE, path="/var/run/nscd/socket"}, 110) = -1
ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=546, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f3a000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 1024) = 546
read(3, "", 1024) = 0
close(3) = 0
munmap(0xb7f3a000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43959, ...}) = 0
mmap2(NULL, 43959, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f30000
close(3) = 0
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\r\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=26348, ...}) = 0
mmap2(NULL, 29268, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7d82000
mmap2(0xb7d88000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0xb7d88000
close(3) = 0
open("/lib/libnsl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 at 1\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=75528, ...}) = 0
mmap2(NULL, 88040, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7d6c000
mmap2(0xb7d7e000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11) = 0xb7d7e000
mmap2(0xb7d80000, 6120, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7d80000
close(3) = 0
mprotect(0xb7d7e000, 4096, PROT_READ) = 0
mprotect(0xb7d88000, 4096, PROT_READ) = 0
munmap(0xb7f30000, 43959) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=43959, ...}) = 0
mmap2(NULL, 43959, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7f30000
close(3) = 0
open("/lib/libnss_nis.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0
\31\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=38452, ...}) = 0
mmap2(NULL, 37432, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7d62000
mmap2(0xb7d6a000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb7d6a000
close(3) = 0
open("/lib/libnss_files.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\31\0\0004\0\0\0"...,
512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=42516, ...}) = 0
mmap2(NULL, 45768, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3,
0) = 0xb7d56000
mmap2(0xb7d60000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb7d60000
close(3) = 0
mprotect(0xb7d60000, 4096, PROT_READ) = 0
mprotect(0xb7d6a000, 4096, PROT_READ) = 0
munmap(0xb7f30000, 43959) = 0
open("/etc/group", O_RDONLY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
_llseek(3, 0, [0], SEEK_CUR) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=490, ...}) = 0
mmap2(NULL, 490, PROT_READ, MAP_SHARED, 3, 0) = 0xb7f3a000
_llseek(3, 490, [490], SEEK_SET) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=490, ...}) = 0
munmap(0xb7f3a000, 490) = 0
close(3) = 0
access("/var/run/lttng/client-lttng-sessiond", F_OK) = -1 ENOENT (No
such file or directory)
access("/home/nao/.lttng/client-lttng-sessiond", F_OK) = -1 ENOENT (No
such file or directory)
write(2, "Spawning a session daemon\n", 26Spawning a session daemon
) = 26
clone(DEBUG3: Creating LTTng run directory: /home/nao/.lttng [in
create_lttng_rundir() at main.c:4085]
DEBUG1: Client socket path /home/nao/.lttng/client-lttng-sessiond [in
main() at main.c:4355]
DEBUG1: Application socket path /home/nao/.lttng/apps-lttng-sessiond
[in main() at main.c:4356]
DEBUG1: LTTng run directory path: /home/nao/.lttng [in main() at main.c:4357]
DEBUG2: UST consumer 32 bits err path:
/home/nao/.lttng/ustconsumerd32/error [in main() at main.c:4366]
DEBUG2: UST consumer 32 bits cmd path:
/home/nao/.lttng/ustconsumerd32/command [in main() at main.c:4368]
DEBUG2: UST consumer 64 bits err path:
/home/nao/.lttng/ustconsumerd64/error [in main() at main.c:4377]
DEBUG2: UST consumer 64 bits cmd path:
/home/nao/.lttng/ustconsumerd64/command [in main() at main.c:4379]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd64
[in set_consumer_sockets() at main.c:4127]
DEBUG2: Creating consumer directory: /home/nao/.lttng/ustconsumerd32
[in set_consumer_sockets() at main.c:4127]
DEBUG1: Signal handler set for SIGTERM, SIGPIPE and SIGINT [in
set_signal_handler() at main.c:4218]
DEBUG1: epoll set max size is 90348 [in compat_epoll_set_max_size() at
compat/compat-epoll.c:217]
DEBUG1: [thread] Manage client started [in thread_manage_clients() at
main.c:3627]
DEBUG1: Accepting client command ... [in thread_manage_clients() at main.c:3659]
DEBUG1: [thread] Dispatch UST command started [in
thread_dispatch_ust_registration() at main.c:1225]
DEBUG1: Futex n to 1 prepare done [in futex_nto1_prepare() at futex.c:74]
DEBUG1: Woken up but nothing in the UST command queue [in
thread_dispatch_ust_registration() at main.c:1235]
child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7d8a798) = 3349
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
pause(DEBUG1: [thread] Manage application registration started [in
thread_registration_apps() at main.c:1293]
DEBUG1: Notifying applications of session daemon state: 1 [in
notify_ust_apps() at main.c:652]
DEBUG1: Got the wait shm fd 15 [in get_wait_shm() at shm.c:113]
DEBUG1: Futex wait update active 1 [in futex_wait_update() at futex.c:63]
DEBUG1: Accepting application registration [in
thread_registration_apps() at main.c:1324]
DEBUG1: [thread] Manage application started [in thread_manage_apps()
at main.c:1092]
DEBUG1: Apps thread polling on 2 fds [in thread_manage_apps() at main.c:1113]
DEBUG1: Thread manage kernel started [in thread_manage_kernel() at main.c:835]
DEBUG1: Updating kernel poll set [in update_kernel_poll() at main.c:713]
DEBUG1: Thread kernel polling on 2 fds [in thread_manage_kernel() at main.c:864]
^[[B^C
DEBUG1: SIGINT catched [in sighandler() at main.c:4173]
DEBUG1: Terminating all threads [in stop_threads() at main.c:407]
DEBUG1: Futex n to 1 wait done [in futex_nto1_wait() at futex.c:88]
DEBUG1: Dispatch thread dying [in thread_dispatch_ust_registration()
at main.c:1275]
DEBUG1: Kernel thread dying [in thread_manage_kernel() at main.c:917]
DEBUG1: Application communication apps dying [in thread_manage_apps()
at main.c:1204]
DEBUG1: UST Registration thread dying [in thread_registration_apps()
at main.c:1406]
DEBUG1: Notifying applications of session daemon state: 0 [in
notify_ust_apps() at main.c:652]
DEBUG1: Got the wait shm fd 9 [in get_wait_shm() at shm.c:113]
DEBUG1: Futex wait update active 0 [in futex_wait_update() at futex.c:63]
DEBUG1: Client thread dying [in thread_manage_clients() at main.c:3771]
<unfinished ...>
DEBUG1: Futex n to 1 wake done [in futex_nto1_wake() at futex.c:101]
DEBUG1: Clean command context structure [in clean_command_ctx() at main.c:499]
DEBUG1: Cleaning up [in cleanup() at main.c:427]
DEBUG1: Removing /home/nao/.lttng directory [in cleanup() at main.c:429]
DEBUG1: Cleaning up all session [in cleanup() at main.c:442]
DEBUG1: Closing all UST sockets [in cleanup() at main.c:457]
DEBUG2: UST app cleaning registered apps hash table [in
ust_app_clean_list() at ust-app.c:1439]
DEBUG1: *** assert failed :-) *** ==> Matthew, BEET driven development
works! [in cleanup() at main.c:475]
I hope it is helpful
>> Moreover, having had a quick look at the lttng source code, I noticed
>> it calls lttng-sessiond without the --daemonize option. I do not
>> understand how the latter survives the former in such a case.
Any answer here?
Best regards
-- Sébastien
More information about the lttng-dev
mailing list