summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* disable testcases affected by temporary bugfix in commit ↵Rainer Gerhards2010-03-252-9/+13
| | | | | | a3e48b697fa664110567fcd0027d24ea5a239041 ... so that the testbench continues to work
* new feature: $OMFileAsyncWriting directive addedRainer Gerhards2010-03-2520-35/+91
| | | | it permits to specifiy if asynchronous writing should be done or not
* minor: add INSTALL file to gitRainer Gerhards2010-03-251-0/+365
| | | | | some versions of autotools seem to require it. The file itself is NOT of interest for the project
* undo experimental commit dccadb677c5a6b8379f631e4c1f14c8c4089d4a6Rainer Gerhards2010-03-251-9/+0
| | | | | | | 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.
* bugfix(temporary): message-induced off-by-one error (potential segfault)Rainer Gerhards2010-03-252-0/+18
| | | | | | | | | | | | | | 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.
* bugfix: potential segfault in dynafile cacheRainer Gerhards2010-03-252-1/+8
| | | | | | | | | 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.
* bugfix: race condition during directory creationRainer Gerhards2010-03-252-6/+31
| | | | | | | 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.
* streamline dynafile cache entry deletion a bitRainer Gerhards2010-03-232-9/+8
| | | | | | The old code looks a bit "strange", though not necessarily incorrect. The new code looks correct and is probably less irritating during bug hunting.
* bugfix: potential re-use of free()ed file stream object in omfileRainer Gerhards2010-03-233-8/+27
| | | | | | | 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)
* adding testcase files missing in gitRainer Gerhards2010-03-232-0/+102
|
* valgrand accidently left enabled in diag.sh with the last commitRainer Gerhards2010-03-221-1/+1
|
* cleanup: removed no longer needed variableRainer Gerhards2010-03-221-3/+0
| | | | Most importantly, this keeps the thread debugger output clean.
* bugfix(minor): BSD_SO_COMPAT query function had some global vars not ↵Rainer Gerhards2010-03-224-5/+10
| | | | | | | properly initialized. However, in practice the loader initializes them with zero, the desired value, so there were no actual issue in almost all cases.
* added one more test case for dynafile cacheRainer Gerhards2010-03-223-1/+55
|
* cleanup of debug message in testbenchRainer Gerhards2010-03-221-1/+0
|
* previous (experimental) patch was somewhat incorrect, fixedRainer Gerhards2010-03-221-1/+1
| | | | This is what caused the new test to fail...
* added testcase showcasing problems when dynafile can not be openedRainer Gerhards2010-03-223-16/+75
| | | | | note that so far no patch is provided. This has not yet been made part of "make check"
* exp: made omfile ensure that it is not called twice in parallel on the same ↵Rainer Gerhards2010-03-211-0/+9
| | | | | | | | | | | | 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).
* added some more tests for severely ill-formed snare messagesRainer Gerhards2010-03-217-6/+90
| | | | also improved nettester testbench tool a bit
* added parser test cases to testbenchRainer Gerhards2010-03-194-0/+26
|
* solved some race conditions in testbenchRainer Gerhards2010-03-192-1/+4
| | | | the test cases actually have some races, not the code to be tested
* slight improvement to testing toolsRainer Gerhards2010-03-193-9/+29
|
* fixed regression from previos (yet unrelease) $omfileFlushOnTXEnd fixtemp.4.6.1.10Rainer Gerhards2010-03-193-3/+6
| | | | | | | | 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.
* bugfix: invalid buffer write in (file) stream classRainer Gerhards2010-03-192-1/+7
| | | | | | | 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)
* bugfix: potential hang condition during filestream closeRainer Gerhards2010-03-192-4/+9
| | | | | predicate was not properly checked when waiting for the background file writer
* added additional test case for async writerRainer Gerhards2010-03-193-0/+43
|
* bugfix: improper synchronization when "$OMFileFlushOnTXEnd on" was usedRainer Gerhards2010-03-192-11/+38
| | | | | Internal data structures were not properly protected due to missing mutex calls.
* enabled imudp to send complete text of large messages to debug logRainer Gerhards2010-03-181-1/+1
| | | | | ... it turns out that this is sometimes extremely useful when debugging real-world problems at user sites.
* some cleanup, some additional comments and a bit more debug outputRainer Gerhards2010-03-185-19/+24
|
* added test for deadlock with dynafile writing and cache exhaustionRainer Gerhards2010-03-173-0/+82
| | | | | | 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.
* added test to check for deadlock condition in async-written filesRainer Gerhards2010-03-173-0/+47
| | | | | | 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.
* new feature: "." action type added to support writing files to relative pathesRainer Gerhards2010-03-173-3/+13
| | | | (this is primarily meant as a debug aid)
* bugfix(cosmetic): tried to close non-open fd, resulting in close(-1)Rainer Gerhards2010-03-161-2/+7
|
* reduced runtime requirements of inactive debug code a slight bitRainer Gerhards2010-03-161-10/+10
|
* enhanced dbgoprint() buffer sizeRainer Gerhards2010-03-161-1/+1
|
* bugfix: recent patch to fix small memory leak could cause invalid free.Rainer Gerhards2010-03-163-4/+6
| | | | This could only happen during config file parsing.
* added new, complex testcase to testbenchRainer Gerhards2010-03-163-8/+24
| | | | | this is an excerpt from some of the more intensen manual tests I am doing, stripped down to be useful inside the testbench.
* fix recently introduced minor nit in Makefile for testbenchRainer Gerhards2010-03-151-1/+0
|
* bugfix(minor): handling of extremely large strings in dbgprintf() fixedRainer Gerhards2010-03-152-0/+13
| | | | | | 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.
* added more parser test casesRainer Gerhards2010-03-113-2/+147
| | | | also improved testing tools to support new testcase structure
* added more tests to testbench and improved testing toolsRainer Gerhards2010-03-1115-8/+200
|
* added ability to work with larger message sizes to testbench toolsRainer Gerhards2010-03-102-11/+63
|
* testbench: new calling interface for tcpfloodRainer Gerhards2010-03-1014-34/+44
| | | | | this is a perquisite to support more flexible testing modes, which could not intelligently be implemented with the old interface
* Merge branch 'v4-stable' into v4-stable-nextRainer Gerhards2010-03-103-5/+14
|\
| * fixed regression introduced with previous commitRainer Gerhards2010-03-103-5/+14
| | | | | | | | | | | | disk queue mode did no longer work correctly. A side-effect of this commit here is slightly cleaned-up (and more elegant) code for circular files.
* | some cosmetic changesRainer Gerhards2010-03-105-9/+13
|/ | | | | | note that a buffer size calculation was done wrong, but this was cosmetic because our buffers currently all use byte size, so even though the formula was wrong, the result was correct.
* bugfixes and testbench improvementRainer Gerhards2010-03-1011-11/+164
| | | | | | | | | | - improved testbench - bugfix: potential data loss during file stream shutdown - bugfix: potential problems during file stream shutdown The shutdown/close sequence was not clean, what potentially (but unlikely) could lead to some issues. We have not been able to describe any fatal cases, but there was some bug potential. Sequence has now been straighted out.
* bugfix: potential problem (loop, abort) when file write error occuredRainer Gerhards2010-03-093-2/+11
| | | | | | | | | | When a write error occured in stream.c, variable iWritten had the error code but this was handled as if it were the actual number of bytes written. That was used in pointer arithmetic later on, and thus could lead to all sorts of problems. However, this could only happen if the error was EINTR or the file in question was a tty. All other cases were handled properly. Now, iWritten is reset to zero in such cases, resulting in proper retries.
* retain old $OMFileFlushOnTXEnd semanticsRainer Gerhards2010-03-092-4/+4
| | | | | required because due to bug the default was actually different than specified (or better said: spec was inconsistent in doc as well).
* bugfix: $omfileFlushOnTXEnd was turned on when set to off and vice versaRainer Gerhards2010-03-092-1/+3
|