Project

General

Profile

Actions

Bug #958

closed

lttng-ust, lttng-tools sensitive to /usr/local/lib

Added by Daniel U. Thibault over 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
-
Target version:
Start date:
10/21/2015
Due date:
% Done:

0%

Estimated time:

Description

On CentOS 7 (and, if I remember correctly, on Ubuntu as well), compiling lttng-ust and lttng-tools (2.7.0-stable) using the minimal sequence of commands will appear to work, but the tracer will then fail in an obscure way.

Specifically, lttng-ust (and lttng-tools) are compiled using:

# ./bootstrap &> bootstrap.log
# ./configure &> configure.log
# make &> make.log
# make install &> install.log
# ldconfig

But then (tracing the kernel from root):

# lttng create first
Session first created.
Traces will be written in /root/lttng-traces/first-20151021-120300
# lttng enable-event -k -a
Error: Events: Kernel consumer start failed (channel channel0, session first)
Error: Command error

It is only if we run 'lttng-sessiond -vvv' that we find out why:

# lttng enable-event -k sched_switch
DEBUG1 - 13:51:26.198860 [30037/30096]: Wait for client response (in thread_manage_clients() at main.c:4362)
DEBUG1 - 13:51:26.198954 [30037/30096]: Receiving data from client ... (in thread_manage_clients() at main.c:4407)
DEBUG1 - 13:51:26.198987 [30037/30096]: Processing client command 6 (in process_client_msg() at main.c:2989)
DEBUG1 - 13:51:26.199003 [30037/30096]: Getting session second by name (in process_client_msg() at main.c:3076)
DEBUG2 - 13:51:26.199013 [30037/30096]: Trying to find session by name first (in session_find_by_name() at session.c:172)
DEBUG1 - 13:51:26.199025 [30037/30096]: Creating kernel session (in create_kernel_session() at main.c:2905)
DEBUG3 - 13:51:26.199092 [30037/30096]: Created hashtable size 4 at 0x7f0854003d30 of type 1 (in lttng_ht_new() at hashtable.c:136)
DEBUG1 - 13:51:26.199200 [30037/30096]: Kernel session created (fd: 34) (in kernel_create_session() at kernel.c:106)
DEBUG3 - 13:51:26.199217 [30037/30096]: Copying tracing session consumer output in kernel session (in copy_session_consumer() at main.c:2787)
DEBUG3 - 13:51:26.199281 [30037/30096]: Created hashtable size 4 at 0x7f08540040f0 of type 1 (in lttng_ht_new() at hashtable.c:136)
DEBUG3 - 13:51:26.199308 [30037/30096]: Copy session consumer subdir /kernel (in copy_session_consumer() at main.c:2825)
DEBUG3 - 13:51:26.199318 [30037/30096]: mkdir() recursive /root/lttng-traces/first-20151021-120300 with mode 504 for uid 0 and gid 0 (in run_as_mkdir_recursive() at runas.c:468)
DEBUG1 - 13:51:26.199348 [30037/30096]: Using run_as worker (in run_as() at runas.c:449)
DEBUG3 - 13:51:26.199414 [30037/30039]: [ht-thread] Returning from poll on 2 fds. (in thread_ht_cleanup() at ht-cleanup.c:74)
DEBUG3 - 13:51:26.199459 [30037/30039]: [ht-thread] Polling. (in thread_ht_cleanup() at ht-cleanup.c:67)
DEBUG1 - 13:51:26.200843 [30037/30096]: Spawning consumerd (in spawn_consumerd() at main.c:2494)
DEBUG2 - 13:51:26.201505 [30037/30096]: Consumer pid 30117 (in start_consumerd() at main.c:2679)
DEBUG2 - 13:51:26.201562 [30037/30096]: Spawning consumer control thread (in start_consumerd() at main.c:2682)
DEBUG3 - 13:51:26.203120 [30117/30117]: Looking for a kernel consumer at these locations: (in spawn_consumerd() at main.c:2516)
DEBUG3 - 13:51:26.203198 [30117/30117]:     1) /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at main.c:2517)
DEBUG3 - 13:51:26.203209 [30117/30117]:     2) /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at main.c:2518)
DEBUG3 - 13:51:26.203221 [30117/30117]:     3)  (in spawn_consumerd() at main.c:2519)
DEBUG3 - 13:51:26.203549 [30117/30117]: Found location #1 (in spawn_consumerd() at main.c:2521)
DEBUG1 - 13:51:26.203562 [30117/30117]: Using kernel consumer at: /usr/local/lib/lttng/libexec/lttng-consumerd (in spawn_consumerd() at main.c:2534)
lttng-consumerd: error while loading shared libraries: liburcu-common.so.4: cannot open shared object file: No such file or directory
DEBUG1 - 13:51:26.229367 [30037/30118]: [thread] Manage consumer started (in thread_manage_consumer() at main.c:1249)
Error: Condition timed out. The consumer thread was never ready. Killing it
Error: Fatal error spawning consumer control thread
DEBUG1 - 13:51:56.203692 [30037/30096]: Sending response (size: 16, retcode: Kernel consumer start failed) (in thread_manage_clients() at main.c:4456)
DEBUG1 - 13:51:56.203767 [30037/30096]: Clean command context structure (in clean_command_ctx() at main.c:829)
DEBUG1 - 13:51:56.203781 [30037/30096]: Accepting client command ... (in thread_manage_clients() at main.c:4310)

It turns out we needed to compile lttng-ust and lttng-tools using:

# ./bootstrap &> bootstrap.log
# LDFLAGS=-L/usr/local/lib ./configure &> configure.log
# make &> make.log
# make install &> install.log
# ldconfig

What is odd here is that the failure to spawn the consumer is not accompanied by a similar failure to launch other components (such as lttng-sessiond) that also depend on liburcu-common.so (and liburcu.so, etc.).

Actions

Also available in: Atom PDF