Skip to content

Commit 51c5475

Browse files
committed
fluent-bit: update to 5.0.8, adopt maintainer, fix musl startup segfault
Update 4.2.0 -> 5.0.8 and add me as maintainer. fluent-bit segfaulted at startup on every musl target, failing CI for any PR touching this feed (all versions). Upstream's C-TLS CMake probe calls the glibc-only __tls_get_addr(), which fails to link on musl, so it falls back to a pthread_key_t path that calls pthread_getspecific() before pthread_key_create(). musl's getspecific is an unchecked self->tsd[key], so the NULL TSD array is dereferenced; glibc bounds-checks and returns NULL, hiding the bug there. Force -DFLB_HAVE_C_TLS:BOOL=On to keep the native __thread path (fully supported on musl). Verified on x86_64: starts and passes the generic test instead of crashing. Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
1 parent 3a1eab7 commit 51c5475

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

admin/fluent-bit/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=fluent-bit
4-
PKG_VERSION:=4.2.0
5-
PKG_RELEASE:=2
4+
PKG_VERSION:=5.0.8
5+
PKG_RELEASE:=1
66

77
PKG_SOURCE_PROTO:=git
88
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
99
PKG_SOURCE_VERSION=v$(PKG_VERSION)
10-
PKG_MIRROR_HASH:=cad2d94cf7a720a3910c781f80187e2c399aa8acbfa1046aa7445a4d1495fafd
10+
PKG_MIRROR_HASH:=e512206f301abee2f326a62faeaae258d1a2b3a5d698d6c4dc45909d0a9e0dca
1111

12+
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
1213
PKG_LICENSE:=Apache-2.0
1314
PKG_LICENSE_FILES:=LICENSE
1415
PKG_CPE_ID:=cpe:/a:treasuredata:fluent_bit
@@ -36,6 +37,8 @@ endef
3637

3738
TARGET_LDFLAGS +=-lfts -latomic
3839

40+
# Force native __thread TLS: upstream's C-TLS probe calls glibc-only
41+
# __tls_get_addr() and fails on musl, falling back to a crashing pthread_key path.
3942
CMAKE_OPTIONS+= \
4043
-DFLB_RELEASE=Yes \
4144
-DEXCLUDE_FROM_ALL=true \
@@ -46,7 +49,8 @@ CMAKE_OPTIONS+= \
4649
-DFLB_LUAJIT=No \
4750
-DWITH_SASL=No \
4851
-DWITH_ZLIB=No \
49-
-DWITH_ZSTD=No
52+
-DWITH_ZSTD=No \
53+
-DFLB_HAVE_C_TLS:BOOL=On
5054

5155
define Package/fluent-bit/install
5256
$(INSTALL_DIR) $(1)/usr/sbin

0 commit comments

Comments
 (0)