Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blender segmentation fault with Nvidia card (regression) #340080

Closed
sifmelcara opened this issue Sep 6, 2024 · 4 comments · Fixed by #340100
Closed

blender segmentation fault with Nvidia card (regression) #340080

sifmelcara opened this issue Sep 6, 2024 · 4 comments · Fixed by #340100

Comments

@sifmelcara
Copy link
Member

Describe the bug

#336718 makes blender crash on start on my machine with Nvidia GPU running Hyprland

I think it's a Nvidia issue because I can't repro on Intel iGPU machine

Steps To Reproduce

  1. Running blender from current built nixos-unstable channel (which is also my system's channel; note that I rebooted after nixos-rebuild switch, so probably not a gl driver mismatch issue):
$ nix run github:NixOS/nixpkgs/ad416d066ca1222956472ab7d0555a6946746a80#blender -- --factory-startup
Writing: /tmp/blender.crash.txt
Segmentation fault (core dumped)
$ cat /tmp/blender.crash.txt
# Blender 4.2.1, Unknown revision

# backtrace
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0xdf0033]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0x6882f0]
/nix/store/wlffq5p6mxxgfap10sav3ij936jzqm59-glibc-2.39-52/lib/libc.so.6(+0x405c0) [0x7f6bf52495c0]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xac4159) [0x7f6be9ac4159]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xad8963) [0x7f6be9ad8963]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xadab86) [0x7f6be9adab86]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xadb0cd) [0x7f6be9adb0cd]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xaf5c14) [0x7f6be9af5c14]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0x9f407e) [0x7f6be99f407e]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xac812e) [0x7f6be9ac812e]
/nix/store/b2axb6r2c2ij9lfig4a1gz0460cka96i-nvidia-x11-560.35.03-6.6.48/lib/libnvidia-glcore.so.560.35.03(+0xabc72f) [0x7f6be9abc72f]
/run/opengl-driver/lib/libGLX_nvidia.so.0(+0xa3d2e) [0x7f6bec2a7d2e]
/run/opengl-driver/lib/libGLX_nvidia.so.0(+0x72450) [0x7f6bec276450]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0x2a1f1e6]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0x2a1acf5]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0xf9a0e9]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0xe607b5]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0xe60f72]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0x637d1c]
/nix/store/wlffq5p6mxxgfap10sav3ij936jzqm59-glibc-2.39-52/lib/libc.so.6(+0x2a14e) [0x7f6bf523314e]
/nix/store/wlffq5p6mxxgfap10sav3ij936jzqm59-glibc-2.39-52/lib/libc.so.6(__libc_start_main+0x89) [0x7f6bf5233209]
/nix/store/xc4l7s5pdgy52s2gjdkwrb8pjnq0scni-blender-4.2.1/bin/blender() [0x683675]

# Python backtrace
  1. Running blender built from slightly older commit works (which is also blender 4.2.1):
$ nix run github:NixOS/nixpkgs/71e91c409d1e654808b2621f28a327acfdad8dc2#blender -- --factory-startup

According to git bisect, the first bad commit is #336718 . That merge seems to include some wayland change and I'm using wayland, maybe it's related? Don't have time to bisect further (as it needs to rebuild the whole world)

