FS#79506 - [blender] segmentation fault on start-up

Attached to Project: Arch Linux
Opened by IMBJR (IMBJR) - Tuesday, 29 August 2023, 15:50 GMT
Last edited by Torsten Keßler (tpkessler) - Wednesday, 13 September 2023, 06:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Torsten Keßler (tpkessler)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 37
Private No

Details

Description:
Blender seg-faults upon start-up.

Additional info:
* package version(s): 17:3.6.2-2

Steps to reproduce:

imbjr@pc ~]$ blender --factory-startup --debug-all
Switching to fully guarded memory allocator.
graph_id_tag_update: id=SCScene flags=BASE_FLAGS source=USER_EDIT
DEG_relations_tag_update: Tagging relations for update.
graph_id_tag_update: id=GRScene Collection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRCollection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GROVERRIDE_RESYNC_LEFTOVERS flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRScene Collection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRCollection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GROVERRIDE_RESYNC_LEFTOVERS flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRScene Collection flags=TRANSFORM, GEOMETRY, COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=TRANSFORM, GEOMETRY, COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=TRANSFORM, GEOMETRY, COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRScene Collection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRCollection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GROVERRIDE_RESYNC_LEFTOVERS flags=COPY_ON_WRITE source=USER_EDIT
DEG_relations_tag_update: Tagging relations for update.
DEG_relations_tag_update: Tagging relations for update.
graph_id_tag_update: id=GRScene Collection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=SCScene flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GRCollection flags=COPY_ON_WRITE source=USER_EDIT
graph_id_tag_update: id=GROVERRIDE_RESYNC_LEFTOVERS flags=COPY_ON_WRITE source=USER_EDIT
DEG_relations_tag_update: Tagging relations for update.
Writing: /tmp/blender.crash.txt
Segmentation fault (core dumped)

Included is the blender.crash.txt file produced, but there's little in there.
This task depends upon

Closed by  Torsten Keßler (tpkessler)
Wednesday, 13 September 2023, 06:59 GMT
Reason for closing:  Fixed
Comment by IMBJR (IMBJR) - Tuesday, 29 August 2023, 15:56 GMT
I've just tested the official Linux release of version 3.6.2 and it starts up without seg-faulting.
Comment by Roland Ruckerbauer (ruabmbua) - Tuesday, 29 August 2023, 15:56 GMT
Seems to be, because blender itself for whatever reason links to LLVM15, but e.g. my GPU driver uses LLVM16. They probably should not be loaded in the same process image at the same time.
Comment by loqs (loqs) - Tuesday, 29 August 2023, 17:18 GMT
blender 17:3.6.2-1 [1] available from the ALA [2] was built with llvm16. Is that affected by the issue?

[1] https://gitlab.archlinux.org/archlinux/packaging/packages/blender/-/commit/35d5e798aab694ce611ad39654c916e72c528d6c
[2] https://wiki.archlinux.org/title/Arch_Linux_Archive
Comment by Roland Ruckerbauer (ruabmbua) - Tuesday, 29 August 2023, 17:21 GMT
I think the problem is that openshadinglanguage has a hard dependency on llvm15. According to https://github.com/AcademySoftwareFoundation/OpenShadingLanguage/blob/main/INSTALL.md its
not compatible with LLVM 16.
Comment by Roland Ruckerbauer (ruabmbua) - Tuesday, 29 August 2023, 17:25 GMT
Hm seems this version also directly links to libLLVM-15.so => /usr/lib/libLLVM-15.so (0x00007f845f600000)
Comment by Toolybird (Toolybird) - Tuesday, 29 August 2023, 22:14 GMT
> my GPU driver uses LLVM16

Which GPU?

> Blender seg-faults upon start-up

Cannot repro...so clearly not for everyone.

Even though possible cause is mentioned above, please do still get a backtrace that includes debug symbols [1]. It's usually as simple as:

$ coredumpctl gdb (then answer y when it asks "Enable debuginfod for this session?")
(gdb) set logging enabled
(gdb) bt (or bt full)

Then post gdb.txt

[1] https://wiki.archlinux.org/title/Debugging/Getting_traces
Comment by robo mann (roboman2444) - Wednesday, 30 August 2023, 02:33 GMT
>blender 17:3.6.2-1 [1] available from the ALA [2] was built with llvm16. Is that affected by the issue?

I tried manually downgrading to both 3.6.2-1 and 3.6.0-4, and both seem to crash the same way. It may be a dependency issue? Mesa issue?

(mesa info

Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon R9 Fury Series (fiji, LLVM 16.0.6, DRM 3.52, 6.4.12-arch1-1) (0x7300)
Version: 23.1.6
Accelerated: yes

)
It seems to work just fine on my intel iGPU laptop, however.


>Even though possible cause is mentioned above, please do still get a backtrace that includes debug symbols [1].

