netdata v2.2.0+ turning on LTO may cause crash #268

Open
opened 2025-01-31 10:56:39 +01:00 by sommio · 3 comments

I updated netdata to v2.2.0 a few days ago and it crashed itself after running for a while.

I later compiled v2.2.1 based on PKGBUILD from the Arch repository and everything worked fine. Until today when I updated to ALHP/extra-x86-64-v3/netdata and it started crashing as before, I suspect it's a LTO issue as my makepkg.conf doesn't have LTO turned on.

I switched to extra/netdata v2.1.1 and everything works fine.

CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"`

#-- Compiler and Linker Flags
CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \
        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
        -fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
         -Wl,-z,pack-relative-relocs -fuse-ld=mold"
LTOFLAGS="-flto=thin"
RUSTFLAGS="-C opt-level=2 -C target-cpu=native -C link-arg=-fuse-ld=mold"
#-- Make Flags: change this for DistCC/SMP systems
MAKEFLAGS="-j$(nproc --ignore=1)"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
DEBUG_RUSTFLAGS="-C debuginfo=2"
I updated netdata to v2.2.0 a few days ago and [it crashed itself after running](https://github.com/netdata/netdata/issues/19503) for a while. I later compiled v2.2.1 based on [PKGBUILD](https://gitlab.archlinux.org/archlinux/packaging/packages/netdata/-/blob/main/PKGBUILD) from the Arch repository and everything worked fine. Until today when I updated to ALHP/extra-x86-64-v3/netdata and it started crashing as before, I suspect it's a LTO issue as my makepkg.conf doesn't have LTO turned on. I switched to extra/netdata v2.1.1 and everything works fine. ``` CARCH="x86_64" CHOST="x86_64-pc-linux-gnu"` #-- Compiler and Linker Flags CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -fstack-clash-protection -fcf-protection" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" LDFLAGS="-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ -Wl,-z,pack-relative-relocs -fuse-ld=mold" LTOFLAGS="-flto=thin" RUSTFLAGS="-C opt-level=2 -C target-cpu=native -C link-arg=-fuse-ld=mold" #-- Make Flags: change this for DistCC/SMP systems MAKEFLAGS="-j$(nproc --ignore=1)" #-- Debugging flags DEBUG_CFLAGS="-g" DEBUG_CXXFLAGS="$DEBUG_CFLAGS" DEBUG_RUSTFLAGS="-C debuginfo=2" ```
Owner

I'll add it to the non-lto list and rebuild, thanks for investigating :)

I'll add it to the non-lto list and rebuild, thanks for investigating :)
Owner

Rebuild queued.

Rebuild queued.
anonfunc added the
bug
label 2025-02-18 00:32:20 +01:00
Owner

Can you confirm its working with the non-lto rebuild?

Can you confirm its working with the non-lto rebuild?
Sign in to join this conversation.
No description provided.