git bisect start '--first-parent'
# status: waiting for both good and bad commits
# bad: [ad416d066ca1222956472ab7d0555a6946746a80] disko: 1.6.1 -> 1.7.0 (#339389)
git bisect bad ad416d066ca1222956472ab7d0555a6946746a80
# status: waiting for good commit(s), bad commit known
# good: [71e91c409d1e654808b2621f28a327acfdad8dc2] ananicy-rules-cachyos: 0-unstable-2024-07-27 -> 0-unstable-2024-08-26 (#337863)
git bisect good 71e91c409d1e654808b2621f28a327acfdad8dc2
# bad: [ebe6d29a9c2c25158958fcd1f23ac41f955cb422] python312Packages.ihm: 1.3 -> 1.4 (#338545)
git bisect bad ebe6d29a9c2c25158958fcd1f23ac41f955cb422
# good: [e0ed8cf88ac2b2b35f900ad648771b566f8ed419] python312Packages.pdoc: 14.6.0 -> 14.6.1 (#338098)
git bisect good e0ed8cf88ac2b2b35f900ad648771b566f8ed419
# good: [9916dc8728aa5d36dd9907e4b1e86ee80c209ca0] treewide/nixos: remove `with lib;` part 2 (#335618)
git bisect good 9916dc8728aa5d36dd9907e4b1e86ee80c209ca0
# bad: [44400064d024dd3f9e23b3ecefd906c4c8b70480] libretro.ppsspp: unstable-2024-08-24 -> unstable-2024-08-27 (#338484)
git bisect bad 44400064d024dd3f9e23b3ecefd906c4c8b70480
# good: [7d0d974fc21f02dfeed7ef098d8faf0195162949] matrix-commander-rs: 0.3.0 -> 0.4.1 (#338520)
git bisect good 7d0d974fc21f02dfeed7ef098d8faf0195162949
# bad: [93501699af564622754118284deb385904e17810] walker: 0.7.6 -> 0.7.7 (#338578)
git bisect bad 93501699af564622754118284deb385904e17810
# good: [ee7e849d1ddbcac0f74ab5a6fdf55b79f50a7cb2] roon-tui: 0.3.0 -> 0.3.2
git bisect good ee7e849d1ddbcac0f74ab5a6fdf55b79f50a7cb2
# bad: [4cae00aa84c405ec5a635a24bc0987016cdd6abc] valgrind.meta.homepage: update (#338562)
git bisect bad 4cae00aa84c405ec5a635a24bc0987016cdd6abc
# bad: [36a13f9f210660a2f221f0773d0e819cac3e9261]  staging-next 2024-08-23 (#336718)
git bisect bad 36a13f9f210660a2f221f0773d0e819cac3e9261
# good: [f89e86506de299749e3f3e01f3750767a64ebf5c] inlyne: 0.4.2 -> 0.4.3
git bisect good f89e86506de299749e3f3e01f3750767a64ebf5c
# first bad commit: [36a13f9f210660a2f221f0773d0e819cac3e9261]  staging-next 2024-08-23 (#336718)

Notify maintainers

@amarshall

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.48, NixOS, 24.11 (Vicuna), 24.11.20240904.ad416d0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - nixpkgs: `/nix/store/6inj491lsap4ia7mmvn2gbh53jb27zq0-source`

Add a 👍 reaction to issues you find important.

@amarshall
Copy link
Member

Can reproduce. Some initial triage notes:

  • UI on non-Nvidia is okay
  • Any use of Nvidia GPU seems to fail, including just rendering
  • Crashes with --factory-startup
  • Running with env -u WAYLAND_DISPLAY blender also crashes, so doesn’t seem to be a Wayland issue (GPU rendering also failing suggests the same)
  • CPU rendering is fine
  • I don’t have non-Nvidia GPUs capable of Blender GPU rendering to test those
  • Initial search through upstream issues is not enlightening
  • Runs okay with upstream’s compiled binary

amarshall added a commit to amarshall/nixpkgs that referenced this issue Sep 6, 2024
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs.

See also:
NixOS#214906
NixOS#340080
amarshall added a commit to amarshall/nixpkgs that referenced this issue Sep 6, 2024
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs.

See also:
NixOS#214906
NixOS#340080
@amarshall
Copy link
Member

Have identified a fix, will PR shortly.

@sifmelcara
Copy link
Member Author

Thanks! I think wayland-scanner should go to nativeBuildInputs BTW. I tested it locally and it fixes the issue

amarshall added a commit to amarshall/nixpkgs that referenced this issue Sep 6, 2024
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs. Blender build needs this, but currently only warns during
build.

See also:
NixOS#214906
NixOS#340080
amarshall added a commit to amarshall/nixpkgs that referenced this issue Sep 6, 2024
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs. Blender build needs this, but currently only warns during
build.

See also:
NixOS#214906
NixOS#340080
amarshall added a commit to amarshall/nixpkgs that referenced this issue Sep 6, 2024
Without this, it crashes on launch or render when using (at least)
Nvidia GPUs. Blender build needs this, but currently only warns during
build.

See also:
NixOS#214906
NixOS#340080
@amarshall
Copy link
Member

PR: #340100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants