Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 916054 - app-misc/fastfetch segfaults when built with +vulkan -pci on some systems
Summary: app-misc/fastfetch segfaults when built with +vulkan -pci on some systems
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Viorel Munteanu
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-20 18:57 UTC by Christopher Fore
Modified: 2023-12-10 08:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
strace of fastfetch (strace-fastfetch,879.82 KB, text/plain)
2023-10-20 18:58 UTC, Christopher Fore
Details
gdb output of `bt` when running fastfetch (gdb-fastfetch,1.04 KB, text/plain)
2023-10-20 18:58 UTC, Christopher Fore
Details
gdb output of `bt` when running fastfetch (gdb-fastfetch,2.16 KB, text/plain)
2023-10-20 19:17 UTC, Christopher Fore
Details
valgrind output of running fastfetch (valgrind-fastfetch,4.82 KB, text/plain)
2023-10-20 19:19 UTC, Christopher Fore
Details
valgrind of fastfetch w/ debug symbols and no -march=native (valgrind-fastfetch,5.88 KB, text/plain)
2023-10-20 21:28 UTC, Christopher Fore
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Fore 2023-10-20 18:57:36 UTC
Doing some digging with strace and gdb, I found that fastfetch segfaults when it makes a call to libvulkan.so during execution. It only happens when -pci is set and works fine with +pci.
Comment 1 Christopher Fore 2023-10-20 18:57:44 UTC
Portage 3.0.52 (python 3.11.6-final-0, default/linux/amd64/23.0/llvm, gcc-13, glibc-2.38-r6, 6.5.7-gentoo-dist x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-6.5.7-gentoo-dist-x86_64-AMD_Ryzen_9_5900HX_with_Radeon_Graphics-with-glibc2.38
KiB Mem:    32173360 total,  14947464 free
KiB Swap:    8011772 total,   3412328 free
Head commit of repository gentoo: 5c71e3c951dd3470305596f2f75f211ea5aa2160

Timestamp of repository guru: Thu, 19 Oct 2023 18:31:51 +0000
Head commit of repository guru: 1caf9ef5c1266bffd7ba26a608d6ef38d747d9ee

Head commit of repository librewolf: cf0e96e73f451363acdfcdcfffe10e91296896f2

Timestamp of repository pentoo: Thu, 19 Oct 2023 18:31:51 +0000
Head commit of repository pentoo: bd7bbe77b5fee59081ea91685ae5307ca5b10811

Timestamp of repository pf4public: Thu, 19 Oct 2023 21:31:51 +0000
Head commit of repository pf4public: 16837f44c1e0fa83c67f324ffd6d654db07fe164

Timestamp of repository riscv: Wed, 18 Oct 2023 06:46:47 +0000
Head commit of repository riscv: fc1e8a17f33c49bf6d2e6368e59e2522ca048ee3

Timestamp of repository steam-overlay: Mon, 09 Oct 2023 11:02:51 +0000
Head commit of repository steam-overlay: ddede83b687eabedeb5dc5aff2d33d2e62296f90

sh bash 5.2_p15-r7
ld GNU ld (Gentoo 2.41 p2) 2.41.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r7::gentoo
dev-java/java-config:      2.3.1-r1::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.6::gentoo, 3.12.0::gentoo
dev-lang/rust:             1.73.0::gentoo
dev-lang/rust-bin:         1.72.0::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.2-r1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.51::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.41-r2::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo, 17.0.3::gentoo
sys-devel/gcc:             13.2.1_p20231014::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo, 17.0.3::gentoo
sys-devel/llvm:            16.0.6::gentoo, 17.0.3::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.5-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo
    priority: -1000
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://codeberg.org/librewolf/gentoo.git
    masters: gentoo
    volatile: False

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

pentoo
    location: /var/db/repos/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    volatile: False

pf4public
    location: /var/db/repos/pf4public
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pf4public.git
    masters: gentoo
    volatile: False

riscv
    location: /var/db/repos/riscv
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/riscv.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

Binary Repositories:

gentoobinhost
    priority: 1
    sync-uri: https://gentoo.osuosl.org/releases/amd64/binpackages/17.1/x86-64_llvm

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang -c"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=native -O3 -flto=thin -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=native -O3 -flto=thin -pipe"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O3 -flto=thin -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O3 -flto=thin -pipe"
GENTOO_MIRRORS="https://mirrors.rit.edu/gentoo/"
LANG="en_US.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,-O2 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j10"
NM="llvm-nm"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
RANLIB="llvm-ranlib"
READELF="llvm-readelf"
SHELL="/bin/zsh"
STRINGS="llvm-strings"
STRIP="llvm-strip"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr clang crypt cups dbus dri dts dvd dvdr elogind encode exif flac gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libnotify libtirpc llvm-libunwind lto lzma mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl pam pango pcre pdf pipewire png policykit ppds pulseaudio qt5 readline screencast sdl seccomp sound spell ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vorbis vulkan wayland wifi wxwidgets x264 xattr xcb xft xml xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS

=================================================================
                        Package Settings
=================================================================

app-misc/fastfetch-2.1.2::gentoo was built with the following:
USE="X dbus opengl pci pulseaudio vulkan wayland xcb -chafa -ddcutil -gnome -imagemagick -networkmanager -opencl -osmesa -sqlite -xfce -xrandr" ABI_X86="(64)"
CFLAGS="-O2 -march=native -pipe"
CXXFLAGS="-O2 -march=native -pipe"
LDFLAGS="-Wl,--as-needed"
Comment 2 Christopher Fore 2023-10-20 18:58:06 UTC
Created attachment 873175 [details]
strace of fastfetch
Comment 3 Christopher Fore 2023-10-20 18:58:27 UTC
Created attachment 873176 [details]
gdb output of `bt` when running fastfetch
Comment 4 Christopher Fore 2023-10-20 19:17:56 UTC
Created attachment 873177 [details]
gdb output of `bt` when running fastfetch
Comment 5 Christopher Fore 2023-10-20 19:19:09 UTC
Created attachment 873178 [details]
valgrind output of running fastfetch
Comment 6 Christopher Fore 2023-10-20 21:28:40 UTC
Created attachment 873183 [details]
valgrind of fastfetch w/ debug symbols and no -march=native
Comment 7 Larry the Git Cow gentoo-dev 2023-12-08 18:21:24 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=54e47dba180ae292a9e51370ca2c9cc52df993a2

commit 54e47dba180ae292a9e51370ca2c9cc52df993a2
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2023-12-08 18:08:17 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2023-12-08 18:21:13 +0000

    app-misc/fastfetch: add 2.3.4
    
    Bug: https://bugs.gentoo.org/916054
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 app-misc/fastfetch/Manifest               |   1 +
 app-misc/fastfetch/fastfetch-2.3.4.ebuild | 113 ++++++++++++++++++++++++++++++
 2 files changed, 114 insertions(+)
Comment 8 Viorel Munteanu gentoo-dev 2023-12-08 18:23:43 UTC
I still cannot reproduce this.  But I pulled in libpci as a dependency of vulkan even when USE=-pci, please check if it still crashes.

Thank you!
Comment 9 Christopher Fore 2023-12-08 18:36:03 UTC
Tried with 2.3.4 and seems like the segfaults are gone, thanks!
Comment 10 Viorel Munteanu gentoo-dev 2023-12-08 18:49:25 UTC
Thank you.  Then I'll mark it as fixed and wait a few days to see if it resurfaces.
Comment 11 Larry the Git Cow gentoo-dev 2023-12-10 08:04:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b9d40e2f2ff79ae4bd08d432fb8c347c4522bf20

commit b9d40e2f2ff79ae4bd08d432fb8c347c4522bf20
Author:     Viorel Munteanu <ceamac@gentoo.org>
AuthorDate: 2023-12-10 08:03:39 +0000
Commit:     Viorel Munteanu <ceamac@gentoo.org>
CommitDate: 2023-12-10 08:03:39 +0000

    app-misc/fastfetch: Update RDEPEND
    
    Bug: https://bugs.gentoo.org/916054
    Signed-off-by: Viorel Munteanu <ceamac@gentoo.org>

 .../fastfetch/{fastfetch-2.2.3.ebuild => fastfetch-2.2.3-r1.ebuild}  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)