Here's my bt. This is my first arch bug report related post, so It may not be what you're looking for.
Comment by IMBJR (IMBJR) - Wednesday, 30 August 2023, 11:16 GMT
Here's my gdb.txt file.
   gdb.txt (8.8 KiB)
Comment by Aryel Mota Góis (aryelgois) - Wednesday, 30 August 2023, 14:45 GMT
I got this gdb.txt file.
   gdb.txt (7.9 KiB)
Comment by Michael Manis (thepyrotechnic) - Wednesday, 30 August 2023, 19:49 GMT
gdb.txt attached

(from glxinfo)
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon RX 7900 XTX (gfx1100, LLVM 16.0.6, DRM 3.52, 6.4.12-arch1-1) (0x744c)
Version: 23.1.6
Accelerated: yes

(from glmark2)
OpenGL Information
GL_VENDOR: AMD
GL_VERSION: 4.6 (Compatibility Profile) Mesa 23.1.6-arch1.4

(from pacman -S hip-runtime-amd)
hip-runtime-amd-5.6.0-2

(from blender --version)
Blender 3.6.2
build date: 2023-08-24
build time: 19:42:47
build commit date: 2023-08-14
build commit time: 14:05
build hash: ffe93138751e
build platform: Linux
build type: Release
   gdb.txt (7.9 KiB)
Comment by Toolybird (Toolybird) - Wednesday, 30 August 2023, 21:23 GMT
Thanks folks..1 backtrace was enough. Posting duplicate backtraces does *not* help at all. If you're affected by the bug but have nothing useful to add, just use the "Add Vote" button.

Common factor seems to be radeonsi driver and aforementioned LLVM conflict.
Comment by Frank Carlyle McLaughlin (frankspace) - Wednesday, 30 August 2023, 22:43 GMT
I'm not sure whether this is helpful, but I mention it only because the above backtraces all seem to implicate GHOST somehow, and when I try compiling from source in a clean chroot, compilation fails while attempting to compile GHOST_XrGraphicsBinding.cc.o. I run artix, so this may be worthless, but I'm happy to provide my build log if there'd be any value at all in doing so.
Comment by Michael Manis (thepyrotechnic) - Thursday, 31 August 2023, 01:34 GMT
mesa version 23.1.6-2 (commit 60dc1740) was apparently a rebuild with LLVM 16. Manually running blender with mesa version 23.1.6-1 (commit 9e3c991b) works:
$ LIBGL_DRIVERS_PATH="$HOME/Downloads/mesa_23.1.6-1/usr/lib/dri/" LD_LIBRARY_PATH="$HOME/Downloads/mesa_23.1.6-1/usr/lib/" blender

Running with AMDGPU Pro driver works as well:
$ progl blender
Comment by IMBJR (IMBJR) - Saturday, 02 September 2023, 18:27 GMT
Still not able to start blender:

[imbjr@pc ~]$ pacman -Qi blender
Name : blender
Version : 17:3.6.2-4

[imbjr@pc ~]$ blender
Read prefs: "/home/imbjr/.config/blender/3.6/config/userpref.blend"
Writing: /tmp/blender.crash.txt
Segmentation fault (core dumped)
Comment by Frank Carlyle McLaughlin (frankspace) - Monday, 04 September 2023, 17:37 GMT
On the basis of my own testing, I respectfully suggest disabling OpenShadingLanguage ("-DWITH_CYCLES_OSL=OFF") until OpenShadingLanguage supports LLVM 16, and then just compiling Blender with the current (16.0.6 as of this writing) version of LLVM.
Comment by Torsten Keßler (tpkessler) - Tuesday, 12 September 2023, 07:46 GMT
blender 17:3.6.2-5 in [testing] disables OSL. Can you confirm that it works for you?
Comment by vladodriver (vladodriver) - Tuesday, 12 September 2023, 10:30 GMT
blender 17:3.6.2-6 working again for me
Comment by Frank Carlyle McLaughlin (frankspace) - Tuesday, 12 September 2023, 13:14 GMT
I won't be able to test until this evening, I'm afraid, but I'll do so then.
Comment by Jacopo Nespolo (japs) - Tuesday, 12 September 2023, 23:55 GMT
I was affected by this bug and can confirm that extra-testing/blender 17:3.6.2-6 solves it.
Mind that in my case I had to manually install extra-testing/yaml-cpp (libyaml 0.8), which was not taken along by the installation.
Comment by Frank Carlyle McLaughlin (frankspace) - Wednesday, 13 September 2023, 00:53 GMT
I also needed to manually install yaml-cpp (which doesn't actually seem to be listed as a dependency for blender) and opencolorio from extra-testing, but having done so, I can also now confirm that blender-17:3.6.2-6 solves the problem for me. Thank you!
Comment by lpr1 (lpr1) - Wednesday, 13 September 2023, 05:17 GMT
Confirming 17:3.6.2-6 works, as Frank, had to install yaml-cpp and opencolorio from testing repos.

Loading...