Repository navigation
Conversation
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io> Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
Signed-off-by: Hiroshi Hatake <hiroshi@chronosphere.io> Signed-off-by: Eduardo Silva <eduardo@chronosphere.io>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Consecutive native processors keep a CFL chunk alive after releasing each stage lock. The chunk references the first stage's decoder and encoder, which another output worker can reset while the earlier invocation is still processing. Concurrent mixed chains can lose or mix records or crash. Reproduced on unchanged master
6e438653c5507d32e34364cbd403835903d9eb9c.Create codecs lazily per
flb_processor_run()invocation, reuse them across native segments within that invocation, and claim the actual chunk encoder's buffer before teardown. Clean up the chunk and codecs on every return path. Stage locking stays unchanged; allocation failures callflb_errno()first. No configuration or bundled-library changes. This fixes an existing worker bug separately from performance PR #12505.CI prerequisite fixes from #12509
The original Linux, ASan and Windows x64 jobs all crashed in
output_exit_destroys_pending_flushes. Locally reproduced with CTest andValgrind. The test zeroed
task.routeswithout initializing its list head, soflb_task_get_route_status()dereferenced an invalid list. Shutdown also retainedprocessed_event_chunkafter freeing it, allowing the flush destructor to freeit again.
Include the two existing commits from #12509 as prerequisites, preserving their
author and DCO trailers: initialize the test route list, and clear the processed
chunk pointer after shutdown cleanup. The output bug remains tracked separately
in #12509; the worker isolation change remains in its own commits.
Verification
Latest CI-fix validation:
flb-it-output.flb-it-outputpasses strict Valgrind: zero errors and zero bytes in use at exit.memory logs have zero errors and no definite/indirect/possible leaks.
flb-rt-out_httpandflb-rt-out_nullpass. The HTTP target initially could notbind the occupied local port 8888; rerun with
FLB_TEST_HTTP_PORT=48995passed.Earlier worker/performance combined verification:
From repository root, with
FLUENT_BIT_BINARY=$PWD/build/bin/fluent-bit:python -m pytest tests/integration/scenarios/processor_concurrency -q VALGRIND=1 VALGRIND_STRICT=1 python -m pytest tests/integration/scenarios/processor_concurrency -q ctest --test-dir build -R '^flb-it-(processor|processor_conditional|mp_chunk_cobj)$' --output-on-failureTarget master; no backports included.