core: Fix crash when running dry#8872
Merged
edsiper merged 1 commit intofluent:masterfrom May 26, 2024
Merged
Conversation
The tls variable for out_flush_params is not initialized as the
flb_start function is not called during the dry run. Call flb_init
directly and then shutdown the engine.
configuration test is successful
=================================================================
==63633==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x0001f71b3ac0 in thread T0
#0 0x103c9f260 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x53260)
fluent#1 0x100179d9c in flb_free flb_mem.h:127
fluent#2 0x10017f4a0 in flb_output_exit flb_output.c:481
fluent#3 0x1001cb038 in flb_engine_shutdown flb_engine.c:1119
fluent#4 0x10010d45c in flb_destroy flb_lib.c:240
fluent#5 0x100008c40 in flb_main fluent-bit.c:1348
fluent#6 0x10000c644 in main fluent-bit.c:1456
fluent#7 0x18f11e0dc (<unknown module>)
frame fluent#6: 0x000000010017f4a4 fluent-bit`flb_output_exit(config=0x0000000102b00200) at flb_output.c:481:9
478
479 params = FLB_TLS_GET(out_flush_params);
480 if (params) {
-> 481 flb_free(params);
482 }
483 }
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
Contributor
Author
markuman
pushed a commit
to markuman/fluent-bit
that referenced
this pull request
May 29, 2024
The tls variable for out_flush_params is not initialized as the
flb_start function is not called during the dry run. Call flb_init
directly and then shutdown the engine.
configuration test is successful
=================================================================
==63633==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x0001f71b3ac0 in thread T0
#0 0x103c9f260 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x53260)
fluent#1 0x100179d9c in flb_free flb_mem.h:127
fluent#2 0x10017f4a0 in flb_output_exit flb_output.c:481
fluent#3 0x1001cb038 in flb_engine_shutdown flb_engine.c:1119
fluent#4 0x10010d45c in flb_destroy flb_lib.c:240
fluent#5 0x100008c40 in flb_main fluent-bit.c:1348
fluent#6 0x10000c644 in main fluent-bit.c:1456
fluent#7 0x18f11e0dc (<unknown module>)
frame fluent#6: 0x000000010017f4a4 fluent-bit`flb_output_exit(config=0x0000000102b00200) at flb_output.c:481:9
478
479 params = FLB_TLS_GET(out_flush_params);
480 if (params) {
-> 481 flb_free(params);
482 }
483 }
Signed-off-by: Holger Hans Peter Freyther <holger@freyther.de>
Signed-off-by: Markus Bergholz <git@osuv.de>
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.
The tls variable for out_flush_params is not initialized as the flb_start function is not called during the dry run. Call flb_init directly and then shutdown the engine.
Executing
fluent-bit -Dcrashes on macos.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.