[lttng-dev] lttng create freezes sometimes
Sébastien Barthélémy
barthelemy at crans.org
Wed Jan 4 12:28:48 EST 2012
Hello all,
I'd like to report that sometimes lttng freezes while creating a session.
This is kind of sporadic, but happens almost half the times on this
target. I have not seen this behaviour on two other targets. It might
well be a cross build trick or so.
I straced a session, here is the interesting excerpt (full strace attached)
$ killall lttng-sessiond
$ strace lttng create
...
write(2, "Spawning a session daemon\n", 26Spawning a session daemon
) = 26
clone(child_stack=0,
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0xb7ef3728) = 4044
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
pause(
I'm not sure what happens. It seems to me that
1) lttng-sessiond sends SIGCHLD,
2) lttng catches the signal
3) lttng is still locked in pause()
But I may be misinterpreting all this.
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 idea on how I could further analyse this?
Cheers
-- Sebastien Barthelemy
-------------- next part --------------
$ killall lttng-sessiond
$ strace lttng create
execve("/usr/bin/lttng", ["lttng", "create"], [/* 24 vars */]) = 0
brk(0) = 0x8054000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8073000
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=47151, ...}) = 0
mmap2(NULL, 47151, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8067000
close(3) = 0
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\0P\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=17804, ...}) = 0
mmap2(NULL, 24740, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb8060000
mmap2(0xb8064000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb8064000
mmap2(0xb8066000, 164, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb8066000
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) = 0xb8055000
mmap2(0xb805e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb805e000
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) = 0xb803d000
mmap2(0xb8051000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13) = 0xb8051000
mmap2(0xb8053000, 4588, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb8053000
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) = 0xb7ef5000
mprotect(0xb8036000, 4096, PROT_NONE) = 0
mmap2(0xb8037000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x141) = 0xb8037000
mmap2(0xb803a000, 10536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb803a000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef4000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef3000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7ef36c0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb8037000, 8192, PROT_READ) = 0
mprotect(0xb8051000, 4096, PROT_READ) = 0
mprotect(0xb805e000, 4096, PROT_READ) = 0
mprotect(0xb8064000, 4096, PROT_READ) = 0
mprotect(0x8052000, 4096, PROT_READ) = 0
mprotect(0xb8090000, 4096, PROT_READ) = 0
munmap(0xb8067000, 47151) = 0
set_tid_address(0xb7ef3728) = 4043
set_robust_list(0xb7ef3730, 0xc) = 0
futex(0xbf8c1a80, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0xbf8c1a80, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, bf8c1a90) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0xb8041370, [], SA_SIGINFO}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0xb8041830, [], 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) = 0x8054000
brk(0x8075000) = 0x8075000
rt_sigaction(SIGCHLD, {0x804ddae, [], 0}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x804ddae, [], 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)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb8072000
read(3, "# /etc/nsswitch.conf:\n# $Header:"..., 1024) = 546
read(3, "", 1024) = 0
close(3) = 0
munmap(0xb8072000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=47151, ...}) = 0
mmap2(NULL, 47151, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8067000
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) = 0xb7eeb000
mmap2(0xb7ef1000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5) = 0xb7ef1000
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) = 0xb7ed5000
mmap2(0xb7ee7000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11) = 0xb7ee7000
mmap2(0xb7ee9000, 6120, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ee9000
close(3) = 0
mprotect(0xb7ee7000, 4096, PROT_READ) = 0
mprotect(0xb7ef1000, 4096, PROT_READ) = 0
munmap(0xb8067000, 47151) = 0
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=47151, ...}) = 0
mmap2(NULL, 47151, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8067000
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) = 0xb7ecb000
mmap2(0xb7ed3000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8) = 0xb7ed3000
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) = 0xb7ebf000
mmap2(0xb7ec9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x9) = 0xb7ec9000
close(3) = 0
mprotect(0xb7ec9000, 4096, PROT_READ) = 0
mprotect(0xb7ed3000, 4096, PROT_READ) = 0
munmap(0xb8067000, 47151) = 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) = 0xb8072000
_llseek(3, 490, [490], SEEK_SET) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=490, ...}) = 0
munmap(0xb8072000, 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(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb7ef3728) = 4044
--- SIGCHLD (Child exited) @ 0 (0) ---
sigreturn() = ? (mask now [])
pause(
More information about the lttng-dev
mailing list