Project

General

Profile

Actions

Bug #89

closed

sessiond does not handle channel creation errors for UST

Added by Mathieu Desnoyers over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
02/21/2012
Due date:
% Done:

0%

Estimated time:

Description

With UST commit:

commit e52b0723a0f08966ee0913707b549235b2bce96d
Author: Mathieu Desnoyers <>
Date: Tue Feb 21 19:20:51 2012 -0500

Fix: Return -EINVAL instead of print warning if non power of 2 size/num_subbuf
Reported-by: Tan Dung Le Tran &lt;&gt;
Signed-off-by: Mathieu Desnoyers &lt;&gt;

lttng create
lttng enable-channel test -u --num-subbuf 3 # known bad number of buffers.
lttng enable-event -u -a
lttng start

./hello

segfaults lttng-sessiond. Backtrace:

#0 ustctl_create_stream (sock=19, channel_data=0x0, _stream_data=0xf040a8)
at ustctl.c:274
lum = {handle = 0, cmd = 96, u = {channel = {overwrite = 0, subbuf_size = 0,
num_subbuf = 0, switch_timer_interval = 0, read_timer_interval = 0,
output = LTTNG_UST_MMAP, padding = '\000' <repeats 287 times>}, stream = {
padding = '\000' <repeats 15 times>, u = {
padding = '\000' <repeats 287 times>}}, event = {
instrumentation = LTTNG_UST_TRACEPOINT, name = '\000' <repeats 255 times>,
loglevel_type = LTTNG_UST_LOGLEVEL_ALL, loglevel = 0,
padding = '\000' <repeats 15 times>, u = {
padding = '\000' <repeats 287 times>}}, context = {
ctx = LTTNG_UST_CONTEXT_VTID, padding = '\000' <repeats 15 times>, u = {
padding = '\000' <repeats 287 times>}}, version = {major = 0, minor = 0,
patchlevel = 0}, tracepoint = {name = '\000' <repeats 255 times>,
loglevel = 0, padding = '\000' <repeats 15 times>}}}
lur = {handle = 1407809808, cmd = 32560, ret_code = 4328272, ret_val = 0, u = {
channel = {memory_map_size = 4370524}, stream = {memory_map_size = 4370524},
version = {major = 4370524, minor = 0, patchlevel = 1498267712},
tracepoint = {
name = "\\\260B\000\000\000\000\000@\300MY0\177\000\000\003\000\000\000\000\000\000\000\357\265@\000\350\003\000\000\350\003\000\000\370\001\000\000H\346\357\000\000\000\000\000H\346\357\000\000\000\000\000\370\001\000\000\000\000\000\000 z\351S0\177\000\000+\316@\000\000\000\000\000\240\021GXi6LT \177\357\000\000\000\000\000\330\345\356\000\000\000\000\000\000\346\357\000\000\000\000\000\020`iI0\177\000\000\004\000\000\000\000\000\000\000\004\000\000\000\000\000\000\000m\231 \242*2l\226\060`iI0\177\000\000(\346\357\000\000\000\000\000\060\020\000\000\000\000\000\000\270\276EX0\177\000\000?EX0\177\000\000\000z\351S0\177\000\000 \020\000\000\000\000\000\000P\201\357\000c\000\000\000P\020\000\000\000\000\000\000\300y\351S\003\001\000\000?\310A", '\000' <repeats 13 times>..., loglevel = 4128,
padding = "\000\000\000\000`\276EX0\177\000\000`\276EX"}}}
stream_data = 0xf040d0
ret = <optimized out>
fd = <optimized out>
err = 0
func = "ustctl_create_stream"
#1 0x000000000040ecfa in ust_app_start_trace (usess=0xeee5d0, app=0xef7f20)
at ust-app.c:1958
ret = 0
iter = {iter = {node = 0xf00688, next = 0xf00e78}}
ua_sess = 0xefe600
ua_chan = 0xf00400
ustream = 0xf030a0
consumerd_fd = 0
func = "ust_app_start_trace"
#2 0x000000000040fac2 in ust_app_global_update (usess=0xeee5d0, sock=19)
at ust-app.c:2296
ret = 0
....

So it looks like a NULL channel object is still around and is being used to create a stream.


Related issues 1 (0 open1 closed)

Related to LTTng-UST - Bug #98: Segfaults with wrong number of subbuffers on channelResolvedMathieu Desnoyers02/23/2012

Actions
Actions #1

Updated by David Goulet over 12 years ago

  • Status changed from New to Confirmed
  • Priority changed from Normal to High
Actions #2

Updated by David Goulet over 12 years ago

  • Status changed from Confirmed to Resolved

This fix is primarily fix by the lttng-ust commit: 9bfc503d5a3e2b1a75fa00a32b5d9bd7ac4f4dc3

commit aeb968923d1245f4cb2be1eed2ab7b8b5eb45cf8
Author: David Goulet <>
Date: Thu Feb 23 17:30:41 2012 -0500

Fix: handling bad channel when sending to consumer
If the channel object is NULL it means that it's not created on the
tracer.
Signed-off-by: David Goulet &lt;&gt;
Actions

Also available in: Atom PDF