On Fri, 2013-04-12 at 15:01 +0200, Tomas Heinrich wrote:
> This is likely unrelated, but I've hit another segfault in the same area
> of the code.
>
> It can be reproduced like this:
> $ logger -p user.emerg asdf
>
> This probably pertains to changes in the ratelimiting code. Attached are
> two patches; the second is just a correction to a default value and
> unrelated to this, the first one needs some explaining.
>
> Setting severity to 'emerg' causes this branch not to be taken:
>
> imuxsock.c:778: if(sever >= pLstn->ratelimitSev) {
>
> This prevents the ratelimiter from being initialized and leads to a
> segfault. The call chain begins here:
>
> imuxsock.c:930: ratelimitAddMsg(ratelimiter, NULL, pMsg);
>
> After the refactoring that gave this part of the code its shape, it
> seems the messages must be added through ratelimitAddMsg(). The
> ratelimitMsg() function also handles "repeated message reduction" which
> I guess shouldn't be affected by severity so the severity check must
> happen somewhere bellow this function call.
>
> The patch is for the master branch that adds a severity variable to the
> ratelimiter struct and a method to access it. This is currently only
> necessary for imuxsock but it seemed like the right thing to do.
>
I agree to your analysis. Many thanks for the help, now merged :-) To be
released with 7.3.11.
Rainer
> Hope this helps,
> Tomas
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com/professional-services/
> What's up with rsyslog? Follow https://twitter.com/rgerhards
> NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
> sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T
> LIKE THAT.
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.