fluent-bit: update to 5.0.8, adopt maintainer, fix musl startup segfault#29914
fluent-bit: update to 5.0.8, adopt maintainer, fix musl startup segfault#29914commodo wants to merge 1 commit into
Conversation
|
So... it fixes #29777 this one, right? |
yes; |
|
Can we do something about this one? fluent-bit: [warn] Binary /usr/sbin/fluent-bit contains a hardcoded build path |
| -DWITH_ZLIB=No \ | ||
| -DWITH_ZSTD=No | ||
| -DWITH_ZSTD=No \ | ||
| -DFLB_HAVE_C_TLS:BOOL=On |
There was a problem hiding this comment.
Is this what's causing the segfault or is it -DFLB_CORO_STACK_SIZE=4096?
There was a problem hiding this comment.
short answer: yes;
the crash is in pthread_getspecific() https://github.com/fluent/fluent-bit/blob/v5.0.8/include/fluent-bit/flb_thread_storage.h#L32-L69
when FLB_HAVE_C_TLS is undefined, then #define FLB_TLS_GET(key) pthread_getspecific(key)
the implementation differs from glibc to musl
glibc:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/pthread_getspecific.c;hb=HEAD
musl:
https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_getspecific.c
basically, for musl, we need to enforce thread-local-storage, otherwise pthread_getspecific() crashes, because it calls pthread_key_create() before pthread_getspecific().
glibc's pthread_getspecific() doesn't crash
this may be fixable also upstream in fluent-bit;
i'll report it
There was a problem hiding this comment.
Update 4.2.0 -> 5.0.8 and adopt maintainership. fluent-bit segfaulted at startup on every musl target: under GCC 14 the upstream C-TLS probe no longer compiles (undeclared __tls_get_addr), so the pthread_key fallback calls pthread_getspecific() before pthread_key_create() and derefs a NULL tsd array on musl (glibc is unaffected). Force -DFLB_HAVE_C_TLS:BOOL=On for __thread TLS. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
We can patch it. |
📦 Package Details
Maintainer: me
Description:
Update 4.2.0 -> 5.0.8 and adopt maintainership. fluent-bit segfaulted at
startup on every musl target: under GCC 14 the upstream C-TLS probe no longer
compiles (undeclared __tls_get_addr), so the pthread_key fallback calls
pthread_getspecific() before pthread_key_create() and derefs a NULL tsd array
on musl (glibc is unaffected). Force -DFLB_HAVE_C_TLS:BOOL=On for __thread TLS.
Fixes #29777
🧪 Run Testing Details
✅ Formalities