14293 Commits

Author SHA1 Message Date
Rainer Gerhards
958488c41e
maintain ChangeLog 2019-11-01 16:20:53 +01:00
Rainer Gerhards
fb246cef83
Merge pull request #3906 from rgerhards/calloc
mmkubernetes bugfix: improper use of calloc()
2019-11-01 16:19:44 +01:00
Rainer Gerhards
8707773f10
maintain ChangeLog 2019-10-31 18:26:40 +01:00
Rainer Gerhards
45343c0985
Merge pull request #3936 from rwdalpe/i3784
#3784: set the journal data threshold to MaxMessageSize
2019-10-31 18:03:02 +01:00
Rainer Gerhards
1771f86120
maintain ChangeLog 2019-10-30 18:49:47 +01:00
Rainer Gerhards
36231cb020
Merge pull request #3882 from n2yen/improg-fix
bug fix: allow improg to handle multi-line inputs
2019-10-30 18:48:08 +01:00
Rainer Gerhards
b4e625f074
mmkubernetes bugfix: improper use of calloc()
could cause problems under extreme memory shortage - very unlikely
credits to LGTM.COM for detecting this
2019-10-30 18:46:06 +01:00
Rainer Gerhards
716f4136e8
Merge pull request #3927 from rgerhards/i3885-tb
testbench: add test for async dynafile writer
2019-10-30 18:25:51 +01:00
Rainer Gerhards
e4cb1d32eb
maintain ChangeLog 2019-10-30 17:06:45 +01:00
Rainer Gerhards
d71205e05d
Merge pull request #3937 from rgerhards/i1650
mmdblookup: fix missing space in city name
2019-10-30 17:05:59 +01:00
Rainer Gerhards
2bcd6fc1b7
maintain ChangeLog 2019-10-30 14:23:52 +01:00
Rainer Gerhards
9ca744c074
Merge pull request #3926 from rgerhards/i3833
enhancement: multithread disk queue
2019-10-30 13:22:59 +01:00
Rainer Gerhards
ae66007173
mmdblookup: fix missing space in city name
This fixes the issue that spaces in city names are dropped. However, the
fix is more or less a work-around. As it turns out, the libmaxmindb API
is not correctly used. In the somewhat longer term, we should fix this.

see also https://github.com/maxmind/libmaxminddb/issues/218
closes https://github.com/rsyslog/rsyslog/issues/1650
2019-10-30 11:00:30 +01:00
Rainer Gerhards
3b35c98578
testbench: fix issuesn regard to ElasticSearch, modernize tests
Fix some minor issue that were detected as part of other work.
2019-10-30 10:04:22 +01:00
Rainer Gerhards
e88b956e9d
core/queue: provide ability to run diskqueue on multiple threads
see also https://github.com/rsyslog/rsyslog/issues/3543
closes https://github.com/rsyslog/rsyslog/issues/3833
2019-10-30 10:04:09 +01:00
Winslow Dalpe
399fb1f9c0 #3784: set the journal data threshold to MaxMessageSize
When data is read from the journal using sd_journal_get_data it may be
truncated to a certain threshold (64K by default).

If the rsyslog MaxMessageSize is larger than the threshold, there's a
chance rsyslog will receive incomplete messages from the journal.
Empirically, this appears to happen reliably when XZ compression is
used by journald. Systems where journald uses LZ4 compression do not
appear to suffer this issue reliably--if at all.

This change sets the threshold to the MaxMessageSize when the
journal is opened.
2019-10-29 20:42:35 -07:00
Rainer Gerhards
a9445bbc5c
testbench: add test for async dynafile writer
This models a problem from practice which was pretty hard
to reproduce.

see also https://github.com/rsyslog/rsyslog/issues/3885
2019-10-25 13:11:26 +02:00
Rainer Gerhards
d8161836e0
maintain ChangeLog 2019-10-25 13:09:41 +02:00
Rainer Gerhards
9468f49011
Merge pull request #3922 from rgerhards/i3855bis
omfile bugfix: file handle leak
2019-10-25 13:06:24 +02:00
Rainer Gerhards
7a31c0bf64
Merge pull request #3928 from rgerhards/tb-python3
testbench bugfix: make python scripts use print python 2/3 compatible
2019-10-24 17:58:08 +02:00
Rainer Gerhards
08f897efb7
testbench bugfix: make python scripts use print python 2/3 compatible 2019-10-24 12:03:55 +02:00
Rainer Gerhards
19704e7095
omfile bugfix: file handle leak
The stream class does not close re-opened file descriptors.
This lead to leaking file handles and ultimately to the inability
to open any files/sockets/etc as rsyslog ran out of handles.

The bug was depending on timing. This involed different OS
thread scheduler timing as well as workload. The bug was more
common under the following conditions:

- async writing of files
- dynafiles
- not commiting file data at end of transaction

However it could be triggerred under other conditions as well.

The refactoring done in 8.1908 increased the likelyhood of
experienceing this bug. But it was not a real regression, the new
code was valid, but changed the timing so that the race was more
likely.

Thanks to Michael Biebl for reporting this bug and helping to
analyze it.

closes https://github.com/rsyslog/rsyslog/issues/3885
2019-10-24 09:23:27 +02:00
Rainer Gerhards
9bacc13caf
maintain ChangeLog 2019-10-22 09:12:04 +02:00
Rainer Gerhards
30ce1dd0e2
Merge pull request #3907 from rgerhards/calloc2
imfile bugfix: improper use of calloc()
2019-10-22 09:10:48 +02:00
Rainer Gerhards
e1e904c677
Merge pull request #3916 from rgerhards/calloc4
TLS driver bugfix: improper use of calloc()
2019-10-22 09:09:47 +02:00
Rainer Gerhards
d8246f5fa0
Merge pull request #3908 from rgerhards/calloc3
imuxsock  bugfix: improper use of calloc()
2019-10-22 09:08:32 +02:00
Rainer Gerhards
5fe7ca92ee
TLS driver bugfix: improper use of calloc()
can cause problems under extreme memory shortage - very unlikely
credits to LGTM.COM for detecting this
2019-10-21 12:21:11 +02:00
Rainer Gerhards
f11c651e63
imuxsock bugfix: improper use of calloc()
can cause problems under extreme memory shortage - very unlikely
credits to LGTM.COM for detecting this
2019-10-17 13:19:09 +02:00
Rainer Gerhards
3f72e8c314
imfile bugfix: improper use of calloc()
could cause problems under extreme memory shortage - very unlikely
credits to LGTM.COM for detecting this
2019-10-17 12:08:40 +02:00
Rainer Gerhards
0dc9265e18
maintain ChangeLog 2019-10-17 11:50:13 +02:00
Rainer Gerhards
80f8800788
Merge pull request #3905 from rgerhards/i3904
build system bugfix: incorrect default in ./configure help text
2019-10-17 11:49:15 +02:00
Rainer Gerhards
0626c7049f
Merge pull request #3903 from rgerhards/calloc-mmkubernetes
mmkubernetes bugfix: improper use of calloc()
2019-10-17 11:06:28 +02:00
Rainer Gerhards
84fd75df54
build system bugfix: incorrect default in ./configure help text
Thank to Michael Biebl for pointing this out.

closes https://github.com/rsyslog/rsyslog/issues/3904
2019-10-17 08:58:47 +02:00
Rainer Gerhards
1aea234ac7
mmkubernetes bugfix: improper use of calloc()
can cause problems under extreme memory shortage - very unlikely

credits to LGTM.COM for detecting this
2019-10-16 17:39:42 +02:00
Rainer Gerhards
72e069a8a6
maintain ChangeLog 2019-10-16 17:20:53 +02:00
Rainer Gerhards
e47124959a
Merge pull request #3897 from rgerhards/daq-batch
core queue bugfix: propagate batch size to DA queue
2019-10-16 17:19:32 +02:00
Rainer Gerhards
a1c92c1c9c
Merge pull request #3900 from rgerhards/diskq-multi-file-del
core queue bugfix: handle multi-queue-file delete correctly
2019-10-16 17:15:42 +02:00
Rainer Gerhards
bdb2939f59
Merge pull request #3899 from rgerhards/tb-gzipwr_large
testbench: fix unreliable gzipwrite test
2019-10-16 17:13:48 +02:00
Rainer Gerhards
8586f48d2a
Merge pull request #3902 from rgerhards/fix-regression-3878
imjournal: fix regression
2019-10-16 15:05:15 +02:00
Rainer Gerhards
47c658661a
imjournal: fix regression
commit 78976a9bc059 introduced a regression that caused writing
the journal state file to fail. This happens when the state file
is given as relative file name and the working directory is also
a relative path. This situation is very uncommon. So most deployments
will never experience it. We discovered the issue during CI runs
where the trigger condition is given. Note that it also takes
multiple times of loading the journal to actually see the bug.

see also https://github.com/rsyslog/rsyslog/pull/3878
2019-10-16 13:09:01 +02:00
Rainer Gerhards
103a44263d
core queue bugfix: handle multi-queue-file delete correctly
Rsyslog may leave some dangling disk queue files under the following
conditions:

- batch sizes and/or messages are large
- queue files are comparatively small
- a batch spans more than two queue files (from n to n+m with m>1)

In this case, queue files n+1 to (n+m-1) are not deleted. This can
lead to problems when the queue is re-opened again. In extreme cases
this can also lead to stalled processing when the max disk space is
used up by such left-over queue files.

Using defaults this scenario is very unlikely, but it can happen,
especially when large messages are being processed.
2019-10-15 10:51:05 +02:00
Rainer Gerhards
73dc50ad0c
testbench: fix unreliable gzipwrite test
The test was timing-sensitive as we did not properly check all data
was output to the output file - we just relied on sleep periods.

This has been changed. Also, we made some changes to the testing
framework to fully support sequence checking of multiple ZIP files.
2019-10-15 10:28:03 +02:00
Rainer Gerhards
14c77385bb
maintain ChangeLog 2019-10-15 08:28:44 +02:00
Rainer Gerhards
d83acdb3a1
Merge pull request #3878 from jvymazal/imjournal_rewrite
plugin code restructuring, added remote option
2019-10-15 08:26:38 +02:00
Jiri Vymazal
78976a9bc0 plugin code restructuring, added remote option
Decomposed ReadJournal() a bit, also now coupling journald
variables in one struct, added few warning messages and debug
prints to help with bug hunts in future, also got rid of two
needless journald calls. WorkAroundJournalBug now deprecated.
Added option to pull journald records from outside local machine.
2019-10-14 11:33:29 +02:00
Rainer Gerhards
db7d639a83
core queue bugfix: propagate batch size to DA queue
This was a long-standing bug where the DA queue always had a fixed small batch
size because the setting was not propagated from the memory queue. This also
removes a needless and counter-productive "debug aid" which seemed to be in
the code for quite some while. It did not cause harm because of the batch
size issue.
2019-10-14 08:56:19 +02:00
Rainer Gerhards
cb81a4253e
maintain ChangeLog 2019-10-11 11:28:03 +02:00
Rainer Gerhards
380fde8508
Merge pull request #3890 from rgerhards/fix-dbghdr
core bugfix: potential abort on very long action name
2019-10-11 11:22:48 +02:00
Rainer Gerhards
66a766a2ee
maintain ChangeLog 2019-10-10 18:11:49 +02:00
Rainer Gerhards
4d7d8ce227
Merge pull request #3888 from rgerhards/tb-mmpstrucdata-escape
testbench: add test for mmpstrucdata with RFC5424 escape sequences
2019-10-10 18:10:44 +02:00