477 Commits

Author SHA1 Message Date
Rainer Gerhards
f48128f34a fixed a couple of regressions
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.
2010-06-23 12:48:27 +02:00
Rainer Gerhards
802f6d8a8f milestone(BUGGY): batch now pushed down to action
at least in important cases (not for non-direct action queues and some
other minor things). This version is definitely buggy, but may be tried
with success on a non-production system. I will continue to work on the
correctness, but needed to commit now to get a baseline.
2010-06-15 14:02:34 +02:00
Rainer Gerhards
fe8d317c1b milestone commit(BUGGY): batch is now handed down to rule processing
Now, the full batch is passed down to the rule, which then enqueues
the elements as single messages. Note that this code has some known
defects and needs more changes until it is correct again. This is
primarily a commit to be able to return to a known-(somewhat)-good
state.
2010-06-10 14:36:49 +02:00
Rainer Gerhards
74135da959 some cleanup
as well as some work in preparation of storing doAction params inside
the batch
2010-06-10 12:24:22 +02:00
Rainer Gerhards
d630bc742f Merge branch 'concurrent-output' into tmp 2010-06-10 10:18:59 +02:00
Rainer Gerhards
559cb84a79 fixing msg duplication & loss regression, causes slowdown
messages could get lost or be duplicated due to non-proper sync
of transactions. This is a notable slowdown again, but we know
how to get back concurrency, it just takes "some" more programming.
It is important now to come back to correct code, so that we can
base further improvements on that.
2010-06-10 10:17:04 +02:00
Rainer Gerhards
8fbcea4837 main msg q consumer now preprocesses messages before doing rule processing
things like ACL check and message parsing. This leads to a greater level
of concurrent processing. Beware, though, that this commit duplicates
some messages. May be a regression from this or an earlier commit. I will
soon sort out.
2010-06-09 15:37:00 +02:00
Rainer Gerhards
395660f462 somewhat improved direct mode queue performance
... but only for batch enqueues. This will not help much with
the current code, but will play well with upcoming changes.
2010-06-09 14:34:35 +02:00
Rainer Gerhards
220c57e7eb bugfix: regression caused more locking action in msg.c than necessary
also: bugfix: mutexes used to similate atomic instructions were not destructed
2010-06-08 08:25:56 +02:00
Rainer Gerhards
d9e64c16e5 finshed implementation of strgen modules
and also provided four build-in modules for the most common use
cases, hopefully resulting in a speedup of around 5% for typical
rsyslog processing.
2010-06-04 12:45:31 +02:00
Rainer Gerhards
527bfcea5c first implementation of strgen interface
and a first built-in strgen module. Some tweaks and more default strgens
are needed, but the code doesn't look too bad ;)
2010-06-01 18:51:55 +02:00
Rainer Gerhards
74f8bf1465 some more cleanup and a nasty little bug i doDie() 2010-05-10 15:37:44 +02:00
Rainer Gerhards
5ab54ee0fb improved syncdemo tool - added "partition" mode...
... and also analyzed the resulting assembly code to find out
weak spots for the test. Explanations and new suggestions added.
2010-05-05 17:47:57 +02:00
Rainer Gerhards
3b0a3cb984 added semaphores to sync test scenario 2010-05-02 17:21:51 +02:00
Rainer Gerhards
fd05cbf256 enhanced tool to test timing of sync methods 2010-05-02 12:34:56 +02:00
Rainer Gerhards
0944d4b542 Merge branch 'v4-devel' into tmp 2010-04-26 12:12:37 +02:00
Rainer Gerhards
d198064316 added new $Sleep directive to hold processing for a couple of seconds during startup 2010-04-26 12:08:00 +02:00
Rainer Gerhards
d3eb89a5fe Merge branch 'v4-devel' into master
Conflicts:
	runtime/msg.h
