On Fri, 17 Sep 2021, Rainer Gerhards via rsyslog wrote:

Can we fix this?
Yes, it's easy, just check queue type and if it is "direct", do a sync call.

BUT: this would potentially break existing configurations, something
we do only if there is really a very good reason to do so. I do not
see the case strong enough for a breaking fix.

I think I will add a warning message when a direct queue type is
detected but explicitly set. So users can become aware of the issue.

Any objections?

given that the result of specifying queue=direct is an undefined race condition, I think we need to at least add a big warning, and don't think it would be unreasonable to change this behavior to make it defined (turn it into a sync call)

in the docs, we tell people to use a queue type of linkedlist when they want things to be async (at some point we should have examples that say fixedarray as people fall into the trap of thinking only linkedlist does this), but nowhere do we say that queue type direct would make anything async

yes, it is a behavior change, which normally I oppose, but in this case it seems to be a behavior change away from something that is arguably against what the docs say, is unlikly to be used in the real world, and currently produces unpredictable results

in the race condition, could the current behavior trigger a different message being changed? or writes to freed memory if the called ruleset is modifying the message object after the parent has finished processing the message entirely? or is it copied so that it's safe, just won't popogate changes back? (unexpectedly per the docs)

David Lang
_______________________________________________
rsyslog mailing list
https://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.

Reply via email to