73 Commits

Author SHA1 Message Date
Janmejay Singh
2be95ef067 fix dynstats stats-publish coordinated tests that were failing on 32-bit env because field width of long (32 bits) was too small to hold millisecond-resolution time 2016-05-09 19:43:22 +05:30
Rainer Gerhards
42a8673abc imdiag: avoid races in detecting queue empty status
Previously, we just did three checks with some longer waits in between.
This was insufficient to avoid races, as we saw in practice. Now we
have slightly changed that approach and require 10 times in a row
an empty queue to deduce it atcually is empty.

closes https://github.com/rsyslog/rsyslog/issues/688
2016-04-23 19:15:44 +02:00
Janmejay Singh
a30bf638cc Trying to switch a stats-dependent test from timing based coordination to semaphore-based coordination. 2016-04-18 21:35:07 +05:30
Janmejay Singh
25cc42c2ff pre-merged upstream for a clean merge-back 2016-02-04 16:14:21 +05:30
Rainer Gerhards
3549041b0f Merge branch 'dyn_stats' of https://github.com/janmejay/rsyslog into master-integrate-dynstats
Conflicts:
	.travis.yml
	grammar/rainerscript.c
	plugins/imdiag/imdiag.c
2016-01-28 09:51:25 +01:00
Rainer Gerhards
e8c8e96e27 refactor time-obtaining functions so that the can obtain time in UTC
This works where the time is picked up locally.
2016-01-11 18:52:42 +01:00
Janmejay Singh
bf43179381 moved to async(dispatched on a different thread) lookup-table reload (stub param is still mandatory, making it optional requires more work) 2015-12-21 23:42:11 +05:30
Peter Portante
2470f0f72b Remove use of sizeof(char) and sizeof(uchar)
Remove the use sizeof(char) or sizeof(uchar) in calculations for memory
allocation or string length.  There are no known platforms for which
sizeof(char) or sizeof(uchar) is not 1, and c99 has defined sizeof(char)
to be 1 (section 6.5.3.4 of c99).
2015-12-16 02:18:45 +00:00
Janmejay Singh
6da7aeb975 - dynstats basic-test first-cut
- vg-test caught a minor issue in impstats (fixed)
- placeholder created for other dynstats tests
- a new assertion in diag.sh which allows extracting a particular column and expecting sum-up to match given value
- imdiag supports injecting litteral messages now (test can send a fully formed syslog message through imdiag, its a backward compatible change in protocol, allows for richer things to be build while being fully backward compatible)
2015-11-13 17:45:07 +05:30
root
4bc2af4ebd fixed issues with imdiag and imgssapi plugins 2015-03-25 12:35:55 +01:00
Rainer Gerhards
423c3ac62c pstats: add "origin" paramter to stats records
see also: https://github.com/rsyslog/rsyslog/issues/119
2014-11-19 15:49:09 +01:00
Rainer Gerhards
10a055ddaa fix: remove accidently left-in debug output (in previous commit) 2014-07-13 15:36:44 +02:00
Rainer Gerhards
a45ea8a144 testbench: make more reliable shutdown
so far, we checked only the main queue size to become zero, ignoring
the sizes of action queues. For some tests, this caused racieness and
unreliability. Now, we check all queues. This should make matters
much more stable.
2014-07-11 17:23:21 +02:00
Tomas Heinrich
3b9be747b9 bugfix: plug a memleak 2014-07-11 15:19:43 +02:00
Tomas Heinrich
f0a8468cf5 bugfix: check return value of ratelimitNew() 2014-07-11 15:19:43 +02:00
Rainer Gerhards
ce9b272317 imdiag: clarify state
see also: https://github.com/rsyslog/rsyslog/issues/71
2014-05-05 12:32:52 +02:00
Rainer Gerhards
e581c3d26e Merge branch 'v7-stable'
Conflicts:
	doc/imptcp.html
	plugins/mmjsonparse/mmjsonparse.c
	plugins/mmnormalize/mmnormalize.c
2012-11-28 10:19:29 +01:00
Rainer Gerhards
d9df6e9775 bugfix: modules not (yet) supporting new conf format were not properly registered
This lead to a "module not found" error message instead of
the to-be-expected "module does not support new style" error message.
That invalid error message could be quite misleading and actually stop
people from addressing the real problem (aka "go nuts" ;))
2012-11-28 10:02:08 +01:00
Rainer Gerhards
b6e6cfeff8 imdiag: add support for new (ratelimiting) msg submit interface 2012-10-15 18:17:59 +02:00
Rainer Gerhards
2a6ff7d53d interface cleanup (probably not final) 2012-10-15 08:55:12 +02:00
Rainer Gerhards
4269e45781 new ratelimit: interface plumbing added
no actual implementation yet done
2012-10-09 18:54:25 +02:00
Rainer Gerhards
5155f67d62 bugfix: small memory leak in imdiag
This does not have any practical problems associated with it, EXCECPT
that it caused almost all valgrind testbench tests to fail.
2012-09-19 19:25:01 +02:00
Rainer Gerhards
d6da57ae03 Merge branch 'v5-stable-newstats'
Conflicts:
	action.c
	configure.ac
	doc/imuxsock.html
	plugins/imklog/imklog.c
	plugins/imptcp/imptcp.c
	plugins/imtcp/imtcp.c
	plugins/imudp/imudp.c
	plugins/imuxsock/imuxsock.c
	runtime/glbl.c
	runtime/glbl.h
	runtime/net.c
	runtime/ruleset.c
	tcpsrv.h
	tools/syslogd.c
2012-04-07 15:42:46 +02:00
Rainer Gerhards
4fb7ba113c added configuration directive to disable octet-counted framing
... for imtcp, directive is $InputTCPServerSupportOctetCountedFraming
2012-03-19 15:28:25 +01:00
Rainer Gerhards
6624ad434b Merge branch 'v6-stable-noscoping' into master
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	plugins/imfile/imfile.c
	plugins/imklog/imklog.c
	plugins/immark/immark.c
	plugins/imptcp/imptcp.c
	plugins/imrelp/imrelp.c
	plugins/imtcp/imtcp.c
	plugins/imtemplate/imtemplate.c
	plugins/imudp/imudp.c
	plugins/imuxsock/imuxsock.c
	plugins/mmsnmptrapd/mmsnmptrapd.c
	plugins/omtemplate/omtemplate.c
	runtime/glbl.c
	runtime/parser.c
	tools/omfile.c
	tools/syslogd.c
2012-01-19 13:07:46 +01:00
Rainer Gerhards
9b24152b6a undoing v6.1 config scoping interface, part I
The most common files are now changed, more needs to be done.
2012-01-18 18:21:08 +01:00
Rainer Gerhards
ac9afc4149 Merge branch 'v5-stable' into master
Conflicts:
	ChangeLog
	action.h
	configure.ac
	doc/manual.html
	plugins/immark/immark.c
	plugins/impstats/impstats.c
	plugins/imptcp/imptcp.c
	plugins/imtcp/imtcp.c
	runtime/cfsysline.c
	runtime/cfsysline.h
	runtime/conf.c
	runtime/ctok.c
	runtime/ctok.h
	runtime/ctok_token.c
	runtime/ctok_token.h
	runtime/dnscache.h
	runtime/expr.c
	runtime/expr.h
	runtime/rule.c
	runtime/rule.h
	runtime/ruleset.h
	runtime/sysvar.c
	runtime/vm.h
	runtime/vmop.c
	runtime/vmop.h
	runtime/vmprg.c
	runtime/vmprg.h
	runtime/vmstk.c
	runtime/vmstk.h
	tools/omusrmsg.c
2012-01-18 14:08:24 +01:00
Rainer Gerhards
fe4cfa6d1f Merge branch 'v5-stable' into v6-stable
Conflicts:
	plugins/imtcp/imtcp.c
2012-01-14 18:35:09 +01:00
Rainer Gerhards
0871d0a077 Merge branch 'v4-stable' into v5-stable
Conflicts:
	plugins/imfile/imfile.c
	plugins/omtesting/omtesting.c
	tcpsrv.c
	threads.c