2010-04-19 17:13:08 +02:00
Rainer Gerhards
393c67ba5b minor cleanup 2010-04-19 15:38:11 +02:00
Rainer Gerhards
4e511087c4 some cleanup 2010-04-19 15:21:25 +02:00
Rainer Gerhards
ada87cbaef Merge branch 'v4-devel' into master
Conflicts:
	ChangeLog
	Makefile.am
	configure.ac
	doc/manual.html
	runtime/debug.c
	runtime/rsyslog.h
	tests/Makefile.am
	tests/diag.sh
	tests/nettester.c
	tools/syslogd.c
2010-04-19 15:13:33 +02:00
Rainer Gerhards
f7f81e89d5 (minor) some improvements to syncdemo 2010-04-14 07:20:28 +02:00
Rainer Gerhards
a9890714c3 added tool to demo/evaluate various sync methods
This tool is primarily meant as an aid during concept development, NOT
as a usable end-user tool to be built (thus it is not inside the
build system)
2010-04-13 17:46:59 +02:00
Rainer Gerhards
25bc3b2e30 Merge branch 'v4-stable-solaris' into v4-devel
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	tools/omfile.c
	tools/syslogd.c
2010-04-12 09:10:19 +02:00
Rainer Gerhards
8f0a8076cc Merge branch 'beta' into master
Conflicts:
	ChangeLog
	configure.ac
	plugins/imudp/imudp.c
	runtime/stream.h
	tests/Makefile.am
	tests/diag.sh
	tools/omfile.c
2010-04-09 13:00:56 +02:00
Rainer Gerhards
87a957b0f5 Merge branch 'v4-stable-solaris' into beta
Conflicts:
	runtime/Makefile.am
	runtime/rsyslog.c
	tests/nettester.c
	tools/syslogd.c
2010-04-09 12:27:59 +02:00
Rainer Gerhards
5ef852f4a3 Merge branch 'v4-stable' into v4-stable-solaris
Conflicts:
	ChangeLog
	tests/Makefile.am
	tests/tcpflood.c
2010-04-07 14:40:55 +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
2cd132eebb enhanced nettester tool so that it re-uses it's callers environment
this enables us to work with the "usual" environment tweaks (for
debugging and other purposes), without the need for any special
handling in nettester itself
2010-04-07 12:42:41 +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
8b9cef552d Merge branch 'v4-stable' into v5-stable
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
2010-03-29 11:07:15 +02:00
Rainer Gerhards
927a1b54ad Merge branch 'v4-stable' into v4-stable-solaris 2010-03-25 17:38:26 +01:00
Rainer Gerhards
77f4230c10 $OMFileAsyncWriting directive did not work properly 2010-03-25 17:36:50 +01:00
Rainer Gerhards
0e0eaae433 Merge branch 'v4-stable' into v4-stable-solaris
Conflicts:
	ChangeLog
2010-03-25 15:48:05 +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
648e84cad8 Merge branch 'v4-stable' into v4-stable-solaris
Conflicts:
	ChangeLog
2010-03-25 08:26:18 +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
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
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
e0afe5c825 added some diagnostics info to startup 2010-03-23 08:03:21 +01:00
Rainer Gerhards
d2f242edcb Merge branch 'v4-stable' into v4-stable-solaris 2010-03-23 07:10:03 +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
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
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.
2010-03-19 09:42:46 +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
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
4408d4137a testbench: new calling interface for tcpflood
this is a perquisite to support more flexible testing modes, which
could not intelligently be implemented with the old interface
2010-03-10 11:07:26 +01:00
Rainer Gerhards
3d80d6ba30 bugfix: potential problem (loop, abort) when file write error occured
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.
2010-03-09 18:07:31 +01:00
Rainer Gerhards
7916735ba6 retain old $OMFileFlushOnTXEnd semantics
required because due to bug the default was actually different than
specified (or better said: spec was inconsistent in doc as well).
2010-03-09 17:57:46 +01:00