Describe the bug
Blender doesn't start (exits with a segfault)
To Reproduce
Steps to reproduce the behavior:
blenderExpected behavior
It starts.
Additional context
This gets dumped on CLI:
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
Received X11 Error:
error code: 2
request code: 152
minor code: 34
error text: BadValue (integer parameter out of range for operation)
Writing: /tmp/blender.crash.txt
[1] 10259 segmentation fault (core dumped) blender
cat /tmp/blender.crash.txt
# Blender 2.79 (sub 0), Unknown revision
# backtrace
blender(BLI_system_backtrace+0x30) [0x17642f0]
blender() [0xd75801]
/nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6(+0x34c50) [0x7fc03445ac50]
blender(GHOST_GetDPIHint+0) [0x177ea70]
blender(WM_window_set_dpi+0x12) [0xd94a42]
blender(ED_screen_refresh+0xea) [0x107263a]
blender(ED_screens_initialize+0x2b) [0x1072cdb]
blender(WM_check+0x60) [0xd76190]
blender(wm_homefile_read+0x391) [0xd83171]
blender(WM_init+0xf0) [0xd856f0]
blender(main+0x21a) [0xd32d5a]
/nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6(__libc_start_main+0xee) [0x7fc034447b8e]
blender(_start+0x2a) [0xd724aa]
Video driver
OpenGL renderer string: Radeon RX 570 Series (POLARIS10, DRM 3.27.0, 4.19.81, LLVM 7.1.0)
Metadata
Please run nix run nixpkgs.nix-info -c nix-info -m and paste the result.
- system: `"x86_64-linux"`
- host os: `Linux 4.19.81, NixOS, 19.09.1625.0dc46b0e1c8 (Loris)`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.3`
- channels(root): `"nixos-19.09.1625.0dc46b0e1c8"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
- blender
# a list of nixos modules affected by the problem
module:
I'm working around this at the moment by running it in a docker container (in case google finds this):
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -v /home/jappie:/home/jappie -it ubuntu-blender
I have the same problem with Firefox and Blender using a Radeon RX 590. I've rolled back my nix channel to the last working version I have: b0bbacb5213. I will try bisecting to find the culprit commit.
I've narrowed down the last good commit to 83a5ad13b74, and earliest building bad commit to 3f4d1a1ea8b. The 19 commits in between don't build. It looks like something went wrong in the upgrade to gcc9.
I figured out the problem. I use home-manager, so I upgrade my system separately from my user packages. I was still using an old build of Firefox and Blender built with gcc8, but they're not compatible with the AMD drivers built with gcc9. Upgrading Firefox and Blender fixes the problem for me.
This seems to be related to #31189.
I'm experiencing similar issue with blender and AMD gpu drivers. I have RX 5700 XT based graphic card.
❯❯❯ glxinfo | grep OpenGL
OpenGL vendor string: X.Org
OpenGL renderer string: AMD NAVI10 (DRM 3.35.0, 5.4.13, LLVM 9.0.1)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.3.2
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5 (Compatibility Profile) Mesa 19.3.2
OpenGL shading language version string: 4.50
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 19.3.2
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
It seems that blender first fails to find the driver for GPU, fallbacks on software renderer (swrast) and then segfaults.
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
Writing: /tmp/blender.crash.txt
[1] 18255 segmentation fault (core dumped) blender
In my case /tmp/blender.crash.txt is empty.
I'm using nixos-unstable.
"x86_64-linux"Linux 5.4.13, NixOS, 20.03pre211190.a21c2fa3ea2 (Markhor)yesyesnix-env (Nix) 2.3.2"nixos-20.03pre211190.a21c2fa3ea2""nixos-20.03pre211190.a21c2fa3ea2, nixos-hardware"/nix/var/nix/profiles/per-user/root/channels/nixos@jappeace and @turboMaCk, do you have blender installed with nix-env or home-manager? If so do you still have the problem after upgrading blender?
I'm not using home manager. First I tried to use just nix-env -i blender, then I added it to systemPackages in declarative NixOS configuration and had the same error in both cases. This was all on desktop where I'm also using kernel 5.4.13 (kernelPackages = pkgs.linuxPackages_5_4). On a laptop with just intel graphics (and with default kernel) it works fine (I tried nix-env -i only). I need to run 5.4 kernel on desktop because of graphic card driver but I can try to update kernel on laptop to confirm it still works there. Other than that those machines are sharing most of the configuration.
I've found the same error in arx-libertatis, today.
Pinging mesa maintainer @vcunat.
:thinking: for now I just tried it. My system is on version with gcc 9 already, kernel 5.4, using amdgpu
AMDGPU(0): [DRI2] DRI driver: radeonsi
and blender from current master starts without errors.
Perhaps you should start by trying to gather more logs, e.g.
env LIBGL_DEBUG=verbose blender
There you go:
env LIBGL_DEBUG=verbose blender
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jappie/.drirc: No such file or directory.
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jappie/.drirc: No such file or directory.
libGL: pci id for fd 9: 1002:67df, driver radeonsi
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/radeonsi_dri.so: /nix/store/516azh1zz5zql5xkyb066b3a3sibsvsd-libdrm-2.4.99/lib/libdrm_amdgpu.so.1: undefined symbol: drmSyncobjTimelineSignal
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jappie/.drirc: No such file or directory.
libGL: pci id for fd 9: 1002:67df, driver radeonsi
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/radeonsi_dri.so: /nix/store/516azh1zz5zql5xkyb066b3a3sibsvsd-libdrm-2.4.99/lib/libdrm_amdgpu.so.1: undefined symbol: drmSyncobjTimelineSignal
libGL error: MESA-LOADER: failed to open radeonsi (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: radeonsi
libGL: MESA-LOADER: failed to open /run/opengl-driver/lib/dri/swrast_dri.so: /nix/store/516azh1zz5zql5xkyb066b3a3sibsvsd-libdrm-2.4.99/lib/libdrm_amdgpu.so.1: undefined symbol: drmSyncobjTimelineSignal
libGL error: MESA-LOADER: failed to open swrast (search paths /run/opengl-driver/lib/dri)
libGL error: failed to load driver: swrast
Received X11 Error:
error code: 2
request code: 152
minor code: 34
error text: BadValue (integer parameter out of range for operation)
Writing: /tmp/blender.crash.txt
[1] 6875 segmentation fault (core dumped) env LIBGL_DEBUG=verbose blender
I'm not sure what it means
@jappeace For what it's worth: I encountered an issue that looked the same (i.e. missing drmSyncobjTimelineSignal) while running ffplay on a machine with amdgpu, and resolved it by upgrading to nixos-20.03. Unfortunately, I didn't get any better understanding of what was happening, but perhaps this will help anyone seeing this issue figure it out!
@ryantrinkle unfortunately that didn't work, I'm getting a different error now though:
$ blender
/build/blender-2.79b/intern/ghost/intern/GHOST_WindowX11.cpp:303: X11 glXChooseVisual() failed, verify working openGL system!
initial window could not find the GLX extension
Writing: /tmp/blender.crash.txt
[1] 5048 segmentation fault (core dumped) blender
$ cat /tmp/blender.crash.txt
cat /tmp/blender.crash.txt
# Blender 2.79 (sub 0), Unknown revision
# backtrace
blender(BLI_system_backtrace+0x30) [0x17642f0]
blender() [0xd75801]
/nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6(+0x34c50) [0x7f1ddda4ec50]
blender(GHOST_GetDPIHint+0) [0x177ea70]
blender(WM_window_set_dpi+0x12) [0xd94a42]
blender(ED_screen_refresh+0xea) [0x107263a]
blender(ED_screens_initialize+0x2b) [0x1072cdb]
blender(WM_check+0x60) [0xd76190]
blender(wm_homefile_read+0x391) [0xd83171]
blender(WM_init+0xf0) [0xd856f0]
blender(main+0x21a) [0xd32d5a]
/nix/store/fg4yq8i8wd08xg3fy58l6q73cjy8hjr2-glibc-2.27/lib/libc.so.6(__libc_start_main+0xee) [0x7f1ddda3bb8e]
blender(_start+0x2a) [0xd724aa]
I understand what's going on, the opengl detection code is failing for some reason. I'm just not really sure how to fix it, should I open up blender to just bypass it or something? I'll probably play with that later.
I can do things like glxgears. so it's not like it doesn't exist.
I decided to spend a day bisecting this issue, using arx-libertatis as a reference. It looks like the problem started with the update glibc 2.27 -> 2.30, between 19.09 and 20.03. Specifically 447edaa32fcee706be24db4389f4759fad68a785.
I'm not 100% sure because bisecting a staging merge is tricky, but this is what came up. I don't have an explanation for how a change in glibc could cause this problem, though.