Project

General

Profile

Actions

Bug #723

closed

lttng-relayd did not terminate on SIGINT (Ctrl+C)

Added by Marc-Andre Laperle almost 11 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Julien Desfossez
Target version:
-
Start date:
01/21/2014
Due date:
% Done:

0%

Estimated time:

Description

Using lttng-tools 2.4 RC3
userspace-rcu-0.8.1

1. lttng-relayd -v (in a separate terminal)
2. lttng create --live 1000000 -U net://localhost
3. lttng enable-event -a -k
4. lttng start
5. Here, my viewer attached to the session, got the metadata, got the next index then hung up (killed the viewer process).
6. Ctrl+C : lttng-relayd didn't terminate

Output:

...
DEBUG1 [2782/2788]: Attach session received (in viewer_attach_session() at live.c:873)
DEBUG1 [2782/2788]: Relay viewer stream 2 not found (in live_find_viewer_stream_by_id() at live.c:1064)
DEBUG1 [2782/2788]: Relay viewer stream 3 not found (in live_find_viewer_stream_by_id() at live.c:1064)
DEBUG1 [2782/2788]: Relay viewer stream 1 not found (in live_find_viewer_stream_by_id() at live.c:1064)
DEBUG1 [2782/2788]: Sent stream 2 to viewer (in viewer_attach_session() at live.c:1039)
DEBUG1 [2782/2788]: Sent stream 3 to viewer (in viewer_attach_session() at live.c:1039)
DEBUG1 [2782/2788]: Sent stream 1 to viewer (in viewer_attach_session() at live.c:1039)
DEBUG3 [2782/2788]: Relayd live viewer worker thread polling... (in thread_worker() at live.c:1856)
DEBUG1 [2782/2788]: Relay get metadata (in viewer_get_metadata() at live.c:1520)
DEBUG1 [2782/2788]: Sent 258048 bytes of metadata for stream 1 (in viewer_get_metadata() at live.c:1609)
DEBUG1 [2782/2788]: Metadata sent (in viewer_get_metadata() at live.c:1611)
DEBUG3 [2782/2788]: Relayd live viewer worker thread polling... (in thread_worker() at live.c:1856)
DEBUG1 [2782/2788]: Viewer get next index (in viewer_get_next_index() at live.c:1158)
DEBUG1 [2782/2788]: Opening index file /home/emalape/lttng-traces/emalape-VirtualBox//auto-20140121-144010/kernel/index/channel0_1.idx in read only (in open_index() at live.c:633)
DEBUG1 [2782/2788]: Index 0for stream 2sent (in viewer_get_next_index() at live.c:1335)
DEBUG3 [2782/2788]: Relayd live viewer worker thread polling... (in thread_worker() at live.c:1856)
DEBUG1 [2782/2788]: Viewer socket 22 hung up (in thread_worker() at live.c:1922)
DEBUG1 [2782/2788]: Cleaning connection of session ID 1 (in del_connection() at live.c:1800)
DEBUG3 [2782/2788]: Relayd live viewer worker thread polling... (in thread_worker() at live.c:1856)
^CDEBUG1 [2782/2782]: SIGINT caught (in sighandler() at main.c:364)
DEBUG1 [2782/2782]: Terminating all threads (in stop_threads() at main.c:337)
DEBUG1 [2782/2782]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)
DEBUG1 [2782/2789]: Relay new viewer connection received (in thread_listener() at live.c:282)
DEBUG1 [2782/2789]: Live viewer listener thread cleanup complete (in thread_listener() at live.c:364)
DEBUG1 [2782/2789]: Terminating all live threads (in stop_threads() at live.c:128)
DEBUG1 [2782/2789]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)
DEBUG1 [2782/2786]: Relay new connection received (in relay_thread_listener() at main.c:605)
DEBUG1 [2782/2786]: Relay listener thread cleanup complete (in relay_thread_listener() at main.c:707)
DEBUG1 [2782/2786]: Terminating all threads (in stop_threads() at main.c:337)
DEBUG1 [2782/2786]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)
DEBUG1 [2782/2787]: Futex n to 1 wait done (in futex_nto1_wait() at futex.c:90)
DEBUG1 [2782/2787]: Live viewer dispatch thread dying (in thread_dispatcher() at live.c:437)
DEBUG1 [2782/2787]: Terminating all live threads (in stop_threads() at live.c:128)
DEBUG1 [2782/2787]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)
DEBUG1 [2782/2784]: Futex n to 1 wait done (in futex_nto1_wait() at futex.c:90)
DEBUG1 [2782/2784]: Dispatch thread dying (in relay_thread_dispatcher() at main.c:778)
DEBUG1 [2782/2784]: Terminating all threads (in stop_threads() at main.c:337)
DEBUG1 [2782/2784]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)
DEBUG1 [2782/2783]: Health check thread dying (in thread_manage_health() at health-relayd.c:379)
DEBUG1 [2782/2788]: Viewer worker thread cleanup complete (in thread_worker() at live.c:1987)
DEBUG1 [2782/2788]: Terminating all live threads (in stop_threads() at live.c:128)
DEBUG1 [2782/2788]: Futex n to 1 wake done (in futex_nto1_wake() at futex.c:104)

gdb back trace: (attached with Eclipse, sorry for the formatting)

lttng-relayd [2782] [cores: 1]
Thread [1] 2782 [core: 1] (Suspended : User Request)
create_thread() at /build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/pthread/createthread.c:238 0x7f904be2866b
__pthread_create_2_1() at /build/buildd/eglibc-2.17/nptl/pthread_create.c:584 0x7f904be2866b
0x0
Thread [2] 2783 [core: 1] (Suspended : Container)
sem_wait() at /build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:72 0x7f904be2df2c
0x7f904ba56950
__pthread_setschedparam() at /build/buildd/eglibc-2.17/nptl/pthread_setschedparam.c:41 0x7f904be29657
0x0
Thread [3] 2785 [core: 1] (Suspended : Container)
__lll_timedlock_wait() at /build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:265 0x7f904be2e8ad
0x1
0x0
Thread [4] 2788 [core: 1] (Suspended : Container)
sem_wait() at /build/buildd/eglibc-2.17/nptl/../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:72 0x7f904be2df2c
_IO_helper_jumps() at 0x7f904be16c00
__pthread_setschedparam() at /build/buildd/eglibc-2.17/nptl/pthread_setschedparam.c:41 0x7f904be29657
0x1
0x0
Thread [5] 2797 [core: 1] (Suspended : Container)
0x7f904bb4ce79
wait_gp() at /home/emalape/Documents/dev/sources/lttng-2.3/userspace-rcu-0.8.1/urcu.c:230 0x7f904c03eee9
wait_for_readers() at /home/emalape/Documents/dev/sources/lttng-2.3/userspace-rcu-0.8.1/urcu.c:287 0x7f904c03eee9
synchronize_rcu_memb() at /home/emalape/Documents/dev/sources/lttng-2.3/userspace-rcu-0.8.1/urcu.c:405 0x7f904c03f74b
call_rcu_thread() at /home/emalape/Documents/dev/sources/lttng-2.3/userspace-rcu-0.8.1/urcu-call-rcu-impl.h:320 0x7f904c03fbe5
__reclaim_stacks() at /build/buildd/eglibc-2.17/nptl/allocatestack.c:869 0x7f904be27182
0x367e30f39a8f62d4
0x0

Actions

Also available in: Atom PDF