Conversation
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…own and reload. Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
…ontext loop. Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
312f8e9 to
2641693
Compare
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
Signed-off-by: Phillip Adair Stewart Whelan <phillip.whelan@chronosphere.io>
leonardo-albertovich
left a comment
There was a problem hiding this comment.
I can't conduct a complete review now but please check this out.
| static void flb_signal_handler_break_loop(int signal) | ||
| { | ||
| exit_signal = signal; | ||
| flb_config_signal_send(config, FLB_CTX_SIGNAL_SHUTDOWN); |
There was a problem hiding this comment.
You can't call flb_pipe_w from a signal handler. That's why I said you were working on something similar in PR #10275.
There was a problem hiding this comment.
That was an experiment to see what could be done to avoid using atomic variables as signal flags. I obvioulsy crashed head first into the fact that EINTR will interrupt and basically drop the events from the queue before they can be emitted.
I think the only real way around using atomic variables will be to add support for signal events to monkey. I was hoping to avoid it but I at least cannot see another way through.
There was a problem hiding this comment.
That's why I tagged you in that other PR.
I think what he did with the signal queue is correct but we need to do it using the platform agnostic atomic operation wrapper which we need to move from cmetrics to cfl (I thought that was already done but it seems I was wrong).
I think with that, the signal mask tweak and a bit of elbow grease to ensure that the mechanism is tidy we should be good.
There was a problem hiding this comment.
Were you able to make any progress on this? Do you need anything from me?
Summary
Add a new event loop for contexts and for signaling context events.
Description
This event loop has a channel that is used internally for signals, ie: shutdown, reload, etc... The main loop now uses this event loop to receive shutdown and reload signals.
This should solve the issue addressed in #9908 in a cross platform and much more stable and clean manner.
Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.