Project

General

Profile

Actions

Bug #542

closed

session daemon segfaults on ustctl_duplicate_ust_object_data()

Added by David Goulet almost 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Target version:
Start date:
05/22/2013
Due date:
% Done:

100%

Estimated time:

Description

This can be reproduce by running the "test_multi_sessions_per_uid_1app" in my lttng-tools development repository:
git://github.com/dgoulet/lttng-tools-dev.git

Each single time, the "ok 1369 - Enable channel channel0 per UID for session stress-5" event triggers the segfault.

Program terminated with signal 11, Segmentation fault.
#0 ustctl_duplicate_ust_object_data (dest=dest@entry=0x259edd8, src=0x0) at ustctl.c:800
800 if (src->handle != -1) {
(gdb) bt full
#0 ustctl_duplicate_ust_object_data (dest=dest@entry=0x259edd8, src=0x0) at ustctl.c:800
obj = 0x259bfe0
ret = <optimized out>
func = "ustctl_duplicate_ust_object_data"
#1 0x00000000004189b6 in duplicate_channel_object (ua_chan=0x259ecb0, reg_chan=0x259bfe0)
at ust-app.c:2000
ret = 0
#2 send_channel_uid_to_ust (reg_chan=reg_chan@entry=0x259bfe0, app=app@entry=0x7f72fc002b70,
ua_sess=ua_sess@entry=0x259d6d0, ua_chan=ua_chan@entry=0x259ecb0) at ust-app.c:2161
ret = <optimized out>
reg_stream = <optimized out>
PRETTY_FUNCTION = "send_channel_uid_to_ust"
func = "send_channel_uid_to_ust"
#3 0x0000000000419668 in create_channel_per_uid (ua_chan=0x259ecb0, ua_sess=0x259d6d0,
usess=<optimized out>, app=0x7f72fc002b70) at ust-app.c:2263
ret = <optimized out>
reg_uid = <optimized out>
reg_chan = 0x259bfe0
#4 do_create_channel (app=app@entry=0x7f72fc002b70, usess=usess@entry=0x258ab30,
ua_sess=ua_sess@entry=0x259d6d0, ua_chan=0x259ecb0) at ust-app.c:2341
ret = <optimized out>
PRETTY_FUNCTION = "do_create_channel"
#5 0x000000000041d63c in create_ust_app_channel (usess=0x258ab30, app=0x7f72fc002b70, uchan=0x258e270,
ua_sess=0x259d6d0, type=<optimized out>, ua_chanp=<optimized out>) at ust-app.c:2414
ret = 0
iter = {iter = {node = 0x0, next = 0x0}}
ua_chan_node = <optimized out>
ua_chan = <optimized out>
type = LTTNG_UST_CHAN_PER_CPU
ua_chanp = 0x0
#6 ust_app_create_channel_glb (usess=usess@entry=0x258ab30, uchan=uchan@entry=0x258e270)
at ust-app.c:3426
ret = <optimized out>
created = 1
iter = {iter = {node = 0x7f72fc002be8, next = 0x2462f30}}
app = 0x7f72fc002b70
ua_sess = 0x259d6d0
PRETTY_FUNCTION = "ust_app_create_channel_glb"
func = "ust_app_create_channel_glb"
#7 0x000000000040affc in channel_ust_create (usess=usess@entry=0x258ab30, attr=<optimized out>,
attr@entry=0x24716ec, type=LTTNG_BUFFER_PER_UID) at channel.c:344
ret = 10
uchan = 0x258e270
defattr = 0x0
PRETTY_FUNCTION = "channel_ust_create"
func = "channel_ust_create"
#8 0x0000000000411856 in cmd_enable_channel (session=0x258a470, domain=0x24715b8, attr=0x24716ec,
wpipe=-1) at cmd.c:901
uchan = <optimized out>
ret = <optimized out>
usess = 0x258ab30
chan_ht = <optimized out>
PRETTY_FUNCTION = "cmd_enable_channel"
func = "cmd_enable_channel"
#9 0x0000000000426526 in process_client_msg (sock_error=<synthetic pointer>, sock=22, cmd_ctx=0x25aace0)
at main.c:2694
ret = <optimized out>
need_tracing_session = 1
need_domain = <optimized out>
#10 thread_manage_clients (data=<optimized out>) at main.c:3463
sock = 22
ret = <optimized out>
i = <optimized out>
pollfd = <optimized out>
err = -1
sock_error = 0
revents = <optimized out>
nb_fd = <optimized out>
cmd_ctx = 0x25aace0
events = {epfd = 15, nb_fd = 2, alloc_size = 2, init_size = 2, events = 0x23fb620}
func = "thread_manage_clients"


Files

gdb-backtrace.log (3.4 KB) gdb-backtrace.log David Goulet, 05/22/2013 04:51 PM
gdb_printout.log (23.7 KB) gdb_printout.log gdb printout Tan le tran, 05/23/2013 11:47 AM
Actions #1

Updated by David Goulet almost 11 years ago

For a more pleasant read of the gdb backtrace: http://pastebin.com/Qr2QkpER

Actions #2

Updated by David Goulet almost 11 years ago

I've attached the gdb backtrace compiled with -O0.

Also, we see an error message just before it segfaults:

libringbuffer[21668/21673]: Error: shm_open: Too many open files (in _shm_object_table_alloc_shm() at shm.c:157)
Segfault...

Actions #3

Updated by Tan le tran almost 11 years ago

We have observed the same coredump while running our overnight test.
gdb printout is enclosed.

Commit used: ============
userspace-rcu : 56e676d (HEAD, origin/stable-0.7) Document: rculfhash destroy and resize side-effect in 0.7
lttng-ust : 996aead (HEAD, origin/master, origin/HEAD) Add parameter -f to ...
lttng-tools : dae1096 (HEAD, origin/master, origin/HEAD, Apply_Patch536_try1) Fix: use lttng pipe..
(with patch536 loaded on top)

Actions #4

Updated by David Goulet almost 11 years ago

  • Status changed from Confirmed to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF