2827 Commits

Author SHA1 Message Date
Rainer Gerhards
fcb747c57d some doc fixes; incorrect config samples could cause confusion
thanks to Anthony Edwards for pointing the problems out
2010-05-20 16:43:46 +02:00
Rainer Gerhards
4ebd062564 solving a number of minor (but annoying) issues in the build system 2010-04-12 14:59:52 +02:00
Rainer Gerhards
1e1cbdb971 added new configure option that permits to disable and enable an extended testbench 2010-04-12 14:31:03 +02:00
Rainer Gerhards
58336e021c doc bugfix: $OMFileFlushOnTXEnd wrongly documented 2010-04-07 14:48:29 +02:00
Rainer Gerhards
e2ceb7247c bugfix: default for $OMFileFlushOnTXEnd was wrong ("off").
This, in default mode, caused buffered writing to be used, what
means that it looked like no output were written or partial
lines. Thanks to Michael Biebl for pointing out this bug.
2010-04-07 14:25:40 +02:00
Rainer Gerhards
1cba216220 improvded testbench: added test with truly random data received via syslog to test robustness 2010-04-01 15:11:16 +02:00
Rainer Gerhards
302ad02e77 temporary bugfix replaced by permanent one for...
...message-induced off-by-one error (potential segfault) (see 4.6.2)
The analysis has been completed and a better fix been crafted and
integrated.
2010-03-31 16:21:58 +02:00
Rainer Gerhards
e3b469befa bugfix: testbench failed when not executed in UTC+1 timezone
accidently, the time zone information was kept inside some
to-be-checked-for responses
2010-03-29 14:48:36 +02:00
Rainer Gerhards
b6ce75cb6c preparing for 4.6.2 v4.6.2 2010-03-26 15:41:59 +01:00
Rainer Gerhards
77f4230c10 $OMFileAsyncWriting directive did not work properly 2010-03-25 17:36:50 +01:00
Rainer Gerhards
93de3028b3 disable testcases affected by temporary bugfix in commit a3e48b697fa664110567fcd0027d24ea5a239041
... so that the testbench continues to work
2010-03-25 15:36:54 +01:00
Rainer Gerhards
d102aab886 new feature: $OMFileAsyncWriting directive added
it permits to specifiy if asynchronous writing should be done or not
2010-03-25 15:23:39 +01:00
Rainer Gerhards
841f841ce1 minor: add INSTALL file to git
some versions of autotools seem to require it. The file itself is NOT
of interest for the project
2010-03-25 08:21:41 +01:00
Rainer Gerhards
bcddd30c2e undo experimental commit dccadb677c5a6b8379f631e4c1f14c8c4089d4a6
Further testing turned out that the rsyslog core works correctly and
this fix is not needed. The concurrency we saw was actually caused by
other actions (even processes) during directory creation. See commit
9e5b31fc44136dbcc1e443cfe7714e9daf97d844 for further details.
2010-03-25 08:13:58 +01:00
Rainer Gerhards
a3e48b697f bugfix(temporary): message-induced off-by-one error (potential segfault)
Some types of malformed messages could trigger an off-by-one error
(for example, \0 or \n as the last character, and generally control
character escaption is questionable). This is due to not strictly
following a the \0 or string counted string paradigm (during the last
optimization on the cstring class). As a temporary fix, we have
introduced a proper recalculation of the size. However, a final
patch is expected in the future. See bug tracker for further details
and when the final patch will be available:
http://bugzilla.adiscon.com/show_bug.cgi?id=184
Note that the current patch is considered sufficient to solve the
situation, but it requires a bit more runtime than desirable.
2010-03-25 08:03:37 +01:00
Rainer Gerhards
28b3703c95 bugfix: potential segfault in dynafile cache
This bug was triggered by an open failure. The the cache was full and
a new entry needed to be placed inside it, a victim for eviction was
selected. That victim was freed, then the open of the new file tried. If
the open failed, the victim entry was still freed, and the function
exited. However, on next invocation and cache search, the victim entry
was used as if it were populated, most probably resulting in a segfault.
2010-03-25 07:56:03 +01:00
Rainer Gerhards
9e5b31fc44 bugfix: race condition during directory creation
If multiple files try to create a directory at (almost) the same time,
some of them may fail. This is a data race and also exists with other
processes that may create the same directory. We do now check for this
condition and gracefully handle it.
2010-03-25 07:50:55 +01:00
Rainer Gerhards
5d58774813 streamline dynafile cache entry deletion a bit
The old code looks a bit "strange", though not necessarily incorrect.
The new code looks correct and is probably less irritating during bug
hunting.
2010-03-23 14:21:33 +01:00
Rainer Gerhards
f8dee56243 bugfix: potential re-use of free()ed file stream object in omfile
when dynaCache is enabled, the cache is full, a new entry needs to
be allocated, thus the LRU discarded, then a new entry is opend and that
fails. In that case, it looks like the discarded stream may be reused
improperly (based on code analysis, test case and confirmation pending)
2010-03-23 14:11:50 +01:00
Rainer Gerhards
41552fbc50 adding testcase files missing in git 2010-03-23 07:22:07 +01:00
Rainer Gerhards
2f1d5a1203 valgrand accidently left enabled in diag.sh with the last commit 2010-03-22 15:59:33 +01:00
Rainer Gerhards
ea892d6cf0 cleanup: removed no longer needed variable
Most importantly, this keeps the thread debugger output clean.
2010-03-22 15:53:45 +01:00
Rainer Gerhards
148910c285 bugfix(minor): BSD_SO_COMPAT query function had some global vars not properly initialized.
However, in practice the loader initializes them with zero, the
desired value, so there were no actual issue in almost all cases.
2010-03-22 15:47:07 +01:00
Rainer Gerhards
e6aaf12544 added one more test case for dynafile cache 2010-03-22 14:53:08 +01:00
Rainer Gerhards
42d2c13072 cleanup of debug message in testbench 2010-03-22 14:37:36 +01:00
Rainer Gerhards
a28a31feea previous (experimental) patch was somewhat incorrect, fixed
This is what caused the new test to fail...
2010-03-22 14:22:22 +01:00
Rainer Gerhards
1ddb082cfa added testcase showcasing problems when dynafile can not be opened
note that so far no patch is provided. This has not yet been made
part of "make check"
2010-03-22 14:06:05 +01:00
Rainer Gerhards
dccadb677c exp: made omfile ensure that it is not called twice in parallel on the same file instance
In theory, the rsyslog core should never call in parallel into an output
module for the same instance. However, it looks like this seems to happen
under (strange?) circumstances. I have now enhanced omfile so that it guards
itself against being called in parallel on the same instance data. This is
done to help troubleshooting and may stay as an interim solution if it
proves to solve an anomaly we see in at least one installation (to trigger
this problem, an extremely large traffic volume is needed).
2010-03-21 18:52:51 +01:00
Rainer Gerhards
95cde529cc added some more tests for severely ill-formed snare messages
also improved nettester testbench tool a bit
2010-03-21 18:33:14 +01:00
Rainer Gerhards
091e4dc1b9 added parser test cases to testbench 2010-03-19 15:14:09 +01:00
Rainer Gerhards
ab8af1c38d solved some race conditions in testbench
the test cases actually have some races, not the code to be tested
2010-03-19 13:32:31 +01:00
Rainer Gerhards
970383f219 slight improvement to testing tools 2010-03-19 12:20:58 +01:00
Rainer Gerhards
89216d6a96 fixed regression from previos (yet unrelease) $omfileFlushOnTXEnd fix
The previous fix fixed an issue with on/off bying used in the exact wrong
semantic. It corrected the situation, but failed to fix one spot where the
wrong semantics were used. This is done with this commit.

Note that this is NOT a bug seen in any released version.
temp.4.6.1.10
2010-03-19 09:42:46 +01:00
Rainer Gerhards
9cdcba0bdc bugfix: invalid buffer write in (file) stream class
currently being accessed buffer could be overwritten with new data.
While this probably did not cause access violations, it could case loss
and/or duplication of some data (definitely a race with no deterministic
outcome)
2010-03-19 07:41:04 +01:00
Rainer Gerhards
3e0578605f bugfix: potential hang condition during filestream close
predicate was not properly checked when waiting for the background file
writer
2010-03-19 07:37:56 +01:00
Rainer Gerhards
44f670848a added additional test case for async writer 2010-03-19 07:22:59 +01:00
Rainer Gerhards
e910078e41 bugfix: improper synchronization when "$OMFileFlushOnTXEnd on" was used
Internal data structures were not properly protected due to missing
mutex calls.
2010-03-19 07:19:28 +01:00
Rainer Gerhards
adf3e203bd enabled imudp to send complete text of large messages to debug log
... it turns out that this is sometimes extremely useful when debugging
real-world problems at user sites.
2010-03-18 12:39:19 +01:00
Rainer Gerhards
1fb45d3e99 some cleanup, some additional comments and a bit more debug output 2010-03-18 12:34:26 +01:00
Rainer Gerhards
5c7225b776 added test for deadlock with dynafile writing and cache exhaustion
Note that this introduces a test case that breaks the current code. This
commit does NOT yet provide the necessary code patch. Thus "make check"
does currently hang.
2010-03-17 18:11:03 +01:00
Rainer Gerhards
679434312c added test to check for deadlock condition in async-written files
Note that this introduces a test case that breaks the current code. This
commit does NOT yet provide the necessary code patch. Thus make check
does currently hang.
2010-03-17 16:39:18 +01:00
Rainer Gerhards
ba0f23182a new feature: "." action type added to support writing files to relative pathes
(this is primarily meant as a debug aid)
2010-03-17 16:25:24 +01:00
Rainer Gerhards
d7faed130c bugfix(cosmetic): tried to close non-open fd, resulting in close(-1) 2010-03-16 19:06:01 +01:00
Rainer Gerhards
a577b09e58 reduced runtime requirements of inactive debug code a slight bit 2010-03-16 19:01:22 +01:00
Rainer Gerhards
16cb5ae53c enhanced dbgoprint() buffer size 2010-03-16 17:06:21 +01:00
Rainer Gerhards
219336ec5a bugfix: recent patch to fix small memory leak could cause invalid free.
This could only happen during config file parsing.
2010-03-16 17:02:49 +01:00
Rainer Gerhards
4cb3e80152 added new, complex testcase to testbench
this is an excerpt from some of the more intensen manual tests
I am doing, stripped down to be useful inside the testbench.
2010-03-16 14:23:13 +01:00
Rainer Gerhards
46861a84f8 fix recently introduced minor nit in Makefile for testbench 2010-03-15 09:36:02 +01:00
Rainer Gerhards
a1127abbae bugfix(minor): handling of extremely large strings in dbgprintf() fixed
Previously, it could lead to garbagge output and, in extreme cases, also
to segfaults. Note: this was a problem only when debug output was
actually enabled, so it caused no problem in production use.
2010-03-15 09:29:54 +01:00
Rainer Gerhards
4f97db43df added more parser test cases
also improved testing tools to support new testcase structure
2010-03-11 14:48:44 +01:00