13 Commits

Author SHA1 Message Date
Rainer Gerhards
c3b48d708a iminternal: refactor to fix cosmetic Coverity scan CID 185435 2017-11-30 08:19:14 +01:00
Rainer Gerhards
ba5784b635 core/ratelimit bugfix: race can lead to segfault
There was a race in iminternalAddMsg(), where the mutex is
released and after that the passed message object is accessed.
If the mainloop iterates in between, the msg may have already
been deleted by this time, resulting in a segfault.

Most importantly, there is no need to release the mutex lock
early, as suggested by current code. Inside mainloop the mutex
is acquired when it is time to do so, so at worst we'll have a
very slight wait there (which really does not matter at all).

This only happens if a large number of internal messages are emitted.

closes https://github.com/rsyslog/rsyslog/issues/1828
2017-10-10 16:38:53 +02:00
Rupert
a6a24abf13 portability: fixes needed to build on osx
Thanks to github user hdatma
2017-05-15 09:05:05 +02:00
Rainer Gerhards
dd9bfd3468 iminteral: add addtl debug message
We have seen cases where the kill() used to signal new messages
actually cases problems and the new debug message is intended to
provide a better clue to what is happening. In any case, this
is generally useful, and so should remain even after the debugging
of that special case.
2017-04-13 16:27:10 +02:00
Rainer Gerhards
cd51ae3647 core: enable internal messages at any time
previous code could deadlock if internal messages were issued
inside queue processing code, which effectively limited
error-reporting capabilities. This change makes it possible
to call error messages from any part of the code at any time.
This comes at the price of slightly delayed message output.
2017-03-07 09:27:49 +01:00
purnima
d45daa2af0 Rebase,redefine msgDestruct() as smsg_t is used 2016-11-22 14:24:25 +05:30
Rainer Gerhards
ec2a8d8d12 cosmetic: brush up iminternal style to latest rsyslog project policies 2016-10-13 17:29:44 +02:00
Rainer Gerhards
405206bfe9 update license to ASL 2.0 2014-05-22 15:40:54 +02:00
Rainer Gerhards
4d35185317 regression: fixed compile error with --enable-debug 2011-02-21 08:14:01 +01:00
Rainer Gerhards
772e0ae846 cleanup: no longer parameter in iminternal system removed 2011-02-16 11:46:56 +01:00
Rainer Gerhards
7d78b3bdfd restructured parser part of rsyslog
now cleaner and hopefully usuable as a basis for loadable parser
modules. I also cleaned up/consolidated some of the internal
message generation functionality in rsyslogd.
2009-11-03 10:41:47 +01:00
Rainer Gerhards
d2feb7063e enhanced configuration file error reporting and verification
- enhanced config file checking - no active actions are detected
- added -N rsyslogd command line option for a config validation run
  (which does not execute actual syslogd code and does not interfere
  with a running instance)
- somewhat improved emergency configuration. It is now also selected
  if the config contains no active actions
- rsyslogd error messages are now reported to stderr by default. can be
  turned off by the new "$ErrorMessagesToStderr off" directive
Thanks to HKS for suggesting these new features.
2008-07-29 10:07:50 +02:00
Rainer Gerhards
d9b0c77d3e some more cleanup
reduced dependencies, moved non-runtime files to its own directory except
for some whom's status is unclear
2008-04-16 15:27:53 +02:00