summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
Commit message (Collapse)AuthorAgeFilesLines
* small bugfix: stream timeout API use was incorrectRainer Gerhards2012-08-221-2/+2
| | | | Thanks to Andre Lorbach for mentioning this.
* Merge branch 'v5-stable' into v5-betaRainer Gerhards2012-08-221-6/+4
|\ | | | | | | | | Conflicts: runtime/ruleset.c
| * bugfix: strm class could abort under some circumstancesRainer Gerhards2012-07-241-6/+4
| | | | | | | | | | ... it could pass a NULL pointer to unlink. Depending on OS implementation, this could (or could not...) lead to a segfault.
* | changed TRUE/FALSE to RSTRUE/RSFALSERainer Gerhards2012-08-221-2/+2
|/ | | | This is done to prevent name claches with libraries.
* bugfix: $OMFileFlushInterval period was doubled - now using correct valueRainer Gerhards2011-10-181-1/+1
|
* bugfix: imfile did invalid system call under some circumstancesRainer Gerhards2011-10-071-4/+6
| | | | | | when a file that was to be monitored did not exist BUT the state file actually existed. Mostly a cosmetic issue. Root cause was incomplete error checking in stream.c; so patch may affect other code areas.
* Merge branch 'v4-stable' into v5-stableRainer Gerhards2011-05-031-0/+11
|\
| * bugfix: memory and file descriptor leak in stream processingRainer Gerhards2011-05-031-0/+11
| | | | | | | | | | | | | | | | Leaks could occur under some circumstances if the file stream handler errored out during the open call. Among others, this could cause very big memory leaks if there were a problem with unreadable disk queue files. In regard to the memory leak, this closes: http://bugzilla.adiscon.com/show_bug.cgi?id=256
* | cosmetic: making comments in stream.c a bit more readableRainer Gerhards2011-02-101-4/+6
| |
* | Merge branch 'v5-stable' into v5-develRainer Gerhards2011-01-261-10/+11
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html
| * | Merge branch 'v4-stable' into v5-stableRainer Gerhards2011-01-261-10/+11
| |\|
| | * imfile bugfix: potential duplication of log contentRainer Gerhards2011-01-101-13/+9
| | | | | | | | | | | | | | | | | | Under some circumstances an invalid truncation was detected. This code has now been removed, a file change (and thus resent) is only detected if the inode number changes.
| | * forgot the actual patch with the last commit :(Rainer Gerhards2010-12-171-1/+1
| | |
| | * bugfix: imfile potentially duplicates linesRainer Gerhards2010-12-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen when 0 bytes are read from the input file, and some writer appends data to the file BEFORE we check if a rollover happens. The check for rollover uses the inode and size as a criterion. So far, we checked for equality of sizes, which is not given in this scenario, but that does not indicate a rollover. From the source code comments: Note that when we check the size, we MUST NOT check for equality. The reason is that the file may have been written right after we did try to read (so the file size has increased). That is NOT in indicator of a rollover (this is an actual bug scenario we experienced). So we need to check if the new size is smaller than what we already have seen!
* | | enhanced imfile to support multi-line messagesDavid Lang2011-01-251-26/+85
| | | | | | | | | | | | Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
* | | improved imudp real-time scheduling support & bugfixDražen Kačar2011-01-101-1/+7
|/ / | | | | | | | | | | | | The original code had quite some issues, which are fixed by this commit. Also we do more error checking now. Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
* | Merge branch 'v4-stable' into v5-stableRainer Gerhards2010-10-191-1/+8
|\| | | | | | | | | | | | | | | Conflicts: configure.ac runtime/cfsysline.c tools/ompipe.c
| * fixing some compile problems on FreeBSDRainer Gerhards2010-10-191-1/+8
| |
* | Merge branch 'v4-devel' into v5-betaRainer Gerhards2010-10-151-8/+8
|\ \ | | | | | | | | | | | | | | | Conflicts: Makefile.am tests/tcpflood.c
| * | Merge branch 'v4-stable' into v4-develRainer Gerhards2010-10-151-8/+8
| |\| | | | | | | | | | | | | | | | Conflicts: ChangeLog runtime/stream.c
| | * imfile: bugfixes in regard to large files (> 2GB)Rainer Gerhards2010-10-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | - bugfix: a couple of problems that imfile had on some platforms, namely Ubuntu (not their fault, but occured there) - bugfix: imfile utilizes 32 bit to track offset. Most importantly, this problem can not experienced on Fedora 64 bit OS (which has 64 bit long's!)
* | | fixed a couple of regressionsRainer Gerhards2010-06-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | by implementing some code that was missing so far ;) as well as finding some real bugs. I also did some general cleanup, removing debug strings and such. This code should be fairly OK to use, except when "exec only when previous action was suspended" is used -- this is NOT yet re-implemented in the tuned engine.
* | | Merge branch 'v4-devel'Rainer Gerhards2010-04-191-1/+2
|\| | | | | | | | | | | | | | | | | | | | Conflicts: runtime/msg.h runtime/rsyslog.h runtime/stream.c
| * | improved quality of imsolaris codeRainer Gerhards2010-04-191-1/+2
| |/ | | | | | | including refctoring for a more simple solution
* | some cleanupRainer Gerhards2010-04-191-1/+1
| |
* | Merge branch 'beta' into masterRainer Gerhards2010-04-091-47/+100
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac plugins/imudp/imudp.c runtime/stream.h tests/Makefile.am tests/diag.sh tools/omfile.c
| * | Merge branch 'v4-stable' into v5-stableRainer Gerhards2010-03-291-47/+100
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html runtime/debug.c runtime/stream.c tests/Makefile.am tests/diskqueue.sh tests/nettester.c tools/omfile.c
| | * streamline dynafile cache entry deletion a bitRainer Gerhards2010-03-231-1/+1
| | | | | | | | | | | | | | | | | | The old code looks a bit "strange", though not necessarily incorrect. The new code looks correct and is probably less irritating during bug hunting.
| | * fixed regression from previos (yet unrelease) $omfileFlushOnTXEnd fixtemp.4.6.1.10Rainer Gerhards2010-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-191-1/+2
| | | | | | | | | | | | | | | | | | | | | 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-191-4/+6
| | | | | | | | | | | | | | | predicate was not properly checked when waiting for the background file writer
| | * bugfix: improper synchronization when "$OMFileFlushOnTXEnd on" was usedRainer Gerhards2010-03-191-11/+35
| | | | | | | | | | | | | | | Internal data structures were not properly protected due to missing mutex calls.
| | * some cleanup, some additional comments and a bit more debug outputRainer Gerhards2010-03-181-2/+11
| | |
| | * 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
| | |
| | * Merge branch 'v4-stable' into v4-stable-nextRainer Gerhards2010-03-101-4/+11
| | |\
| | | * fixed regression introduced with previous commitRainer Gerhards2010-03-101-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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-101-9/+9
| | |/ | | | | | | | | | | | | | | | 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-101-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | replaced data type "bool" by "sbool" because this created some portability ↵Rainer Gerhards2010-02-021-2/+2
|/ / | | | | | | issues
* | Merge branch 'v4-beta' into betaRainer Gerhards2010-01-151-3/+10
|\| | | | | | | | | Conflicts: ChangeLog
| * bugfix: rsyslog hangs when writing to a named pipe which nobody was reading.Rainer Gerhards2010-01-151-3/+10
| | | | | | | | Thanks to Michael Biebl for reporting this bug.
* | Merge branch 'v4-devel' into tmpRainer Gerhards2009-11-051-0/+1
|\|
| * bugfix: named pipes did no longer work (they always got an open error)Rainer Gerhards2009-11-051-0/+1
| | | | | | | | this was a regression from the omfile rewrite in 4.5.0
* | enhanced test environment (including testbench)Rainer Gerhards2009-10-221-5/+5
| | | | | | | | | | | | | | | | support for enhancing probability of memory addressing failure by using non-NULL default value for malloced memory (optional, only if requested by configure option). This helps to track down some otherwise undetected issues within the testbench and is expected to be very useful in the future.
* | Merge branch 'v4-beta' into betaRainer Gerhards2009-09-291-26/+41
|\| | | | | | | | | | | | | Conflicts: ChangeLog configure.ac doc/manual.html
| * minor cleanup & preparation for 4.5.4v4.5.4Rainer Gerhards2009-09-291-9/+0
| |
| * bugfix: this morning's race patch was incomplete, completing nowRainer Gerhards2009-09-241-6/+8
| | | | | | | | | | | | | | | | we needed to release ALL resources (including file handles!) only after the the async writer thread has terminated (else it may access them). In this case, we had a file handle leak, because the handle was sometimes only opened in the async writer, but the close was attempted before the writer even started (in some cases).
| * (temporary?) removal of very conservative locks in stream.cRainer Gerhards2009-09-241-2/+2
| | | | | | | | | | | | ...after we seem to have identified the root cause of the segfault. I leave them commented out so that we can re-activate it if need arises (aka "get some practice drill first").