Enabling event without filter fails with error: Not enough memory for filter bytecode
We get the following error from sessiond when enabling an event via lttng_enable_event_with_filter without a filter:
error: Not enough memory for filter bytecode
This fault was reproduced when attempting to activate a session with the following event:
When the following filter was added, the activation succeeded:
com_ericsson_cba_trace_testapp_lowtraf:TenPerSecA,TRACE_DEBUG_MODULE(10),TenPs == 1
The complete log with sessiond/consumerd running in verbose mode has been attached.
The priority has been set to critical since most of our test cases are failing due to this fault.
LTTng Build info:
CURRENT HEAD: foss/babeltrace 52105e8 (HEAD, origin/master, origin/HEAD) Adding a test which do a sequence of seek BEGIN, LAST, BEGIN, LAST
CURRENT HEAD: foss/lttng-tools b6bbed5 (HEAD, origin/master, origin/HEAD) Fix: add missing padding for UST filter
CURRENT HEAD: foss/lttng-ust a593059 (HEAD, origin/master, origin/HEAD) filter: Add missing padding
CURRENT HEAD: foss/userspace-rcu 852a17a (HEAD, origin/master, origin/HEAD) wfcqueue: Fix lock and unlock functions
Updated by Mathieu Desnoyers over 7 years ago
Please try the attached patch, but make sure you follow the API as this patch documents it. A NULL filter string will fall-back to enabling an event without filter attached. However, an empty string is considered as an invalid filter.