Bug #1316
closed
Adding a logging "event rule matches" trigger makes the session daemon abort
Added by Philippe Proulx almost 3 years ago.
Updated over 2 years ago.
Assignee:
Francis Deslauriers
Description
To reproduce:
# lttng-sessiond -v
$ lttng add-trigger --condition=event-rule-matches --domain=python --action=notify
lttng-sessiond
exits with status 134 (aborts) while the CLI prints
Error: Failed to register trigger: No session daemon is available.
Same with --domain=jul
and --domain=log4j
.
Using LTTng-tools e80b715053eb21fe9139241be786afc2688c6795
.
The backtrace:
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7a71859 in __GI_abort () at abort.c:79
#2 0x00000000004a1eeb in event_notifier_error_accounting_register_event_notifier (trigger=0x7fffe0000f50, error_counter_index=0x7fffefffde38) at event-notifier-error-accounting.c:1075
#3 0x00000000004743e6 in setup_tracer_notifier (state=0x7fffefffe3e8, trigger=0x7fffe0000f50) at notification-thread-events.c:2606
#4 0x000000000046dacb in handle_notification_thread_command_register_trigger (state=0x7fffefffe3e8, trigger=0x7fffe0000f50, is_trigger_anonymous=false, cmd_result=0x7fffedfdd6e8) at notification-thread-events.c:2751
#5 0x000000000046d083 in handle_notification_thread_command (handle=0x601460, state=0x7fffefffe3e8) at notification-thread-events.c:3112
#6 0x00000000004687bd in thread_notification (data=0x601460) at notification-thread.c:710
#7 0x0000000000486703 in launch_thread (data=0x601550) at thread.c:66
#8 0x00007ffff7c47609 in start_thread (arg=<optimized out>) at pthread_create.c:477
#9 0x00007ffff7b6e293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
Seems to be that the error accounting event noifier code does not handle agent domain correctly:
switch (lttng_trigger_get_underlying_domain_type_restriction(trigger)) {
1068│ case LTTNG_DOMAIN_KERNEL:
1069│ state = &kernel_state;
1070│ break;
1071│ case LTTNG_DOMAIN_UST:
1072│ state = &ust_state;
1073│ break;
1074│ default:
1075├───────────────> abort();
1076│ }
Should probably fallthrough LTTNG_DOMAIN_UST for LTTNG_DOMAIN_PYTHON, LTTNG_DOMAIN_JUL and LTTNG_DOMAIN_LOG4J.
Francis Deslauriers should have a stronger opinion here.
- Assignee set to Francis Deslauriers
- Status changed from New to Resolved
Also available in: Atom
PDF