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
Co-routine stack size check is failure prone #3716
Comments
The same thing happens on FreeBSD. Running just
Would it be acceptable to simply set coro_stack_size to getpagesize() if the default is smaller and it isn't otherwise configured? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I would ask of the repo maintainers to remove the auto stale bot. I have nothing to do with upstream not answering this issue yet. If the bot pings the issue again I will just close it and give up on the bug report. |
It seems stupid that the binary just fails to run unless you set the coro_stack_size? I maintain the FreeBSD port, and I'm patching the source to double the stack size, in wait for a better fix. |
There is a known problem with the default coro_stack_size being too small. Double it to avoid failing to start. [1] Since the daemon option seems to be somewhat funky [2], use daemon to wrap the fluent-bit binary when running from the rc.d script. [1] fluent/fluent-bit#3716 PR: 255593 [2]
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Could someone please have a look at this issue, maybe it's not controversial and can be fixed easily? |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Aaaand, bump |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
another bump |
note: we are adjusting the auto-stale bot, quite noisy. assigning @nokute78 to review this. |
I agree. I sent a patch #4434 to change the default size if it is smaller than page size. |
…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>
) (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>
Bug Report
Describe the bug
As seen in #2464, launching fluent-bit makes it spit out this error message:
This happens due to
fluent-bit/src/fluent-bit.c
Line 1111 in 5ffc991
fluent-bit/include/fluent-bit/flb_coro.h
Line 68 in 5ffc991
musl defines
PTHREAD_STACK_MIN
to 2048, which means that the result ofPTHREAD_STACK_MIN * 3 / 2
is 3072, which is definitely smaller than whatgetpagesize()
returns (4096 on most platforms). I'm not sure what the best solution here is, either don't usegetpagesize
as the basis for the check, or use the maximum betweengetpagesize
andPTHREAD_STACK_MIN * 3 / 2
.This also fails on platforms that support 64k pages (aarch64 and ppc64), even when using glibc. Most aarch64 machines won't be configured that way, but to my knowledge all ppc64 distros besides Void Linux use 64k pages.
To Reproduce
Simply try to launch fluent-bit when built against musl libc.
Expected behavior
It will at least launch.
Your Environment
The text was updated successfully, but these errors were encountered: