this also requires changes to some tooling.
Also, when assigning a dynamic port in tcpserver, the same port
number is used for IPv4 and IPv6.
Also removing some left-over debug output.
closes https://github.com/rsyslog/rsyslog/issues/2987
data type was not correctly re-cast after atomic operation
Also added a couple of code attributes to aid compiler finding bugs.
Detected by Coverity scan, CID 185416
This is not a real problem because imdiag intentionally does multiple
tries to validate predicate validity. However, this is reported in
clang thread sanitizer and so we need to fix it.
previous code could deadlock if internal messages were issued
inside queue processing code, which effectively limited
error-reporting capabilities. This change makes it possible
to call error messages from any part of the code at any time.
This comes at the price of slightly delayed message output.
- now omprog kills the program by issuing TERM signal, but it can wait indefinitely when TERM is ignored (will fix this in a separate commit)
- omkafka was complaining of deprecated-fn-use in 0.9.x versions of librdkafka, which is now fixed
- fixed an incorrect comment in imdiag
Previously, we just did three checks with some longer waits in between.
This was insufficient to avoid races, as we saw in practice. Now we
have slightly changed that approach and require 10 times in a row
an empty queue to deduce it atcually is empty.
closes https://github.com/rsyslog/rsyslog/issues/688
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).
- vg-test caught a minor issue in impstats (fixed)
- placeholder created for other dynstats tests
- a new assertion in diag.sh which allows extracting a particular column and expecting sum-up to match given value
- imdiag supports injecting litteral messages now (test can send a fully formed syslog message through imdiag, its a backward compatible change in protocol, allows for richer things to be build while being fully backward compatible)
so far, we checked only the main queue size to become zero, ignoring
the sizes of action queues. For some tests, this caused racieness and
unreliability. Now, we check all queues. This should make matters
much more stable.
This lead to a "module not found" error message instead of
the to-be-expected "module does not support new style" error message.
That invalid error message could be quite misleading and actually stop
people from addressing the real problem (aka "go nuts" ;))
the imdiag implementation of "queue empty" was a bit racy, which
sometimes lead to too-early termination of rsyslogd and thus some
small memory leaks (which in turn showed up as problems during
make check). The current architecture is not able to 100% guard against
this, but the probleme probability has been reduced (and it showed to
improve in practice).