2012-01-14 18:32:40 +01:00
Rainer Gerhards
0216053099 relicense parts under ASL 2.0
after carful check for copyright holder
2012-01-11 18:30:33 +01:00
Rainer Gerhards
a7e3afb20b milestone: added module config names 2011-07-20 10:47:24 +02:00
Rainer Gerhards
8fbefa688f Merge branch 'v5-stable' into beta
Conflicts:
	ChangeLog
	doc/manual.html
2011-07-06 08:36:58 +02:00
Rainer Gerhards
38e7f7852a reduced sporadic failures during make check
backport from v6
2011-06-30 10:28:09 +02:00
Rainer Gerhards
a924cfe6c2 reduced sporadic failures during make check
the imdiag implementation of "queue empty" was a bit racy, which
sometimes lead to too-early termination of rsyslogd and thus some
small memory leaks (which in turn showed up as problems during
make check). The current architecture is not able to 100% guard against
this, but the probleme probability has been reduced (and it showed to
improve in practice).
2011-06-27 13:51:06 +02:00
Rainer Gerhards
b056c258d7 step: generalized new config interface for all module types 2011-05-06 08:43:15 +02:00
Rainer Gerhards
c0d1334f6e step: imtcp moved to new config interface
as far as we know that new interface right now ;)
2011-05-05 11:36:05 +02:00
Rainer Gerhards
d0d9f823b7 step: put plumbing in place for new input module config system 2011-05-03 18:02:18 +02:00
Rainer Gerhards
b30e809a20 Merge branch 'v5-devel'
Conflicts:
	configure.ac
	doc/manual.html
	doc/rsyslog_conf.html
	runtime/msg.c
	runtime/rsyslog.h
	template.c
2011-03-31 17:08:01 +02:00
Rainer Gerhards
b59f8fd65d fixed problem in testbench & added new test (not yet integrated)
The test is a setup scenario for this bug tracker:
http://bugzilla.adiscon.com/show_bug.cgi?id=241
2011-03-30 11:19:22 +02:00
Rainer Gerhards
32db6291bc backporting patch for clean make distcheck 2011-03-16 16:59:49 +01:00
Rainer Gerhards
ef45e0ff71 Merge branch 'v5-devel'
Conflicts:
	tests/diag.sh
2011-03-14 12:49:12 +01:00
Rainer Gerhards
00771a760b fixing cosmetic memory leak in imdiag, imfile
This had no real consequences, as it happend exactly
once during the runtime, so the OS cleaned up. However, it
broke the valgrind testbench.
2011-03-14 12:17:27 +01:00
Rainer Gerhards
6c3ef4dacf Merge branch 'v5-beta'
Conflicts:
	ChangeLog
	configure.ac
	doc/manual.html
	plugins/omlibdbi/omlibdbi.c
	tests/Makefile.am
	tests/diag.sh
2011-03-11 10:24:58 +01:00
Rainer Gerhards
4d55e2481f forgot to backport imdiag mem leak fix -- now done 2011-03-06 15:59:06 +01:00
Rainer Gerhards
c130eb2021 improved testbench
- added valgrind-based test (the first one ever ;))
- fixed memory leak in imdiag (guess how this was detected...)
2011-03-01 16:00:22 +01:00
Bojan Smojver
d1eb6e0edc added work-around for bug in gtls, which causes fd leak when using TLS
The capability has been added for module to specify that they do not
like being unloaded.
related bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=222

Signed-off-by: Rainer Gerhards <rgerhards@adiscon.com>
2011-02-23 11:25:43 +01:00
Rainer Gerhards
e64cd21243 moving towards scoping inside rsyslog.conf
first step: adding object-type specifier to config statement table
2010-07-21 18:08:19 +02:00
Rainer Gerhards
18749309f3 fixing some potential segfault conditions 2009-11-25 13:28:05 +01:00
Rainer Gerhards
e04e1b5002 enhanced test environment (including testbench)
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.
2009-10-22 11:33:38 +02:00
Rainer Gerhards
c5408da3d8 new queue engine - initial commit (probably not 100% working!)
simplified and thus speeded up the queue engine, also fixed some
potential race conditions (in very unusual shutdown conditions)
along the way. The threading model has seriously changes, so there may
be some regressions.

NOTE: the code passed basic tests, but there is still more work
and testing to be done. This commit should be treated with care.
2009-10-14 11:01:21 +02:00