Remove the use sizeof(char) or sizeof(uchar) in calculations for memory
allocation or string length. There are no known platforms for which
sizeof(char) or sizeof(uchar) is not 1, and c99 has defined sizeof(char)
to be 1 (section 6.5.3.4 of c99).
(unreleased code)
The commit used debug coding, when --enable-rtinst was given, that
is not available in these functions (requires DEFiRet macro). That is
an old debug system which we need to reconsider anyways. So just do
not use it here.
The root cause of this problem was that the suspended state was
checked at the wrong spot. The state needs to be checked when
enqueueing, not on the consumer side -- because when we run on
an action queue, the state is always lost on the consumer side.
closes https://github.com/rsyslog/rsyslog/issues/375
The default name generated for an action references a global counter
instead of the action-specific number. In practice this means that the
number in the name will be greater by at least one than the assined
number most of the time.
NB: The code generating various action-related messages is using the
action name inconsistently; sometimes the generated name is used,
sometimes the action number is used, thus producing "action N" or
"action N+1" identifiers at different locations in the code.
This is not required for 'call <ruleset>' statements, because they already copy message.
As of now, this is relevant when foreach feeds messages to an async-action.
This implements some plumbing to keep track of the wrkr data
pointers so that they are easily enough accessible during HUP
processing.
see also https://github.com/rsyslog/rsyslog/issues/281
When an action is suspended, rsyslog's memory consumption continues
to grow. On very busy systems, this can lead to system stability
errors as it is possible that rsyslog allocates too much memory.
The root cause of this issue is the invalid management of a string
cache index, which is reset to the beginning in the wrong function,
one that is not reached when suspended. This in turn leads to
continous increase of the cache.
This fix moves the reset to the proper location.
Note that this problem was not detectable by our valgrind tests
because proper cleanup was done on rsyslog termination (but only
then).
closes https://github.com/rsyslog/rsyslog/issues/253
This was due to the fact that the action module only preserved and
processed the last set passing mode. Note that this was not a problem
for the plugins provided by the rsyslog git: none of them uses different
passing modes.
Thanks to Tomas Heinrich for providing a very detailled bug report.
This was a rather complicated merge as we needed to migrate some
per-action settings (v7) to action instance settings (v8).
Conflicts:
action.c
action.h
doc/global.html
runtime/glbl.c
which makes troubleshooting a bit easier. Note that we cannot output all
the config details (like destination etc) as this would require much more
elaborate code changes, which we at least do not like to do in the
stable version.
Could lead to outputs not properly wirting messages. At least
omelasticsearch did not write anything to the database due to this bug.
See: https://github.com/rsyslog/rsyslog/issues/10
Thanks to Radu Gheorghe for reporting the issue.