Maniphest T102786

Blender crash with Intel Metal rendering on macOS
Needs Triage, Normal

Assigned To
Michael Jones (michael_jones)
Authored By
Paweł Kołodziejski (aquadran)
Nov 26 2022, 9:41 AM
Tags
  • Render & Cycles
  • Platform: macOS
  • BF Blender (3.4)
Subscribers
Brecht Van Lommel (brecht)
Caco Oportot (Cacov)
Michael Jones (michael_jones)
Morteza Mostajab (mmostajab)
Paweł Kołodziejski (aquadran)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: macOS-13.0.1-x86_64-i386-64bit 64 Bits
Graphics card: Intel(R) Iris(TM) Plus Graphics OpenGL Engine Intel Inc. 4.1 INTEL-20.2.44
MacBookPro16,2
32GB RAM

Blender Version
Broken: version: 3.4.0 Beta, branch: blender-v3.4-release, commit date: 2022-11-24 16:55, hash: rB959f3cd64502
Worked: unknown, I tried several builds after Intel GPU metal is enabled in daily builds.

Short description of error
Blender crash once starts rendering. It can also trigger to system hang (not responsive GUI) and the after while system trigger reset.
Last traces when launching Blender from shell:

CommandBuffer Failed: cycles_metal_integrator_intersect_shadow

Refer to the Cycles GPU rendering documentation for possible solutions:
https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html

-[_MTLCommandEncoder dealloc]:131: failed assertion `Command encoder released without endEncoding'
zsh: illegal hardware instruction ./Blender

From Xcode debugger:

2022-11-29 20:37:18.198099+0100 Blender[22800:105451] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout)
2022-11-29 20:37:18.198292+0100 Blender[22800:105451] Execution of the command buffer was aborted due to an error during execution. Caused GPU Timeout Error (00000002:kIOAccelCommandBufferCallbackErrorTimeout)
CommandBuffer Failed: cycles_metal_integrator_intersect_shadow

Exact steps for others to reproduce the error

I tried few other Cycles demos: barbershop, car demo, Italian flat, lone monk, monster under bed. All same ends with Blender crash.
For car demo for a second I saw first sample result and then crash.

Default cube works however.

Revisions and Commits

rB Blender
D16713

Event Timeline

Paweł Kołodziejski (aquadran) created this task.Nov 26 2022, 9:41 AM
Paweł Kołodziejski (aquadran) updated the task description.Nov 27 2022, 11:16 AM
Pratik Borhade (PratikPB2123) added subscribers: Brecht Van Lommel (brecht), Pratik Borhade (PratikPB2123).EditedNov 29 2022, 8:18 AM

Hi, thanks for the report. Crash could be related to T101787: GPU Metal Render fails with error "CommandBuffer Failed: cycles metal integrator_ reset" on M2 MacBook Air
As far as I understand, crash is due to out of memory in T101787, which is probably not the reason here for crash
@Brecht Van Lommel (brecht) can you check?

Pratik Borhade (PratikPB2123) added a project: Render & Cycles.Nov 29 2022, 8:18 AM
Brecht Van Lommel (brecht) added subscribers: Morteza Mostajab (mmostajab), Michael Jones (michael_jones).Nov 29 2022, 12:35 PM

@Morteza Mostajab (mmostajab) @Michael Jones (michael_jones), can you check? Not sure if there is an issue with Intel in general or perhaps this particular GPU.

Morteza Mostajab (mmostajab) added a comment.Nov 29 2022, 3:45 PM

Hi @Brecht Van Lommel (brecht)
I managed to reproduce the issue on Intel Iris GPU on a machine with 8GB ram. We think it is probably running out of memory. We will investigate it more.

Paweł Kołodziejski (aquadran) updated the task description.Nov 29 2022, 8:40 PM
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Nov 30 2022, 2:21 AM
Pratik Borhade (PratikPB2123) added a project: Platform: macOS.Dec 6 2022, 4:20 AM
Michael Jones (michael_jones) closed this task as Resolved by committing rB2dc51fccb838: Fix T101787, T102786. Cycles: Improved out-of-memory messaging on Metal.Dec 7 2022, 2:56 PM
Michael Jones (michael_jones) claimed this task.
Michael Jones (michael_jones) added a commit: rB2dc51fccb838: Fix T101787, T102786. Cycles: Improved out-of-memory messaging on Metal.
Paweł Kołodziejski (aquadran) added a comment.Dec 8 2022, 2:43 AM

Unfortunately fix doesn't catch memory issues and Blender crashes. Interesting that Blender from master branch works better. Sometimes works few times in row without issue, and another time keeps crashing and leads to hang system. I presume this one has lower memory footprint.

Michael Jones (michael_jones) reopened this task as Needs Triage.Dec 13 2022, 6:37 PM
Caco Oportot (Cacov) added a subscriber: Caco Oportot (Cacov).Dec 13 2022, 6:54 PM
Paweł Kołodziejski (aquadran) added a comment.Dec 13 2022, 9:33 PM

I can not reproduce issue with Blender from master branch now, same build as before.
Still, the 3.4 release keeps crashing with fix manually applied.

Pratik Borhade (PratikPB2123) edited projects, added BF Blender (3.4); removed BF Blender.Dec 14 2022, 6:50 AM

Still, the 3.4 release keeps crashing with fix manually applied.

So backporting the same fix to 3.4 would not work.
@Michael Jones (michael_jones) , can you also verify whether it works in 3.4 branch?