Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal source + trace level causes message storm #2425

Merged
merged 3 commits into from
Nov 28, 2018

Conversation

furiel
Copy link
Collaborator

@furiel furiel commented Nov 23, 2018

Problem: when internal source is enabled and trace level set, infinite message is generated in an exponential manner.

There are two independent root cause for this, both of these need to be addressed.

There is a loop detection that was not working, because the order msg_set_context and the triggering messages were swapped. With that change, the Source side message processing begin messages are suppressed.

With that internal() messages are looping back, preventing loop by ... messages occur, so the detection kicks in, avoiding the infinite loop, but still causing minor inconvenience.

There is a message about window size adjustment, that also triggers a message each time a message arrives into the internal queue. However, the loop detection does not work on this, and should not, the window size change is completely valid event in this case.

For now I just deleted the msg_trace, but this is probably suboptimal solution.


I was thinking that maybe trace level messages could be written to stderr unconditionally. To my undrestanding, that would also stop the infinite generation of messages, because the trace messages are not put back into the internal queue.

@kira-syslogng
Copy link
Contributor

Build SUCCESS

@furiel
Copy link
Collaborator Author

furiel commented Nov 26, 2018

We discussed the topic IRL, and the conclusion is: there will be an msg_diagnostics, that will write to stderr unconditionally. That will be used for these three messages.

When syslog-ng started with trace enabled and internal source, a
single message in the internal source triggers infinite messages
because the loop detection started later than first triggering message.

Signed-off-by: Antal Nemes <antal.nemes@balabit.com>
Signed-off-by: Antal Nemes <antal.nemes@balabit.com>
When internal source is used and trace level enabled, some messages
generate infinite other messages. For example the triggering message
adds a new message to the internal message, which is reported in
log_source_queue, that will trigger a new message etc.

The infinite loop is broken by not generating messages into the
internal queue but written to stderr.

Signed-off-by: Antal Nemes <antal.nemes@balabit.com>
@furiel furiel changed the title [WIP] internal source + trace level causes message storm internal source + trace level causes message storm Nov 27, 2018
@kira-syslogng
Copy link
Contributor

Build SUCCESS

@lbudai
Copy link
Collaborator

lbudai commented Nov 27, 2018

I still don’t really like this, but I do understand why this is the solution.

@lbudai
Copy link
Collaborator

lbudai commented Nov 27, 2018

@furiel: and thanks for the investigation, also for the detailed commit messages!

@szemere szemere self-requested a review November 28, 2018 09:06
@lbudai lbudai added this to the OSE 3.19 milestone Nov 28, 2018
@szemere szemere merged commit ca30724 into syslog-ng:master Nov 28, 2018
@furiel furiel deleted the furiel-msg-infinite-loop branch November 5, 2019 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants