Project

General

Profile

Actions

Bug #1000

closed

lttng list segfault with -k -a

Added by Julien Desfossez about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/07/2016
Due date:
% Done:

0%

Estimated time:

Description

With the current master, the number of events returned by list_lttng_kernel_events does not match what has been allocated for *events when using -k -a.
It allocates 2 events and returns a list of 343 events enabled, so when it tries to iterate on the list it segfaults.

lttng create s
lttng enable-event -k -a -s s
lttng start s
lttng list s

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b9ff50 in lttng_list_events (handle=0x653c10, channel_name=0x653e60 "channel0",
events=0x7fffffffdd18) at lttng-ctl.c:1777
1777 extended_at += ext_header->filter_len;
(gdb) bt full
#0 0x00007ffff7b9ff50 in lttng_list_events (handle=0x653c10, channel_name=0x653e60 "channel0",
events=0x7fffffffdd18) at lttng-ctl.c:1777
ext_header = 0x684d20
event = 0x6540f0
ret = 342
lsm = {cmd_type = 12, session = {name = "s", '\000' <repeats 253 times>,
path = '\000' <repeats 4095 times>, enabled = 0, snapshot_mode = 0, live_timer_interval = 0,
padding = '\000' <repeats 11 times>}, domain = {type = LTTNG_DOMAIN_KERNEL,
buf_type = LTTNG_BUFFER_GLOBAL, padding = '\000' <repeats 11 times>, attr = {pid = 0,
exec_name = '\000' <repeats 254 times>, padding = '\000' <repeats 287 times>}}, u = {enable = {
channel_name = "channel0", '\000' <repeats 247 times>, event = {type = LTTNG_EVENT_TRACEPOINT,
name = '\000' <repeats 255 times>, loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL, loglevel = 0,
enabled = 0, pid = 0, filter = 0 '\000', exclusion = 0 '\000', padding2 = "\000",
flags = (unknown: 0), padding = "\000\000\000", extended = {
padding = "\000\000\000\000\000\000\000", ptr = 0x0}, attr = {probe = {addr = 0, offset = 0,
symbol_name = '\000' <repeats 255 times>, padding = '\000' <repeats 15 times>}, ftrace = {
symbol_name = '\000' <repeats 255 times>, padding = '\000' <repeats 15 times>},
padding = '\000' <repeats 287 times>}}, expression_len = 0, bytecode_len = 0,
exclusion_count = 0}, disable = {channel_name = "channel0", '\000' <repeats 247 times>, event = {
type = LTTNG_EVENT_TRACEPOINT, name = '\000' <repeats 255 times>,
loglevel_type = LTTNG_EVENT_LOGLEVEL_ALL, loglevel = 0, enabled = 0, pid = 0,
filter = 0 '\000', exclusion = 0 '\000', padding2 = "\000", flags = (unknown: 0),
padding = "\000\000\000", extended = {padding = "\000\000\000\000\000\000\000", ptr = 0x0},
attr = {probe = {addr = 0, offset = 0, symbol_name = '\000' <repeats 255 times>,
padding = '\000' <repeats 15 times>}, ftrace = {symbol_name = '\000' <repeats 255 times>,
padding = '\000' <repeats 15 times>}, padding = '\000' <repeats 287 times>}},
expression_len = 0, bytecode_len = 0}, channel = {chan = {
name = "channel0", '\000' <repeats 247 times>, enabled = 0, attr = {overwrite = 0,
subbuf_size = 0, num_subbuf = 0, switch_timer_interval = 0, read_timer_interval = 0,
output = LTTNG_EVENT_SPLICE, tracefile_size = 0, tracefile_count = 0,
live_timer_interval = 0, padding = '\000' <repeats 267 times>},
padding = '\000' <repeats 15 times>}}, context = {
channel_name = "channel0", '\000' <repeats 247 times>, ctx = {ctx = LTTNG_EVENT_CONTEXT_PID,
padding = '\000' <repeats 15 times>, u = {perf_counter = {type = 0, config = 0,
name = '\000' <repeats 255 times>, padding = '\000' <repeats 15 times>}, app_ctx = {
provider_name = 0x0, ctx_name = 0x0}, padding = '\000' <repeats 287 times>}},
provider_name_len = 0, context_name_len = 0}, reg = {
path = "channel0", '\000' <repeats 4087 times>}, list = {
channel_name = "channel0", '\000' <repeats 247 times>}, calibrate = {
type = (unknown: 1851877475), padding = "nel0", '\000' <repeats 11 times>}, uri = {
size = 1851877475}, snapshot_output = {output = {id = 1851877475, max_size = 0,
name = '\000' <repeats 254 times>, ctrl_url = '\000' <repeats 4095 times>,
data_url = '\000' <repeats 4095 times>}}, snapshot_record = {wait = 1851877475, output = {
---Type <return> to continue, or q <return> to quit---
id = 812410222, max_size = 0, name = '\000' <repeats 254 times>,
ctrl_url = '\000' <repeats 4095 times>, data_url = '\000' <repeats 4095 times>}},
session_live = {nb_uri = 1851877475, timer_interval = 812410222}, save_session = {attr = {
session_name = "channel0", '\000' <repeats 246 times>,
configuration_url = '\000' <repeats 4095 times>, overwrite = 0}}, set_shm_path = {
shm_path = "channel0", '\000' <repeats 4087 times>}, pid_tracker = {pid = 1851877475}}}
cmd_header = 0x0
cmd_header_len = 4
nb_events = 342
i = 0
extended_at = 0x684d28
#1 0x000000000040c1c4 in list_events (channel_name=0x653e60 "channel0") at commands/list.c:1154
ret = 0
count = 32767
i = 8832
events = 0x6540f0
#2 0x000000000040c9d9 in list_channels (channel_name=0x0) at commands/list.c:1332
count = 1
i = 0
ret = 0
chan_found = 0
channels = 0x653e60
func = "list_channels"
#3 0x000000000040e15c in cmd_list (argc=2, argv=0x7fffffffe0b0) at commands/list.c:1978
i = 0
nb_domain = 1
opt = -1
ret = 0
session_name = 0x651410 "s"
pc = 0x6510a0
domain = {type = 0, buf_type = LTTNG_BUFFER_PER_PID, padding = '\000' <repeats 11 times>, attr = {
pid = 0, exec_name = '\000' <repeats 254 times>, padding = '\000' <repeats 287 times>}}
domains = 0x653ad0
func = "cmd_list"
#4 0x0000000000421b3d in handle_command (argc=2, argv=0x7fffffffe0b0) at lttng.c:269
i = 0
ret = 0
cmd = 0x64f760 <commands>
#5 0x0000000000421f09 in parse_args (argc=3, argv=0x7fffffffe0a8) at lttng.c:388
opt = -1
ret = 0
user = 0x7fffffffe579 "julien"
#6 0x0000000000422092 in main (argc=3, argv=0x7fffffffe0a8) at lttng.c:438
---Type <return> to continue, or q <return> to quit--

ret = 0

Actions #1

Updated by Jonathan Rajotte Julien about 8 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF