Blender freeze rendering animation with Mantaflow #92423
Labels
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#92423
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.41
Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-10-14 20:36, hash:
2055ef107a
Worked: 2.93
Short description of error
Rendering the scene with Volumetrics and hair particles Cycles freezes.
--debug-cycles
gives this output.:Exact steps for others to reproduce the error
My apologies for the large file, but unfortunately this is the smallest file where I can reproduce the error.
schlegeis_debug_package.zip
shotfiles/SH_140.blend
.Added subscriber: @PeterBaintner
#93136 was marked as duplicate of this issue
[Cycles X] Freeze at scene build time.to [Cycles X] Freeze at InitializingAfter further investigation I found out, that the problem is probably only the volume. Therefore I was able to reduce the size and complexity of the test file even further.
cycles_x_initializing_bug.zip
There are two scenarios how Cycles freezes. Either it stops after rendering one frame:
Or it stops while initializing:
Added subscriber: @Raimund58
Added subscriber: @leesonw
If I run the regular version it seems to hang. I got a lot of debug output when I rand this on a debug build see P2539 but it did not crash I could even try and render and that worked kind of. It does seem like something is wrong as there are division by zero errors which is probably causing something probably uninitialised data which would be different in a debug vs release build :-)
Changed status from 'Needs Triage' to: 'Confirmed'
Added subscriber: @brecht
I see this backtrace for one of the threads:
P2547: (An Untitled Masterwork)
Looks like some kind of deadlock involving Mantaflow Python scripts, Python drivers, and TBB.
Added subscribers: @dr.sybren, @Sergey
This seems to be good old friend GIL. There were some changes in 3.0 related on how the dependency graph handles drivers and GIL, but reverting those does not solve the problem. Would be nice to have a closer look with @sybren.
Based on backtrace i have P2548 it seems one of the threads locks drivers mutex and is being held inside of the lock due to
PyGILState_Ensure
, while others are helding the GIL and are trying to enter the driver lock. Something like this, wouldn't know why otherwise the code will be locked in this state.Seems we've been typing with Brecht in parallel :)
Sybren had a look into my backtrace (thanks a lot!) so correction to my previous comment: the TBB threading in the mantaflow steals tasks from the dependency graph pool, which makes them to be executed from the wrong state of GIL. Seems like we "just" need to isolate either depsgraph or mantaflow pools.
A proof-of-concept patch: P2549. Seems to work (tm), for this file at least. There are other parallel code in Mantaflow which might need isolation.
@brecht, having a second though here. Shall we isolate from Mantaflow, or we do isolation on the Mantaflow API usage level (as in, have isolation calls in
BKE_fluid_*
) ?This issue was referenced by
8507336e76
[Cycles X] Freeze at Initializingto Blender freeze rendering animation with MantaflowChanged status from 'Confirmed' to: 'Resolved'
Added subscribers: @Martin-Sirg, @lichtwerk