When bulkmode is enabled, and a batch was processed without any
failures (errors is false), the code that increments the indexSuccess
impstats counter was never reached. As fix, we obtain the numitems
first and add them to the indexSuccess impstats counter if
errors is false.
This fix may solve some of the random elasticsearch testbench failures.
closes: https://github.com/rsyslog/rsyslog/issues/4794
We have some hang conditions solely with Fedora 33, which we do not
see with other Fedora versions. As we already have f 34 inside CI, we
decide to not necessarily analyze this further but rather remove this
environment from CI.
If time permits, we still try to find the root cause, but so far we
are very sure it's not directly in rsyslog.
Graceful shutdown of Rsyslog could lead to segmentation faults when
multiple imtcp inputs are being used. That is because the rest of the
tcpsrv threads are left behind running, while their underlying objects
are being disposed by the main thread as part of the module
de-initialization.
Signed-off-by: Gabor Orosz <goro@goro.io>
kmsg is a unique device, which can recover from EPIPE errors.
The original code checked for this, but checked the return value for the libc
read call, which always returns -1 and sets the appropriate errno.
This meant that when an EPIPE error actually happened, the fd was infinitely retried. The 'for loop' was broken out of, but the readikmsg() function is repeatedly called.
Note: there is an additional bug here. The readikmsg function needs better error checking on the fd. I suspect that this was rarely an issue because /dev/kmsg goes truly invalid when the system is actually shutting down.
The fix here is to check the return value as well as the errno.
Especially as this dependency currently causes the check run to fail.
No point in trying to fix it, as it is not needed. So removing is the
most robust option.
A JSON object was created (valueObj) but not used and also not
released causing a memory leak. This was properly caused by the
initial copy&paste from serializeBatchKafkaRest.
- Also added a valgrind test for lokirest batchmode
Uncomment "--keep-debuginfo" in testcaseif stack traces
are incomplete
closes: https://github.com/rsyslog/rsyslog/issues/4766
This option is not known by older valgrind versions. As such, it causes
false positives on older platforms. As the option is not necessary
(only helpful for some border cases), we remove it and add a comment
so that it may be enabled when necessary.
- tcpsrv_etry_t was left in memory, is now freed
- Fix copy&paste error for pszLstnPortFileName init
- Free cnf_params if createInstance init fails
closes: https://github.com/rsyslog/rsyslog/issues/4646