Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 942396

Summary: gui-libs/egl-x11: broken when compiled with clang and >= -O1 (causes e.g. eglinfo, gnucash, prusaslicer, and more to crash)
Product: Gentoo Linux Reporter: Miroslav Šulc <fordfrog>
Component: Current packagesAssignee: Ionen Wolkens <ionen>
Status: CONFIRMED ---    
Severity: normal CC: soap
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://github.com/NVIDIA/egl-x11/issues/4
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 915000    

Description Miroslav Šulc gentoo-dev 2024-10-28 08:52:38 UTC
i noticed this issue with prusaslicer and gnucash:

Thread 1 "slic3r_main" received signal SIGSEGV, Segmentation fault.
0x00007fffd5c1ef7f in ?? () from /usr/lib64/libnvidia-egl-xlib.so.1
(gdb) bt
#0  0x00007fffd5c1ef7f in ??? () at /usr/lib64/libnvidia-egl-xlib.so.1
#1  0x00007fff9d0afee0 in ??? () at /usr/lib64/libEGL_nvidia.so.0
#2  0x00007fff9d04d34c in ??? () at /usr/lib64/libEGL_nvidia.so.0
#3  0x00007fffe92ebead in ??? () at /usr/lib64/libEGL.so.1
#4  0x00007ffff028af2a in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#5  0x00007ffff01b7684 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#6  0x00007fffee2c1cac in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#7  0x00007fffed811627 in ??? () at /lib64/libc.so.6
#8  0x00007fffed811699 in pthread_once () at /lib64/libc.so.6
#9  0x00007fffee2c21de in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#10 0x00007fffee2c197f in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#11 0x00007fffee2cb32b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#12 0x00007fffee2cb3bd in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#13 0x00007fffee2d56c7 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#14 0x00007fffee0ea376 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#15 0x00007fffee0d3e2b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#16 0x00007fffee0d43a6 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#17 0x00007fffee14cbea in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#18 0x00007fffee14d7eb in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#19 0x00007fffee2027fe in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#20 0x00007ffff2a20906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#21 0x00007ffff2a1fcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#22 0x00007fffee1fde91 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#23 0x00007ffff2143aa4 in g_once_impl () at /usr/lib64/libglib-2.0.so.0
#24 0x00007ffff3ae286c in wxWebViewWebKit::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) () at /usr/lib64/libwx_gtk3u_webview-3.2-gtk3.so.0
#25 0x0000555556be5b8a in WebView::CreateWebView(wxWindow*, wxString const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) ()
#26 0x0000555556be1a90 in Slic3r::GUI::WebViewPanel::WebViewPanel(wxWindow*, wxString const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) ()
#27 0x0000555556be1fb4 in Slic3r::GUI::ConnectWebViewPanel::ConnectWebViewPanel(wxWindow*) ()
#28 0x00005555567a883f in Slic3r::GUI::MainFrame::create_preset_tabs() ()
#29 0x00005555567a8fa0 in Slic3r::GUI::MainFrame::init_tabpanel() ()
#30 0x00005555567ac8eb in Slic3r::GUI::MainFrame::MainFrame(int) ()
#31 0x000055555677b644 in Slic3r::GUI::GUI_App::on_init_inner() ()
#32 0x000055555677d02d in Slic3r::GUI::GUI_App::OnInit() ()
#33 0x00007ffff3d2b912 in wxEntry(int&, wchar_t**) () at /usr/lib64/libwx_baseu-3.2-gtk3.so.0
#34 0x0000555556752ca8 in Slic3r::GUI::GUI_Run(Slic3r::GUI::GUI_InitParams&) ()
#35 0x0000555555d51119 in Slic3r::CLI::run(int, char**) ()
#36 0x0000555555d232df in main ()


Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
0x00007fffc2a4ef7f in ?? () from /usr/lib64/libnvidia-egl-xlib.so.1
(gdb) bt
#0  0x00007fffc2a4ef7f in ??? () at /usr/lib64/libnvidia-egl-xlib.so.1
#1  0x00007fffb92afee0 in ??? () at /usr/lib64/libEGL_nvidia.so.0
#2  0x00007fffb924d34c in ??? () at /usr/lib64/libEGL_nvidia.so.0
#3  0x00007fffebf1bead in ??? () at /usr/lib64/libEGL.so.1
#4  0x00007ffff108af2a in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#5  0x00007ffff0fb7684 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#6  0x00007fffef0c1cac in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#7  0x00007ffff64a8627 in ??? () at /lib64/libc.so.6
#8  0x00007ffff64a8699 in pthread_once () at /lib64/libc.so.6
#9  0x00007fffef0c21de in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#10 0x00007fffef0c197f in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#11 0x00007fffef0cb32b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#12 0x00007fffef0cb3bd in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#13 0x00007fffef0d56c7 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#14 0x00007fffeeeea376 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#15 0x00007fffeeed3e2b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#16 0x00007fffeeed43a6 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#17 0x00007fffeef4cbea in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#18 0x00007fffeef4d7eb in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#19 0x00007fffef0027fe in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#20 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#21 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#22 0x00007fffeeffde91 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#23 0x00007ffff6b43aa4 in g_once_impl () at /usr/lib64/libglib-2.0.so.0
#24 0x00007fffef00fa15 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#25 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#26 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#27 0x00007ffff5657412 in ??? () at /usr/lib64/gnucash/libgnc-html.so
#28 0x00007ffff6904762 in g_type_create_instance () at /usr/lib64/libgobject-2.0.so.0
#29 0x00007ffff68ee7d0 in ??? () at /usr/lib64/libgobject-2.0.so.0
#30 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#31 0x00007ffff7cc106f in ??? () at /usr/lib64/libgnc-gnome.so
#32 0x00007ffff7b3805d in gnc_plugin_page_create_widget () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#33 0x00007ffff7b2b2f5 in gnc_main_window_open_page () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#34 0x00007ffff7b2c969 in gnc_main_window_restore_all_windows () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#35 0x00007ffff7cca988 in ??? () at /usr/lib64/libgnc-gnome.so
#36 0x00007ffff6dfe863 in ??? () at /usr/lib64/libgnc-engine.so
#37 0x00007ffff6b048d1 in g_hook_list_marshal () at /usr/lib64/libglib-2.0.so.0
#38 0x00007ffff6dff34a in gnc_hook_run () at /usr/lib64/libgnc-engine.so
#39 0x00007ffff7b1adb9 in ??? () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#40 0x00005555555653ba in ??? ()
#41 0x00007ffff7d832f1 in invoke_main_func () at /usr/lib64/libguile-3.0.so.1
#42 0x00007ffff7d5fd7e in c_body () at /usr/lib64/libguile-3.0.so.1
#43 0x00007ffff7df0b38 in vm_regular_engine () at /usr/lib64/libguile-3.0.so.1
#44 0x00007ffff7decc86 in scm_call_n () at /usr/lib64/libguile-3.0.so.1
#45 0x00007ffff7d6632c in scm_call_2 () at /usr/lib64/libguile-3.0.so.1
#46 0x00007ffff7d68bd9 in scm_c_with_exception_handler () at /usr/lib64/libguile-3.0.so.1
#47 0x00007ffff7de958f in scm_c_catch () at /usr/lib64/libguile-3.0.so.1
#48 0x00007ffff7d5fd3c in scm_c_with_continuation_barrier () at /usr/lib64/libguile-3.0.so.1
#49 0x00007ffff7de928a in with_guile () at /usr/lib64/libguile-3.0.so.1
#50 0x00007ffff59ef8b6 in GC_call_with_stack_base () at /usr/lib64/libgc.so.1
#51 0x00007ffff7de711d in scm_with_guile () at /usr/lib64/libguile-3.0.so.1
#52 0x00007ffff7d832b9 in scm_boot_guile () at /usr/lib64/libguile-3.0.so.1
#53 0x0000555555564705 in Gnucash::Gnucash::start(int, char**) ()
#54 0x00005555555641c0 in main ()


to reproduce the issue, it's enough to install the mentioned version of nvidia driver and run the apps. they just crash on startup.

$ uname -a
Linux xxxx 6.11.5-gentoo-r1 #1 SMP PREEMPT_DYNAMIC Fri Oct 25 23:37:46 CEST 2024 x86_64 13th Gen Intel(R) Core(TM) i9-13980HX GenuineIntel GNU/Linux
Comment 1 Ionen Wolkens gentoo-dev 2024-10-28 09:22:10 UTC
What DE/compositor?

This is wayland, right? egl-x11 shouldn't be used on non-wayland systems as far as I'm aware, it's for xwayland.. but I could be wrong.

emerge --info? (I assume this is a full ~testing system if using 565?)

Does it still happen if downgrade to stable gui-libs/egl-wayland-1.1.13.1? (this disables explicit sync, it's already known to cause issues with some applications to crash, sometimes due to the application misusing wayland rather than an nvidia bug).
Comment 2 Ionen Wolkens gentoo-dev 2024-10-28 09:35:23 UTC
(In reply to Ionen Wolkens from comment #1)
> Does it still happen if downgrade to stable gui-libs/egl-wayland-1.1.13.1?
(note should restart the DE after downgrading to ensure explicit sync is disabled everywhere)
Comment 3 Ionen Wolkens gentoo-dev 2024-10-28 09:55:49 UTC
I just tried gnucash and it starts fine for me, on both x11 and wayland. Did I need to do anything special to make it crash? (haven't tried to actually use it)

Tested using Plasma 6 on a stable system except for using ~arch nvidia-drivers-565.57.01-r2 + egl-wayland-1.1.17_pre20241015.

Albeit just noticed /usr/lib64/gnucash/libgnc-gnome-utils.so in your backtraces, so I assume you're using gnome? (don't have gnome setup atm, could be a gnome-specific issue). Afaik explicit sync isn't usable w/ mutter/gnome yet, so downgrading egl-wayland probably won't change anything.
Comment 4 Ionen Wolkens gentoo-dev 2024-10-28 09:56:31 UTC
(In reply to Ionen Wolkens from comment #3)
> I just tried gnucash and it starts fine for me, on both x11 and wayland. Did
> I need to do anything special to make it crash? (haven't tried to actually
> use it)
or well, re-reading, given you said they should crash startup, guess not.
Comment 5 Ionen Wolkens gentoo-dev 2024-10-28 10:06:41 UTC
(In reply to Ionen Wolkens from comment #3)
> Albeit just noticed /usr/lib64/gnucash/libgnc-gnome-utils.so in your
> backtraces, so I assume you're using gnome? (don't have gnome setup atm,
> could be a gnome-specific issue).
Actually just tried gnome+wayland and gnucash started fine there too.

So, no idea why it's crashing for you atm.

Any fancy *FLAGS? (aka emerge --info again), fwiw egl-x11 is fairly new/untested and could be sensitive.
Comment 6 Miroslav Šulc gentoo-dev 2024-10-28 10:12:08 UTC
i use xfce.


# emerge --info
Portage 3.0.66.1 (python 3.13.0-final-0, default/linux/amd64/23.0/split-usr/hardened, gcc-14, glibc-2.40-r5, 6.11.5-gentoo-r1 x86_64)
=================================================================
System uname: Linux-6.11.5-gentoo-r1-x86_64-13th_Gen_Intel-R-_Core-TM-_i9-13980HX-with-glibc2.40
KiB Mem:    65443848 total,  54711444 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Mon, 28 Oct 2024 08:18:33 +0000
Head commit of repository gentoo: f8ca336d5147c6da80e53c9287da27b71b9fb91d

Timestamp of repository flavour: Mon, 14 Oct 2024 12:50:25 +0000
Head commit of repository flavour: 921982bf77489257f299ceeb5e8bb7cd0277fe22

Timestamp of repository fordfrog: Tue, 08 Oct 2024 15:50:50 +0000
Head commit of repository fordfrog: 91ad4458e867c776a68047169b58891879787667

Timestamp of repository gentoo-zh: Mon, 28 Oct 2024 04:03:16 +0000
Head commit of repository gentoo-zh: 33f482331f248d3ba06f19cd73c38a7a85a3acc8

Head commit of repository librewolf: a5f3e5866200f1de7217cd7e917f6cfb56bb28e9

Timestamp of repository pf4public: Sun, 27 Oct 2024 15:33:22 +0000
Head commit of repository pf4public: e06d49bdc7dc826f53a9a519a26f3d9da7e1edc5

sh bash 5.2_p37
ld GNU ld (Gentoo 2.43 p2) 2.43.1
ccache version 4.10.2 [disabled]
app-misc/pax-utils:        1.3.8::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.17-r1::gentoo
dev-build/cmake:           3.30.5::gentoo
dev-build/libtool:         2.5.3::gentoo
dev-build/make:            4.4.1-r100::gentoo
dev-build/meson:           1.6.0::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.7_p1::gentoo, 3.13.0::gentoo
dev-lang/rust-bin:         1.82.0::gentoo
dev-util/ccache:           4.10.2-r1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.55.1::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.43-r1::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           18.1.8::gentoo, 19.1.2::gentoo
sys-devel/gcc:             13.3.1_p20240920::gentoo, 14.2.1_p20240921::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/lld:             19.1.2::gentoo
sys-devel/llvm:            18.1.8-r4::gentoo, 19.1.2::gentoo
sys-kernel/linux-headers:  6.11::gentoo (virtual/os-headers)
sys-libs/glibc:            2.40-r5::gentoo
Repositories:

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

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

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

gentoo-zh
    location: /var/db/repos/gentoo-zh
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-zh.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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA android AnyDesk-TOS NVIDIA-SDK PUEL-12"
AR="llvm-ar"
CBUILD="x86_64-pc-linux-gnu"
CC="clang"
CFLAGS="-march=alderlake -mpopcnt -mlzcnt -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.9/conf /var/bind /var/lib/hsqldb"
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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-march=alderlake -mpopcnt -mlzcnt -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk -O2 -pipe -frecord-gcc-switches"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--misspell-suggestions n"
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=alderlake -mpopcnt -mlzcnt -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait 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=alderlake -mpopcnt -mlzcnt -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk -O2 -pipe -frecord-gcc-switches"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="cs_CZ.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="cs cs_CZ en en_US en_UK"
MAKEOPTS="-j33"
NM="llvm-nm"
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"
SHELL="/bin/bash"
USE="X a52 aac aacplus acl alsa amd64 aubio bluetooth btrfs bzip2 cdda cddb cdr cet color-management colord crypt cuda cups dbus dia dssi dvb dvd elogind exif ffmpeg flac gdbm gegl gif gles gles1 gles2 gles3 gphoto2 gsm gtk gtk3 hardened hddtemp http2 iconv icu id3tag ipv6 jack jack-dbus jacksession javafx jpeg keyring kwallet ladspa lastfm latex lcms libass libnotify libproxy libsamplerate libtirpc lilypond lm-sensors lto lv2 mad modplug mp3 mpeg mpi mtp multilib musepack ncurses nls ntfs nvme ocr ogg opencl openexr opengl openmp optix opus osc pam pcre pdf pic pie pipewire png policykit pulseaudio qt5 qt6 raw readline rubberband samba scanner screencast seccomp sf2 sndfile soundio speex spell split-usr ssl ssp startup-notification svg svg2 taglib test-rust theora tiff timidity tk tray truetype udev unicode usb vaapi vamp vdpau verify-sig visio vorbis vpx vst vulkan wavpack wayland webp widevine wmf x264 x265 xattr xfce xinerama xmp xtpax xv xvid zlib" ABI_X86="32 64" ADA_TARGET="gcc_12" APACHE2_MODULES="alias auth_basic authn_core authn_file authz_core authz_host authz_user cgi cgid deflate dir expires filter headers http2 include info log_config mime mime_magic negotiation proxy proxy_ajp rewrite setenvif socache_shmcb status unixd vhost_alias" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev libinput wacom" KERNEL="linux" L10N="cs cs-CZ en en-US en-UK" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="NVPTX" LUA_SINGLE_TARGET="luajit lua5-4" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_11 python3_12 python3_13" RUBY_TARGETS="ruby31 ruby32 ruby33" SANE_BACKENDS="genesys" VIDEO_CARDS="fbdev intel nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 7 Miroslav Šulc gentoo-dev 2024-10-28 10:23:57 UTC
this is with debug used for egl-x11 and nvidia-drivers:

Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
eplGetPlatformDisplayExport (platformData=0x55555683ec40, platform=12757, nativeDisplay=0x5555556df640, attribs=<optimized out>) at ../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c:620
warning: 620	../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c: No such file or directory
(gdb) bt
#0  eplGetPlatformDisplayExport (platformData=0x55555683ec40, platform=12757, nativeDisplay=0x5555556df640, attribs=<optimized out>) at ../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c:620
#1  0x00007fffb92afee0 in ??? () at /usr/lib64/libEGL_nvidia.so.0
#2  0x00007fffb924d34c in ??? () at /usr/lib64/libEGL_nvidia.so.0
#3  0x00007fffebf1bead in ??? () at /usr/lib64/libEGL.so.1
#4  0x00007ffff108af2a in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#5  0x00007ffff0fb7684 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#6  0x00007fffef0c1cac in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#7  0x00007ffff64a8627 in ??? () at /lib64/libc.so.6
#8  0x00007ffff64a8699 in pthread_once () at /lib64/libc.so.6
#9  0x00007fffef0c21de in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#10 0x00007fffef0c197f in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#11 0x00007fffef0cb32b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#12 0x00007fffef0cb3bd in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#13 0x00007fffef0d56c7 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#14 0x00007fffeeeea376 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#15 0x00007fffeeed3e2b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#16 0x00007fffeeed43a6 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#17 0x00007fffeef4cbea in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#18 0x00007fffeef4d7eb in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#19 0x00007fffef0027fe in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#20 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#21 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#22 0x00007fffeeffde91 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#23 0x00007ffff6b43aa4 in g_once_impl () at /usr/lib64/libglib-2.0.so.0
#24 0x00007fffef00fa15 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#25 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#26 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#27 0x00007ffff5657412 in ??? () at /usr/lib64/gnucash/libgnc-html.so
#28 0x00007ffff6904762 in g_type_create_instance () at /usr/lib64/libgobject-2.0.so.0
#29 0x00007ffff68ee7d0 in ??? () at /usr/lib64/libgobject-2.0.so.0
#30 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#31 0x00007ffff7cc106f in ??? () at /usr/lib64/libgnc-gnome.so
#32 0x00007ffff7b3805d in gnc_plugin_page_create_widget () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#33 0x00007ffff7b2b2f5 in gnc_main_window_open_page () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#34 0x00007ffff7b2c969 in gnc_main_window_restore_all_windows () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#35 0x00007ffff7cca988 in ??? () at /usr/lib64/libgnc-gnome.so
#36 0x00007ffff6dfe863 in ??? () at /usr/lib64/libgnc-engine.so
#37 0x00007ffff6b048d1 in g_hook_list_marshal () at /usr/lib64/libglib-2.0.so.0
#38 0x00007ffff6dff34a in gnc_hook_run () at /usr/lib64/libgnc-engine.so
#39 0x00007ffff7b1adb9 in ??? () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#40 0x00005555555653ba in ??? ()
#41 0x00007ffff7d832f1 in invoke_main_func () at /usr/lib64/libguile-3.0.so.1
#42 0x00007ffff7d5fd7e in c_body () at /usr/lib64/libguile-3.0.so.1
#43 0x00007ffff7df0b38 in vm_regular_engine () at /usr/lib64/libguile-3.0.so.1
#44 0x00007ffff7decc86 in scm_call_n () at /usr/lib64/libguile-3.0.so.1
#45 0x00007ffff7d6632c in scm_call_2 () at /usr/lib64/libguile-3.0.so.1
#46 0x00007ffff7d68bd9 in scm_c_with_exception_handler () at /usr/lib64/libguile-3.0.so.1
#47 0x00007ffff7de958f in scm_c_catch () at /usr/lib64/libguile-3.0.so.1
#48 0x00007ffff7d5fd3c in scm_c_with_continuation_barrier () at /usr/lib64/libguile-3.0.so.1
#49 0x00007ffff7de928a in with_guile () at /usr/lib64/libguile-3.0.so.1
#50 0x00007ffff59ef8b6 in GC_call_with_stack_base () at /usr/lib64/libgc.so.1
#51 0x00007ffff7de711d in scm_with_guile () at /usr/lib64/libguile-3.0.so.1
#52 0x00007ffff7d832b9 in scm_boot_guile () at /usr/lib64/libguile-3.0.so.1
#53 0x0000555555564705 in Gnucash::Gnucash::start(int, char**) ()
#54 0x00005555555641c0 in main ()
Comment 8 Miroslav Šulc gentoo-dev 2024-10-28 10:29:01 UTC
this is with egl-wayland-1.1.13.1:

Thread 1 "gnucash" received signal SIGSEGV, Segmentation fault.
eplGetPlatformDisplayExport (platformData=0x555556841af0, platform=12757, nativeDisplay=0x5555556df640, attribs=<optimized out>) at ../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c:620
warning: 620	../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c: No such file or directory
(gdb) bt
#0  eplGetPlatformDisplayExport (platformData=0x555556841af0, platform=12757, nativeDisplay=0x5555556df640, attribs=<optimized out>) at ../egl-x11-8aac36c712561ebfecc82af3db15c50cd0d573fb/src/base/platform-base.c:620
#1  0x00007fffb92afee0 in ??? () at /usr/lib64/libEGL_nvidia.so.0
#2  0x00007fffb924d34c in ??? () at /usr/lib64/libEGL_nvidia.so.0
#3  0x00007fffebf1bead in ??? () at /usr/lib64/libEGL.so.1
#4  0x00007ffff108af2a in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#5  0x00007ffff0fb7684 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#6  0x00007fffef0c1cac in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#7  0x00007ffff64a8627 in ??? () at /lib64/libc.so.6
#8  0x00007ffff64a8699 in pthread_once () at /lib64/libc.so.6
#9  0x00007fffef0c21de in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#10 0x00007fffef0c197f in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#11 0x00007fffef0cb32b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#12 0x00007fffef0cb3bd in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#13 0x00007fffef0d56c7 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#14 0x00007fffeeeea376 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#15 0x00007fffeeed3e2b in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#16 0x00007fffeeed43a6 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#17 0x00007fffeef4cbea in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#18 0x00007fffeef4d7eb in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#19 0x00007fffef0027fe in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#20 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#21 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#22 0x00007fffeeffde91 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#23 0x00007ffff6b43aa4 in g_once_impl () at /usr/lib64/libglib-2.0.so.0
#24 0x00007fffef00fa15 in ??? () at /usr/lib64/libwebkit2gtk-4.1.so.0
#25 0x00007ffff68ee906 in ??? () at /usr/lib64/libgobject-2.0.so.0
#26 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#27 0x00007ffff5657412 in ??? () at /usr/lib64/gnucash/libgnc-html.so
#28 0x00007ffff6904762 in g_type_create_instance () at /usr/lib64/libgobject-2.0.so.0
#29 0x00007ffff68ee7d0 in ??? () at /usr/lib64/libgobject-2.0.so.0
#30 0x00007ffff68edcd6 in g_object_new () at /usr/lib64/libgobject-2.0.so.0
#31 0x00007ffff7cc106f in ??? () at /usr/lib64/libgnc-gnome.so
#32 0x00007ffff7b3805d in gnc_plugin_page_create_widget () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#33 0x00007ffff7b2b2f5 in gnc_main_window_open_page () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#34 0x00007ffff7b2c969 in gnc_main_window_restore_all_windows () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#35 0x00007ffff7cca988 in ??? () at /usr/lib64/libgnc-gnome.so
#36 0x00007ffff6dfe863 in ??? () at /usr/lib64/libgnc-engine.so
#37 0x00007ffff6b048d1 in g_hook_list_marshal () at /usr/lib64/libglib-2.0.so.0
#38 0x00007ffff6dff34a in gnc_hook_run () at /usr/lib64/libgnc-engine.so
#39 0x00007ffff7b1adb9 in ??? () at /usr/lib64/gnucash/libgnc-gnome-utils.so
#40 0x00005555555653ba in ??? ()
#41 0x00007ffff7d832f1 in invoke_main_func () at /usr/lib64/libguile-3.0.so.1
#42 0x00007ffff7d5fd7e in c_body () at /usr/lib64/libguile-3.0.so.1
#43 0x00007ffff7df0b38 in vm_regular_engine () at /usr/lib64/libguile-3.0.so.1
#44 0x00007ffff7decc86 in scm_call_n () at /usr/lib64/libguile-3.0.so.1
#45 0x00007ffff7d6632c in scm_call_2 () at /usr/lib64/libguile-3.0.so.1
#46 0x00007ffff7d68bd9 in scm_c_with_exception_handler () at /usr/lib64/libguile-3.0.so.1
#47 0x00007ffff7de958f in scm_c_catch () at /usr/lib64/libguile-3.0.so.1
#48 0x00007ffff7d5fd3c in scm_c_with_continuation_barrier () at /usr/lib64/libguile-3.0.so.1
#49 0x00007ffff7de928a in with_guile () at /usr/lib64/libguile-3.0.so.1
#50 0x00007ffff59ef8b6 in GC_call_with_stack_base () at /usr/lib64/libgc.so.1
#51 0x00007ffff7de711d in scm_with_guile () at /usr/lib64/libguile-3.0.so.1
#52 0x00007ffff7d832b9 in scm_boot_guile () at /usr/lib64/libguile-3.0.so.1
#53 0x0000555555564705 in Gnucash::Gnucash::start(int, char**) ()
#54 0x00005555555641c0 in main ()
Comment 9 Miroslav Šulc gentoo-dev 2024-10-28 10:32:24 UTC
ok, so i recompiled egl-x11 with gcc and now gnucash doesn't crash nor prusaslicer.
Comment 10 Ionen Wolkens gentoo-dev 2024-10-28 10:59:37 UTC
(In reply to Miroslav Šulc from comment #9)
> ok, so i recompiled egl-x11 with gcc and now gnucash doesn't crash nor
> prusaslicer.
Ah, clang.. yep I can reproduce now, don't even need gnucash

$ eglinfo
EGL client extensions string:
    EGL_EXT_client_extensions, EGL_EXT_device_base, 
    EGL_EXT_device_enumeration, EGL_EXT_device_query, EGL_EXT_explicit_device, 
    EGL_EXT_platform_base, EGL_EXT_platform_device, EGL_EXT_platform_x11, 
    EGL_EXT_platform_xcb, EGL_KHR_client_get_all_proc_addresses, 
    EGL_KHR_debug, EGL_KHR_platform_gbm, EGL_KHR_platform_x11, 
    EGL_MESA_platform_gbm, EGL_MESA_platform_surfaceless

GBM platform:
eglinfo: eglInitialize failed

Segmentation fault
Comment 11 Ionen Wolkens gentoo-dev 2024-10-28 11:14:05 UTC
As far as I'm aware egl-x11 is still not really used on "real" x11 (despite the name), but I think it crashes while probing whether it's needed or not (fwiw it's not installed with USE=-wayland or with older drivers).
Comment 12 Larry the Git Cow gentoo-dev 2024-10-28 11:15:55 UTC
The bug has been referenced in the following commit(s):

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

commit 899426ac479fc0c4d38d746143561e369d47a2e5
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-10-28 11:07:02 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-10-28 11:15:12 +0000

    gui-libs/egl-x11: quick workaround for clang
    
    Not really looked at what exactly causes this yet, but fwiw "seems"
    fine if compiled with -O0 (which implies there's likely some UB in
    egl-x11's code).
    
    Optimizations are not important for this library, so do a quick -O0
    workaround for the time being.
    
    Bug: https://bugs.gentoo.org/942396
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 ....0_pre20240919.ebuild => egl-x11-1.0.0_pre20240919-r1.ebuild} | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)