11933 Commits

Author SHA1 Message Date
Rainer Gerhards
006523aeb7
Merge pull request #2343 from rgerhards/i2325b
testbench: temporarily disable another imfile tests
2018-01-03 11:58:54 +01:00
Jan Gerhards
58f4b1a22b cfsysline: se new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2018-01-03 11:08:40 +01:00
Jan Gerhards
b8bb66eb81 imfile: add sortfiles parameter
if set, files will be input in a sorted order

closes https://github.com/rsyslog/rsyslog/issues/1489
2018-01-03 11:00:25 +01:00
Rainer Gerhards
f049dd4122
Merge pull request #2338 from rgerhards/fix-pidfile-unlink
core: pidfile was not deleted upon shutdown
2018-01-03 10:56:50 +01:00
Rainer Gerhards
a33a6aee89
Merge pull request #2342 from rsyslog/portante-patch-1
Update imfile.c
2018-01-03 10:56:35 +01:00
Rainer Gerhards
03531cb4ab testbench: temporarily disable another imfile tests
this is known to fail due to known bug in imfile (which
will be worked on soon).

Thanks to whissi for mentioning this test.

see also https://github.com/rsyslog/rsyslog/issues/2325
2018-01-03 09:34:44 +01:00
Peter Portante
eba65ad483
Update imfile.c 2018-01-02 23:31:47 -05:00
baya
57bde72767 traling spaces removed 2018-01-02 21:56:54 +02:00
Rainer Gerhards
0dcfb870a5 core: pidfile was not deleted upon shutdown
this is a regeresson from recent commit 159b37afc881, bug was never
released
2018-01-02 09:02:13 +01:00
Rainer Gerhards
88d9ba1fff maintain ChangeLog 2018-01-02 08:59:22 +01:00
Rainer Gerhards
259e9b12c4
Merge pull request #2337 from rgerhards/i2336
omelasticsearch: better error messages and mild refactoring
2018-01-02 08:56:46 +01:00
Rainer Gerhards
472c736000 maintain ChangeLog 2018-01-01 18:31:55 +01:00
Rainer Gerhards
eac214eb0b
Merge pull request #2334 from rgerhards/i2314
omkafka: expose operational status to user where useful
2018-01-01 18:30:02 +01:00
Rainer Gerhards
3acf848db1 omelasticsearch bugfix: operational error messages not passed to user
closes https://github.com/rsyslog/rsyslog/issues/2336
2018-01-01 18:28:02 +01:00
Rainer Gerhards
92ea253d4e omelasticsearch: theoretical NULL pointer access
commit 0fbe873438e introduced an unchecked realloc, which under
extreme conditions (total out-of-memory condition) could lead to
a NULL pointer access. This commit fixes the issue be avoiding the
need for realloc() in the first place.

Note that commit 0fbe873438e was merged today, so there is no
problem in any released code.
2018-01-01 18:13:52 +01:00
Rainer Gerhards
05ca64c368 omelasticsearch: code style cleanup, minor compile-time hardening 2018-01-01 18:06:57 +01:00
Rainer Gerhards
fb730fed9c maintain ChangeLog 2018-01-01 18:00:39 +01:00
Rainer Gerhards
c6f26e9d3d
Merge pull request #2306 from bayaro/master
omelasticsearch: add eol to every elastic response for error file
2018-01-01 17:58:34 +01:00
Rainer Gerhards
37ad53b177 omkafka: expose operational status to user where useful
omkafka emits many useful operational status messages only to the debug
log. After careful review, we have exposed many of these as user error
and warning message (ex: librdkafka queue full, so user knows why we
suspend the plugin temporarily). This may have made the module too
chatty. If so, one can always filter out messages via configuration. And
if we really went overboard, we can undo those parts with the next
release. So IMHO it's better to give a bit more than less, as this
definitely eases troubleshooting for users.

closes https://github.com/rsyslog/rsyslog/issues/2314
2018-01-01 13:58:50 +01:00
Rainer Gerhards
828a81aa71 maintain ChangeLog 2018-01-01 11:51:19 +01:00
Rainer Gerhards
bb6b55a3ad
Merge pull request #2331 from rgerhards/i1993
core/cstr: stringbuf.c: cstrGetSzStrNoNULL shall not modify buffer
2018-01-01 11:47:23 +01:00
Rainer Gerhards
630d06e0f7 maintain ChangeLog 2018-01-01 10:27:43 +01:00
Rainer Gerhards
b9b475bb8a
Merge pull request #2329 from rgerhards/i1517
impstats: fix invalid counter definitions for getrusage() reporting
2018-01-01 10:26:33 +01:00
Rainer Gerhards
e2e2821996
Merge pull request #2333 from rgerhards/q-shutdown
core: improve queue status reporting on shutdown
2018-01-01 10:22:10 +01:00
Rainer Gerhards
b83647fc97 testbench: try to provide minimal locaction info on aborts
While we try to keep the testbench output brief, we try to do a single
stacktrace if we find a core file.
2017-12-31 18:31:02 +01:00
Rainer Gerhards
6a190552d2 core/cstr: stringbuf.c: cstrGetSzStrNoNULL shall not modify buffer
The currently done buffer modification (add of '\0') is bad, especially when
multiple threads access the same string. It is not really an issue that needs
to be urgently fixed, as always the same data is written. However, among others,
it will pollute the thread debugger and as such prevent more elaborate automatted
tests.

closes https://github.com/rsyslog/rsyslog/issues/1993
2017-12-31 18:30:58 +01:00
Rainer Gerhards
04bd333593 core: improve queue status reporting on shutdown
The last commit (yesterday) did not properly convey when we actually
needed to cancel a thread. This commit corrects this and also
provides better information on the actual cancel operation and
some tipps for the user on how to solve it (timeout mentioned).
2017-12-31 17:30:58 +01:00
Rainer Gerhards
48c248d626 impstats: fix invalid counter definitions for getrusage() reporting
some of the counters were defined as  int (32 bit) vs. intctr_t (64 bit).
On some platforms "long" seems to be 64bit, and getrusage() provides
what we store as int via long. So this caused truncation and/or overflow.
This had undefined effects. Most often, everything worked fine
for values smaller than 2^31 but sometimes we got negative values.

closes https://github.com/rsyslog/rsyslog/issues/1517
2017-12-31 17:12:51 +01:00
Rainer Gerhards
5522d7add7 maintain ChangeLog 2017-12-31 10:39:48 +01:00
Rainer Gerhards
2ef72e3556
Merge pull request #2330 from jgerhards/errmsg-gss-misc
gss-misc: use new errmsg interface
2017-12-31 10:39:15 +01:00
Rainer Gerhards
046ce2ac82
Merge pull request #2328 from rgerhards/better-q-shutdown-msgs
core/queue: emit better status messages at rsyslog shutdown
2017-12-31 10:37:32 +01:00
Rainer Gerhards
020f063ef7 maintain ChangeLog 2017-12-30 17:32:25 +01:00
Rainer Gerhards
79eb210891
Merge pull request #2322 from rgerhards/travis-reenable-statan
travis: reenable static analyzer
2017-12-30 17:31:39 +01:00
Rainer Gerhards
8aea9a2b3a
Merge pull request #2326 from rgerhards/i2046
action bugfix: bHadAutoCommit handled in thread-unsafe way
2017-12-30 17:28:38 +01:00
Rainer Gerhards
838794e981 maintain ChangeLog 2017-12-30 17:26:32 +01:00
Rainer Gerhards
49e13d5555 core/queue: emit better status messages at rsyslog shutdown
this helps to diagnose issue - unfortunately we need more
work to ensure that the messages always make it to the user. This
is a start and hopefully useful at least for the testbench, possibly
more.
2017-12-30 17:08:34 +01:00
Rainer Gerhards
f679ac6fd2
Merge pull request #2317 from rgerhards/i2313alt
omkafka: refactor and fixes
2017-12-30 17:08:18 +01:00
Jan Gerhards
43da189d89 gss-misc: use new errmsg interface
see also https://github.com/rsyslog/rsyslog/issues/1684
2017-12-30 16:28:17 +01:00
Rainer Gerhards
7dae2763e2
Merge pull request #2324 from rgerhards/disable-imfile-tests
testbench: TEMPORARILY disable tests to permit "normal" CI runs
2017-12-30 15:01:33 +01:00
Rainer Gerhards
06b3bbac0b Travis: run static analyzer only once
The previous settings did not make much sense (same set of source
files checked) and also made us violate our Travis permitted runtime.
So rather than splitting the test into 2 VMs, we just remove one of
the static analyzer runs.
2017-12-30 12:46:45 +01:00
Rainer Gerhards
0fcc9dc609 travis: reenable static analyzer
LLVM has changed packaging structure, this fix adapts to it. So we
now have scan-build-5.0 again.
2017-12-30 12:46:45 +01:00
Rainer Gerhards
ce1f36861d action bugfix: bHadAutoCommit handled in thread-unsafe way
This internal state was improperly handled and most probably caused
(hard to see) issues when action instances were run on multiple worker
threads. It looks like the state variable was forgotten to move over
to worker state when action workers were introduced. This patch
fixes that.

closes https://github.com/rsyslog/rsyslog/issues/2046
2017-12-30 12:41:25 +01:00
Rainer Gerhards
0fb47e346c testbench: TEMPORARILY disable tests to permit "normal" CI runs
... because we know they sometimes fail due to a confirmed bug
inside imfile. These need to be re-enabled once the bug is fixed.

see also https://github.com/rsyslog/rsyslog/issues/2271
2017-12-30 12:25:28 +01:00
Rainer Gerhards
a872d1fc73 testbench/kafka: increase queue timeouts
on slow testbench machines, we may cancel processing where this is not
desired. Most importantly, this could lead to small memorey leaks
due to the thread cancellation (which are then expected!) that then
lead to false test failures.
2017-12-30 10:58:14 +01:00
Rainer Gerhards
8956f35841 omkafka: fix multithreading
omkafka has several issue if multiple worker instances are used. This commit
actually make the module use a single worker thread at max. Reasoning:
Librdkafka creates background threads itself. So omkafka basically needs to move
memory buffers over to librdkafka, which then does the heavy hauling. As such, we
think that it is best to run max one wrkr instance of omkafka -- otherwise we just
get additional locking (contention) overhead without any real gain. As such,
we use a global mutex for doAction which ensures only one worker can be active
at any given time. That mutex is also used to guard utility functions (like
tryResume) which may also be accessed by multiple workers in parallel.
Note: shall this method be changed, the kafka connection/suspension handling needs
to be refactored. The current code assumes that all workers share state information
including librdkafka handles.

closes https://github.com/rsyslog/rsyslog/issues/2313
2017-12-30 10:58:14 +01:00
Rainer Gerhards
c9543c6543 omkafka: fix potential memory leak
if kafka produce fails when resubmitting messages, the message object
is duplicated. This potentially leads to a mem leak or message duplication
(not fully checked yet).
2017-12-30 10:58:14 +01:00
Rainer Gerhards
02761dd0d8 testbench: clean up "normal" error message in kafka test plumbing
The error message regularly occurs if no kafka/zk instance is running,
which should be the case at start of test. However, the message
tends to make think reviewers that it is a real error. So we now
hide it.
2017-12-30 10:58:14 +01:00
Rainer Gerhards
7c4ecaf07a Merge branch 'libczmq-again' 2017-12-30 10:57:24 +01:00
Rainer Gerhards
ce77f03891 maintain ChangeLog 2017-12-30 10:38:36 +01:00
Rainer Gerhards
95c1e8c184
Merge pull request #2305 from jgerhards/i1625
omhiredis: add option to use RPUSH instead of LPUSH
2017-12-30 10:33:35 +01:00