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
config: increase coro stack size if it is less than pagesize(#3716) #4434
Merged
Conversation
This file contains 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
edsiper
requested changes
Dec 12, 2021
src/flb_config.c
Outdated
@@ -232,6 +232,11 @@ struct flb_config *flb_config_init() | |||
|
|||
/* Set default coroutines stack size */ | |||
config->coro_stack_size = FLB_CORO_STACK_SIZE; | |||
if (config->coro_stack_size < getpagesize()) { | |||
flb_info("[config] change coro_stack_size %u -> %u bytes", |
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.
suggestion: use slightly different wording changing coro_stack_size from %u to %u bytes
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.
Thank you.
I modified the log message.
edsiper
added
waiting-for-user
Waiting for more information, tests or requested changes
and removed
docs-required
labels
Dec 12, 2021
Debug log
Full log:
|
0Delta
pushed a commit
to 0Delta/fluent-bit
that referenced
this pull request
Jan 20, 2022
) (fluent#4434) On some environment, PTHREAD_STACK_MIN is less than pagesize. The coro stack size is less than page size and it causes aborting coro stack size error. This patch is to ensure minimum coro stack size is greater equal pagesize. Signed-off-by: Takahiro Yamashita <nokute78@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Fixes #3716
On some environment, PTHREAD_STACK_MIN is less than pagesize.
The coro stack size is less than page size and it causes aborting coro stack size error.
This patch is to ensure minimum coro stack size is greater equal pagesize.
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:
Documentation
Debug log
I modified FLB_CORO_STACK_SIZE is 10 and tested.
If user sets small coro stack size, fluent-bit stops booting.
Valgrind output
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.