This causes a segfault. It happens whenever an object state larger
than 4095 byte is persisted. Then, incorrectly a try to rollover to
a new state file is tried, which will lead to a division by zero
as the necessary variables for this operation are not set because we
are NOT in circular mode.
This problem can happen wherever state files are written. It has been
experienced with imfile and queue files.
Many thanks to github user mostolog for his help in reproducing the
issue, which was very important to finally nail down this long-standing
bug.
closes https://github.com/rsyslog/rsyslog/issues/1239
closes https://github.com/rsyslog/rsyslog/issues/1162
closes https://github.com/rsyslog/rsyslog/issues/1074
Function computeBaseUrl may modify its serverParam parameter, but
this may contain the constant string "localhost". Depending on the
platform, this can lead to a segfault.
Noticed while working on compiler warnings, not seen in practice.
closes https://github.com/rsyslog/rsyslog/issues/1233
This is only triggered if we do not get memory to do proper escaping,
so this code is unlikely to be executed. However, we think that
forwards slash is a better susbstitute for backslash than is the
single quote char.
commit 27af112637b47fd80c9ffb80565e61e049b88774 tried to fix
json encoding, but introduced an invalid predicate check that
lead to no encoding at all.
see also https://github.com/rsyslog/rsyslog/pull/1216
When previous signing failed, the newly created ksisig file is empty.
This has been fixed now. However if a logfile previously existed, the signature
verification process with fail because signatures for the loglines before
are missing. This problem needs to be evaluated in another issue.
closes https://github.com/rsyslog/rsyslog/issues/1206
We should provide a vehicle to set environment variables via the
config file. This is most importantly for things like HTTP_PROXY.
Currently, to do this system startup files need to be modified,
which is cumbersome and different from platform to platform.
closes https://github.com/rsyslog/rsyslog/issues/1209
Changing server parameter to accept an array of servers/uris and port to
defaultPort if not specified on a given uri. Adding dedicated curl handle
for checkConn and refactoring the curl setup a bit, using ES health check
with timeout. Added checkConnFailure stat counting and HA test
On non-systemd journal systems, rsyslog messages generated from the
same instance that reads the system log socket are ignored by default.
This is because imuxsock by default ignores messages from its own
process. This makes sense if messages are internally processed,
but does not make sense if the shall go via the syslog call.
This is a longer standing issue, but became more important starting
with 8.21, which logs to syslog by default.
closes https://github.com/rsyslog/rsyslog/issues/1194
When we log internal messages to syslog (the default starting with 8.21),
early error messages can result in rsyslogd hanging, as well as everything
else that wants to log hanging.
This is the result of deadlock: rsyslog tries to write to the log socket,
which blocks but can't be unblocked as rsyslog processing would need to
advance to do so. Interestingly, this only happens occasionally (even
though the startup sequence is deterministic at this point), so it is
hard to diagnose. Also, not all platforms seem to be affected. Platforms
with systemd journal will never run into a deadlock (as journal in this
case reads the system log socket).
The root cause is that for internal messages we maintain a queue for
such early messages and emit them only after full startup. Similar code
is missing when writing to the log socket. The full code has been
restructured so that this condition is obeyed under all conditions.
closes https://github.com/rsyslog/rsyslog/issues/1188