-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
proxy: fix memory bugs when use same golang output plugin multiple times #6469
proxy: fix memory bugs when use same golang output plugin multiple times #6469
Conversation
Fix fluent/fluent-bit-go#49 Signed-off-by: jzajic <[email protected]>
Correct output from run after changes:
|
VALGRIND output after changes from this PR:
VALGRIND output BEFORE (on current master HEAD):
|
I tried input plugin after last commit, with example fluent-bit-go/example/in_gdummy with cfg:
|
Signed-off-by: jzajic <[email protected]>
f49176a
to
53cdbe9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. 👍
…mes (fluent#6469) Fix fluent/fluent-bit-go#49 Signed-off-by: jzajic <[email protected]> Signed-off-by: root <[email protected]>
Change proxy cb_exit to correctly pass right ctx to Go callback FLBPluginExitCtx and remove global plugin related memory freeing code from this method. Add new method cb_destroy that is correctly called when whole plugin is unregistered to free up whole plugin related memory.
Fix fluent/fluent-bit-go#49 in fluent-bit-go repository.
Wrong behavior with code from current master and latest stable branch:
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.
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.
Configuration
In plugins.conf use multiinstance plugin from https://github.com/fluent/fluent-bit-go examples/out_multiinstance: