Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
stable blender segfaults with stable nvidia drivers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5931

PostPosted: Fri Oct 11, 2024 8:19 am    Post subject: stable blender segfaults with stable nvidia drivers Reply with quote

Greetings,

when I run blender, I get this:
Code:
$ blender-4.1
Writing: /tmp/blender.crash.txt
Segmentation fault

/tmp/blender.crash.txt shows this:
Code:
# Blender 4.1.1, Unknown revision

# backtrace
blender-4.1(+0x9a3717) [0x55b6cf4d1717]
blender-4.1(+0x1f38f0) [0x55b6ced218f0]
/usr/lib64/libc.so.6(+0x3c960) [0x7feaa03ec960]
/usr/lib64/libnvidia-tls.so.550.120(+0x2618) [0x7fea95b84618]
[0x7fea95ba191a]

# Python backtrace


okgs versions:
Code:
$ emerge -tvp blender nvidia-drivers

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
Dependency resolution took 2.09 s (backtrack: 0/20).

[ebuild   R    ] x11-drivers/nvidia-drivers-550.120:0/550::gentoo  USE="X modules static-libs strip tools -dist-kernel -kernel-open -modules-compress -modules-sign -persistenced -powerd -wayland" 0 KiB
[ebuild   R    ] media-gfx/blender-4.1.1-r2:4.1::gentoo  USE="X bullet color-management cycles cycles-bin-kernels embree ffmpeg fftw fluid gmp nanovdb nls oidn openexr openmp opensubdiv openvdb otf pdf potrace pugixml sndfile tbb tiff vulkan wayland webp -alembic -collada (-cuda) -debug -doc -experimental -gnome (-hip) -jack -jemalloc -jpeg2k -man -ndof -oneapi -openal -openpgl -optix -osl -pulseaudio -renderdoc -sdl -test -valgrind" LLVM_SLOT="18 -15 -16 -17" PYTHON_SINGLE_TARGET="python3_12 -python3_11" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB


and emerge --info:
Code:
Portage 3.0.65 (python 3.12.6-final-0, default/linux/amd64/23.0/no-multilib, gcc-13, glibc-2.39-r6, 6.11.3-gentoo x86_64)
=================================================================
System uname: Linux-6.11.3-gentoo-x86_64-AMD_Ryzen_7_5800X_8-Core_Processor-with-glibc2.39
KiB Mem:    32782224 total,  20351028 free
KiB Swap:   33429500 total,  33427692 free
Head commit of repository gentoo: b2a9f12ab6b8f735c291ec801732d5ae9cc7a239

Timestamp of repository nest: Tue, 08 Oct 2024 15:51:08 +0000
Head commit of repository nest: 26e7d5eee6bb210c95e2811a5c88bd64c08784d2

sh bash 5.2_p37
ld GNU ld (Gentoo 2.42 p6) 2.42.0
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p37::gentoo
dev-build/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.30.2::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.5.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.10.15_p1::gentoo, 3.11.10_p1::gentoo, 3.12.6_p4::gentoo
dev-lang/rust:             1.80.1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.41-r5::gentoo, 2.42-r2::gentoo
sys-devel/binutils-config: 5.5.2::gentoo
sys-devel/clang:           17.0.6::gentoo, 18.1.8::gentoo
sys-devel/gcc:             12.4.0::gentoo, 13.3.1_p20240614::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/llvm:            17.0.6::gentoo, 18.1.8-r1::gentoo
sys-kernel/linux-headers:  6.6-r1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/gentoo.git
    priority: -1000
    volatile: True

Utopia-Planitia
    location: /mnt/portage/overlay
    masters: gentoo
    priority: 0
    volatile: True

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE @FREE AdobeFlash-11.x MPEG-4 Skype-TOS linux-fw-redistributable no-source-code hplip-plugin OPERA-2014 unRAR fs2_open Alasir all-rights-reserved ms-teams-pre OPERA-2018 genymotion NVIDIA-r2 GIMPS NVIDIA-CUDA microsoft-edge RAR NVIDIA-cuDNN"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -mtune=native"
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"
CXXFLAGS="-O2 -pipe -march=native -mtune=native"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=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="-O2 -pipe -march=native -mtune=native"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live clean-logs collision-protect 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 userpriv usersandbox usersync"
FFLAGS="-O2 -pipe -march=native -mtune=native"
GENTOO_MIRRORS="https://mirror.isoc.org.il/pub/gentoo/ http://mirror.isoc.org.il/pub/gentoo/"
LANG="en_IL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en he es"
MAKEOPTS="--jobs 17"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=180"
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"
SHELL="/bin/bash"
USE="X acl alsa amd64 bluetooth bzip2 cet crypt cuda dbus elogind flac gdbm iconv icu ipv6 kde libtirpc lightdm lm_sensors lto matroska mp3 ncurses nfs nls opengl openmp openssl opus pam pcre pgo qt6 readline samba seccomp ssl system-harfbuzz system-heimdal system-icu system-jpeg system-jsoncpp system-libevent system-libvpx system-llvm system-png system-sqlite system-webp test-rust theora unicode vdpau vorbis vulkan wayland webp wireless x264 x265 xattr zlib" ABI_X86="64" ADA_TARGET="gcc_12" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64 pc" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="evdev" KERNEL="linux" L10N="he es en en-US" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LLVM_TARGETS="AArch64 ARM BPF NVPTX" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-2" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12 python3_10" QEMU_SOFTMMU_TARGETS="x86_64 arm aarch64" QEMU_USER_TARGETS="x86_64 arm aarch64" RUBY_TARGETS="ruby31" SANE_BACKENDS="hp" VIDEO_CARDS="v4l nouveau nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS



any ideas how to fix it?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
stefantalpalaru
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jan 2009
Posts: 76
Location: Italy

PostPosted: Fri Oct 11, 2024 9:43 pm    Post subject: Reply with quote

Sounds like a driver problem. Try reporting it to Nvidia, making sure to provide all the info they require: https://forums.developer.nvidia.com/t/if-you-have-a-problem-please-read-this-first/27131
Back to top
View user's profile Send private message
wjb
l33t
l33t


Joined: 10 Jul 2005
Posts: 636
Location: Fife, Scotland

PostPosted: Sat Oct 12, 2024 9:09 am    Post subject: Reply with quote

Maybe try with the binary from the Blender downloads page
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5931

PostPosted: Sun Oct 13, 2024 6:16 pm    Post subject: Reply with quote

wjb wrote:
Maybe try with the binary from the Blender downloads page

4.2 binary works, 4.2 compiled doesn't.
I'm not sure it is compiled against cuda
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
entity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jun 2002
Posts: 95
Location: Finland

PostPosted: Sun Dec 08, 2024 10:48 am    Post subject: Reply with quote

I faced the same issue. I've tried compiling with and without cuda, same result.

But for some reason, blender does not crash when trying to debug it with gdb.

Code:
$ gdb blender-4.2
Back to top
View user's profile Send private message
entity
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jun 2002
Posts: 95
Location: Finland

PostPosted: Sat Dec 14, 2024 10:15 pm    Post subject: Reply with quote

I have tried to wrap my head around this issue for a while now, and I have tried pretty much every trick in my sleeve (short of glibc downgrade). But I think I cracked it.

This driver issue seems to have occurred already in September 2024 according to Gentoo bug report. Last comment to bug report suggests a that you can work around the issue by specifying environment variable
Code:
_GLX_VENDOR_LIBRARY_NAME=nvidia
before running blender, however, in my system it does not work. On the other hand, I can get blender-4.2 running with following commands:

Code:

__GLX_VENDOR_LIBRARY_NAME="" blender-4.2
__GLX_VENDOR_LIBRARY_NAME="mesa" blender-4.2


Why this works?

Since that particular environment variable specifies GLX vendor library, and in my box there exists three valid options for that environment variable

Code:

/usr/lib/libGLX.so.0.0.0
/usr/lib/libGLX_mesa.so.0.0.0
/usr/lib/libGLX_nvidia.so.565.77


Leaving _GLX_VENDOR_LIBRARY_NAME empty should force it to use /usr/lib/libGLX.so.0.0.0 which is provided via libglvnd:

Code:

$ q belongs /usr/lib/libGLX.so.0.0.0
media-libs/libglvnd: /usr/lib/libGLX.so.0


Which begs the question, why is it set to nvidia in the first place and thus overrides libglvnd implementation? In my box there exists

Code:

$ cat /etc/env.d/99nvidia-wayland
GBM_BACKEND=nvidia-drm
__GLX_VENDOR_LIBRARY_NAME=nvidia
ENABLE_VKBASALT=1
LIBVA_DRIVER_NAME=nvidia


which seems to have just sat there since since last August, but causes issues only now. I might have written this environment setting myself while fiddling with Wayland and Nvidia RTX 3050 issues back then.

How to fix this?

Please check every file in /etc/env.d, and possibily others where you set environment variables, and remove line(s) specifying

Code:

__GLX_VENDOR_LIBRARY_NAME=<vendor name>


and run

Code:

$ sudo env-update && source /etc/profile


That might fix the issue.

(edit: some updates to how to fix this part)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum