Blender crashes when rendering with cycles in the viewport with OSL enabled #87124

Closed
opened 2021-04-01 20:48:06 +02:00 by Charbel Nicolas · 10 comments

System Information
Operating system: Arch Linux
Graphics card: GeForce GTX 980 (driver version 460.67)

Blender Version
Broken: 2.92.0
Worked: I don't know.

Short description of error

When enabling cycles as the viewport renderer blender crashes to desktop with a segfault.

Exact steps for others to reproduce the error

Open the attached blend file, enable the Display Render Preview under Viewport Shading. Then go to the Render Properties and change the Render Engine from EEVEE to Cycles and it will crash, at least on my computer.

These are the journactl entries from the crash:

Apr 01 12:33:18 ogun blender.desktop[2770]: Read prefs: /home/charbel/.config/blender/2.92/config/userpref.blend
Apr 01 12:33:18 ogun blender.desktop[2770]: Read blend: /home/charbel/Documents/Blender/cocinagode.blend
Apr 01 12:33:18 ogun blender.desktop[2770]: Writing: /tmp/cocinagode.crash.txt
Apr 01 12:33:18 ogun blender.desktop[2770]: Writing: /tmp/cocinagode.crash.txt
Apr 01 12:33:18 ogun audit[2770]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=4 pid=2770 comm="blender" exe="/usr/bin/blender" sig=11 res=1
Apr 01 12:33:18 ogun kernel: blender[2821]: segfault at 10 ip 00007fbcda04f0d0 sp 00007fbc15c785a0 error 4
Apr 01 12:33:18 ogun kernel: Code: f8 03 01 c2 49 39 c9 75 e9 48 8b 45 88 4c 8d 1c 10 49 c1 e3 05 4c 89 e0 45 31 c9 ba 38 00 00 00 4c 29 d8 4c >
Apr 01 12:33:18 ogun kernel: audit: type=1701 audit(1617301998.056:86): auid=1000 uid=1000 gid=1000 ses=4 pid=2770 comm="blender" exe="/usr/bin>
Apr 01 12:33:18 ogun systemd- [x]: Created slice system-systemd\x2dcoredump.slice.
Apr 01 12:33:18 ogun audit: BPF prog-id=25 op=LOAD
Apr 01 12:33:18 ogun audit: BPF prog-id=26 op=LOAD
Apr 01 12:33:18 ogun systemd- [x]: Started Process Core Dump (PID 2822/UID 0).
Apr 01 12:33:18 ogun audit- [x]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2822-0 comm="systemd" exe=>
Apr 01 12:33:18 ogun kernel: audit: type=1334 audit(1617301998.062:87): prog-id=25 op=LOAD
Apr 01 12:33:18 ogun kernel: audit: type=1334 audit(1617301998.062:88): prog-id=26 op=LOAD
Apr 01 12:33:18 ogun kernel: audit: type=1130 audit(1617301998.062:89): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0>
Apr 01 12:33:19 ogun systemd-coredump[2823]: Core file was truncated to 2147483648 bytes.
Apr 01 12:33:20 ogun systemd-coredump[2823]: Process 2770 (blender) of user 1000 dumped core.

                                           
                                           Stack trace of thread 2819:
                                         - 0  0x00007fbcda04f0d0 n/a (n/a + 0x0)
                                         - 1  0x00007fbcda027215 n/a (n/a + 0x0)

Apr 01 12:33:20 ogun systemd- [x]: systemd-coredump@0-2822-0.service: Succeeded.
Apr 01 12:33:20 ogun kernel: audit: type=1131 audit(1617302000.508:90): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0>
Apr 01 12:33:20 ogun audit- [x]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2822-0 comm="systemd" exe=">
Apr 01 12:33:20 ogun systemd[836]: app-gnome-blender-2770.scope: Succeeded.
Apr 01 12:33:20 ogun audit: BPF prog-id=26 op=UNLOAD
Apr 01 12:33:20 ogun audit: BPF prog-id=25 op=UNLOAD
Apr 01 12:33:20 ogun kernel: audit: type=1334 audit(1617302000.651:91): prog-id=26 op=UNLOAD
Apr 01 12:33:20 ogun kernel: audit: type=1334 audit(1617302000.651:92): prog-id=25 op=UNLOAD
Apr 01 12:33:26 ogun systemd[836]: Started Application launched by gnome-shell.
Apr 01 12:33:26 ogun blender.desktop[2829]: [ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Apr 01 12:33:26 ogun blender.desktop[2829]: [ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1)
Apr 01 12:33:30 ogun blender.desktop[2829]: Read prefs: /home/charbel/.config/blender/2.92/config/userpref.blend
Apr 01 12:33:30 ogun blender.desktop[2829]: Saved session recovery to '/tmp/quit.blend'
Apr 01 12:33:30 ogun blender.desktop[2829]: Blender quit

cocinagode.blend

**System Information** Operating system: Arch Linux Graphics card: GeForce GTX 980 (driver version 460.67) **Blender Version** Broken: 2.92.0 Worked: I don't know. **Short description of error** When enabling cycles as the viewport renderer blender crashes to desktop with a segfault. **Exact steps for others to reproduce the error** Open the attached blend file, enable the Display Render Preview under Viewport Shading. Then go to the Render Properties and change the Render Engine from EEVEE to Cycles and it will crash, at least on my computer. These are the journactl entries from the crash: Apr 01 12:33:18 ogun blender.desktop[2770]: Read prefs: /home/charbel/.config/blender/2.92/config/userpref.blend Apr 01 12:33:18 ogun blender.desktop[2770]: Read blend: /home/charbel/Documents/Blender/cocinagode.blend Apr 01 12:33:18 ogun blender.desktop[2770]: Writing: /tmp/cocinagode.crash.txt Apr 01 12:33:18 ogun blender.desktop[2770]: Writing: /tmp/cocinagode.crash.txt Apr 01 12:33:18 ogun audit[2770]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=4 pid=2770 comm="blender" exe="/usr/bin/blender" sig=11 res=1 Apr 01 12:33:18 ogun kernel: blender[2821]: segfault at 10 ip 00007fbcda04f0d0 sp 00007fbc15c785a0 error 4 Apr 01 12:33:18 ogun kernel: Code: f8 03 01 c2 49 39 c9 75 e9 48 8b 45 88 4c 8d 1c 10 49 c1 e3 05 4c 89 e0 45 31 c9 ba 38 00 00 00 4c 29 d8 4c > Apr 01 12:33:18 ogun kernel: audit: type=1701 audit(1617301998.056:86): auid=1000 uid=1000 gid=1000 ses=4 pid=2770 comm="blender" exe="/usr/bin> Apr 01 12:33:18 ogun systemd- [x]: Created slice system-systemd\x2dcoredump.slice. Apr 01 12:33:18 ogun audit: BPF prog-id=25 op=LOAD Apr 01 12:33:18 ogun audit: BPF prog-id=26 op=LOAD Apr 01 12:33:18 ogun systemd- [x]: Started Process Core Dump (PID 2822/UID 0). Apr 01 12:33:18 ogun audit- [x]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2822-0 comm="systemd" exe=> Apr 01 12:33:18 ogun kernel: audit: type=1334 audit(1617301998.062:87): prog-id=25 op=LOAD Apr 01 12:33:18 ogun kernel: audit: type=1334 audit(1617301998.062:88): prog-id=26 op=LOAD Apr 01 12:33:18 ogun kernel: audit: type=1130 audit(1617301998.062:89): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0> Apr 01 12:33:19 ogun systemd-coredump[2823]: Core file was truncated to 2147483648 bytes. Apr 01 12:33:20 ogun systemd-coredump[2823]: Process 2770 (blender) of user 1000 dumped core. ``` Stack trace of thread 2819: ``` - 0 0x00007fbcda04f0d0 n/a (n/a + 0x0) - 1 0x00007fbcda027215 n/a (n/a + 0x0) Apr 01 12:33:20 ogun systemd- [x]: systemd-coredump@0-2822-0.service: Succeeded. Apr 01 12:33:20 ogun kernel: audit: type=1131 audit(1617302000.508:90): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0> Apr 01 12:33:20 ogun audit- [x]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-2822-0 comm="systemd" exe="> Apr 01 12:33:20 ogun systemd[836]: app-gnome-blender-2770.scope: Succeeded. Apr 01 12:33:20 ogun audit: BPF prog-id=26 op=UNLOAD Apr 01 12:33:20 ogun audit: BPF prog-id=25 op=UNLOAD Apr 01 12:33:20 ogun kernel: audit: type=1334 audit(1617302000.651:91): prog-id=26 op=UNLOAD Apr 01 12:33:20 ogun kernel: audit: type=1334 audit(1617302000.651:92): prog-id=25 op=UNLOAD Apr 01 12:33:26 ogun systemd[836]: Started Application launched by gnome-shell. Apr 01 12:33:26 ogun blender.desktop[2829]: [ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1) Apr 01 12:33:26 ogun blender.desktop[2829]: [ALSOFT] (EE) Failed to set real-time priority for thread: Operation not permitted (1) Apr 01 12:33:30 ogun blender.desktop[2829]: Read prefs: /home/charbel/.config/blender/2.92/config/userpref.blend Apr 01 12:33:30 ogun blender.desktop[2829]: Saved session recovery to '/tmp/quit.blend' Apr 01 12:33:30 ogun blender.desktop[2829]: Blender quit [cocinagode.blend](https://archive.blender.org/developer/F9917122/cocinagode.blend)

Added subscriber: @charbel

Added subscriber: @charbel

Added subscriber: @PaulMelis

Added subscriber: @PaulMelis

Seeing the same crash on this file on my own Arch Linux system. Seems to be OSL related, as disabling it on the render panel makes the crash go away. On a local 2.93 build (19ff2479cf, which uses the Arch package for OSL 1.11.12.0-1) I get the following stacktrace:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa1533820d0 in OSL_v1_11::pvt::LLVM_Util::call_function(llvm::Value*, OpenImageIO_v2_2::span<llvm::Value* const, -1l>) () from /usr/lib/liboslexec.so.1.11
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
(gdb) bt
- 0  0x00007fa1533820d0 in OSL_v1_11::pvt::LLVM_Util::call_function(llvm::Value*, OpenImageIO_v2_2::span<llvm::Value* const, -1l>) () from /usr/lib/liboslexec.so.1.11
- 1  0x00007fa15335a215 in OSL_v1_11::pvt::llvm_gen_closure(OSL_v1_11::pvt::BackendLLVM&, int) () from /usr/lib/liboslexec.so.1.11
- 2  0x00007fa1533727b6 in OSL_v1_11::pvt::BackendLLVM::build_llvm_code(int, int, llvm::BasicBlock*) () from /usr/lib/liboslexec.so.1.11
- 3  0x00007fa153375c36 in OSL_v1_11::pvt::BackendLLVM::build_llvm_instance(bool) () from /usr/lib/liboslexec.so.1.11
- 4  0x00007fa15337770a in OSL_v1_11::pvt::BackendLLVM::run() () from /usr/lib/liboslexec.so.1.11
- 5  0x00007fa15322090d in OSL_v1_11::pvt::ShadingSystemImpl::optimize_group(OSL_v1_11::ShaderGroup&, OSL_v1_11::ShadingContext*, bool) () from /usr/lib/liboslexec.so.1.11
- 6  0x00007fa15322389b in OSL_v1_11::pvt::ShadingSystemImpl::optimize_all_groups(int, int, int, bool) () from /usr/lib/liboslexec.so.1.11
- 7  0x00007fa14254dbc4 in std::execute_native_thread_routine (__p=0x7fa115be5b80) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
- 8  0x00007fa1560ea299 in start_thread () from /usr/lib/libpthread.so.0
- 9  0x00007fa14226b053 in clone () from /usr/lib/libc.so.6
Seeing the same crash on this file on my own Arch Linux system. Seems to be OSL related, as disabling it on the render panel makes the crash go away. On a local 2.93 build (19ff2479cf68, which uses the Arch package for OSL 1.11.12.0-1) I get the following stacktrace: ``` Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007fa1533820d0 in OSL_v1_11::pvt::LLVM_Util::call_function(llvm::Value*, OpenImageIO_v2_2::span<llvm::Value* const, -1l>) () from /usr/lib/liboslexec.so.1.11 --Type <RET> for more, q to quit, c to continue without paging--q Quit (gdb) bt - 0 0x00007fa1533820d0 in OSL_v1_11::pvt::LLVM_Util::call_function(llvm::Value*, OpenImageIO_v2_2::span<llvm::Value* const, -1l>) () from /usr/lib/liboslexec.so.1.11 - 1 0x00007fa15335a215 in OSL_v1_11::pvt::llvm_gen_closure(OSL_v1_11::pvt::BackendLLVM&, int) () from /usr/lib/liboslexec.so.1.11 - 2 0x00007fa1533727b6 in OSL_v1_11::pvt::BackendLLVM::build_llvm_code(int, int, llvm::BasicBlock*) () from /usr/lib/liboslexec.so.1.11 - 3 0x00007fa153375c36 in OSL_v1_11::pvt::BackendLLVM::build_llvm_instance(bool) () from /usr/lib/liboslexec.so.1.11 - 4 0x00007fa15337770a in OSL_v1_11::pvt::BackendLLVM::run() () from /usr/lib/liboslexec.so.1.11 - 5 0x00007fa15322090d in OSL_v1_11::pvt::ShadingSystemImpl::optimize_group(OSL_v1_11::ShaderGroup&, OSL_v1_11::ShadingContext*, bool) () from /usr/lib/liboslexec.so.1.11 - 6 0x00007fa15322389b in OSL_v1_11::pvt::ShadingSystemImpl::optimize_all_groups(int, int, int, bool) () from /usr/lib/liboslexec.so.1.11 - 7 0x00007fa14254dbc4 in std::execute_native_thread_routine (__p=0x7fa115be5b80) at /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80 - 8 0x00007fa1560ea299 in start_thread () from /usr/lib/libpthread.so.0 - 9 0x00007fa14226b053 in clone () from /usr/lib/libc.so.6 ```
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

No crash here [checked both 2.92 and 2.93 beta / 3.0.0 alpha].
Just to make sure: is this still an issue in fresh builds from https://builder.blender.org/download/?

No crash here [checked both 2.92 and 2.93 beta / 3.0.0 alpha]. Just to make sure: is this still an issue in fresh builds from https://builder.blender.org/download/?

Like Paul Melis said, it is indeed related to Open Shading Language. When I uncheck the box it doesn't crash on 2.92.

Like Paul Melis said, it is indeed related to Open Shading Language. When I uncheck the box it doesn't crash on 2.92.
Charbel Nicolas changed title from Blender crashes when rendering with cycles in the viewport to Blender crashes when rendering with cycles in the viewport with OSL enabled 2021-04-20 15:45:46 +02:00

In #87124#1149406, @lichtwerk wrote:
No crash here [checked both 2.92 and 2.93 beta / 3.0.0 alpha].
Just to make sure: is this still an issue in fresh builds from https://builder.blender.org/download/?

It's no longer crashing with OSL enabled on Blender 2.93 beta. It has been fixed!

> In #87124#1149406, @lichtwerk wrote: > No crash here [checked both 2.92 and 2.93 beta / 3.0.0 alpha]. > Just to make sure: is this still an issue in fresh builds from https://builder.blender.org/download/? It's no longer crashing with OSL enabled on Blender 2.93 beta. It has been fixed!
Member

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Philipp Oeser self-assigned this 2021-04-20 17:24:30 +02:00
Member

Oh, good to hear, this might have been fixed by a631a9eb1f

Will close, but feel free to comment if issues creep up again.

Oh, good to hear, this might have been fixed by a631a9eb1f Will close, but feel free to comment if issues creep up again.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#87124
No description provided.