Mantaflow simulation stops and crashes at the end of the bake (or when closing blender): The CG solver diverged, residual norm > 1e30, stopping. #87975

Open
opened 2021-05-01 23:53:36 +02:00 by Anthony Kitchin · 26 comments

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-01 16:15, hash: ecc7a83798
Worked: -

Short description of error
Crash baking fluid simulation.

Exact steps for others to reproduce the error

Open the file and bake all its frames (or only frame 181 to 183).

beach.blend

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<string>", line 169, in bake_fluid_data_5
  File "<string>", line 164, in bake_fluid_process_data_5
  File "<string>", line 136, in liquid_adaptive_step_5
  File "<string>", line 221, in liquid_step_5
RuntimeError: GridCg::iterate: The CG solver diverged, residual norm > 1e30, stopping.
Error raised in extern/mantaflow/preprocessed/conjugategrad.cpp:562
(...)
terminate called after throwing an instance of 'Manta::Error'
  what():  can't clean grid cache, some grids are still in use
Error raised in extern/mantaflow/preprocessed/fluidsolver.cpp:33
Aborted (core dumped)

Complete output: P2568

**Blender Version** Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-05-01 16:15, hash: `ecc7a83798` Worked: - **Short description of error** Crash baking fluid simulation. **Exact steps for others to reproduce the error** Open the file and bake all its frames (or only frame 181 to 183). [beach.blend](https://archive.blender.org/developer/F10049235/beach.blend) ``` Traceback (most recent call last): File "<string>", line 1, in <module> File "<string>", line 169, in bake_fluid_data_5 File "<string>", line 164, in bake_fluid_process_data_5 File "<string>", line 136, in liquid_adaptive_step_5 File "<string>", line 221, in liquid_step_5 RuntimeError: GridCg::iterate: The CG solver diverged, residual norm > 1e30, stopping. Error raised in extern/mantaflow/preprocessed/conjugategrad.cpp:562 (...) terminate called after throwing an instance of 'Manta::Error' what(): can't clean grid cache, some grids are still in use Error raised in extern/mantaflow/preprocessed/fluidsolver.cpp:33 Aborted (core dumped) ``` Complete output: [P2568](https://archive.blender.org/developer/P2568.txt)

Added subscriber: @anthony.kitchin

Added subscriber: @anthony.kitchin

#104215 was marked as duplicate of this issue

#104215 was marked as duplicate of this issue

#96111 was marked as duplicate of this issue

#96111 was marked as duplicate of this issue

#93583 was marked as duplicate of this issue

#93583 was marked as duplicate of this issue

#89723 was marked as duplicate of this issue

#89723 was marked as duplicate of this issue

#87021 was marked as duplicate of this issue

#87021 was marked as duplicate of this issue
[system-info.txt](https://archive.blender.org/developer/F10049234/system-info.txt) [beach.blend](https://archive.blender.org/developer/F10049235/beach.blend)
Member

Added subscribers: @erikeah, @lichtwerk

Added subscribers: @erikeah, @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Added subscriber: @sebbas

Added subscriber: @sebbas
Member

Sorry this has been lying around.

I can confirm, error occurs at the very end of the bake.

CC @sebbas

Sorry this has been lying around. I can confirm, error occurs at the very end of the bake. CC @sebbas
Philipp Oeser changed title from The CG solver diverged, residual norm > 1e30, stopping. to Mantaflow crash at the end of the bake: The CG solver diverged, residual norm > 1e30, stopping. 2021-06-24 14:39:25 +02:00
Philipp Oeser changed title from Mantaflow crash at the end of the bake: The CG solver diverged, residual norm > 1e30, stopping. to Mantaflow simulation stops and crashes at the end of the bake (or when closing blender): The CG solver diverged, residual norm > 1e30, stopping. 2021-09-15 10:30:15 +02:00
Member

Added subscribers: @itamar-erez, @PratikPB2123, @iss

Added subscribers: @itamar-erez, @PratikPB2123, @iss
Member

Since this has been reported often, will set to High prio.

Since this has been reported often, will set to High prio.

There are 2 things that triggered the crash:

  1. Normals of beach obstacle are pointing inwards.
  2. Beach and pusher create airpockets in the domain.

@anthony.kitchin If you modify your setup to look something like this, you should not get a crash (i.e. flip normals of beach object, pull bottom faces of beach and pusher downwards).

#87975.png

Now, there are already sanity checks that should catch invalid domain setups like this one. Here they fell through. Will investigate why, so keeping report open for now.

There are 2 things that triggered the crash: 1. Normals of beach obstacle are pointing inwards. 2. Beach and pusher create airpockets in the domain. @anthony.kitchin If you modify your setup to look something like this, you should not get a crash (i.e. flip normals of beach object, pull bottom faces of beach and pusher downwards). ![#87975.png](https://archive.blender.org/developer/F11761605/T87975.png) Now, there are already sanity checks that should catch invalid domain setups like this one. Here they fell through. Will investigate why, so keeping report open for now.

Added subscriber: @dfelinto

Added subscriber: @dfelinto

At the moment there is no one actively maintaining Mantaflow (and its integration with Blender). I'm moving this to Known Issue.

At the moment there is no one actively maintaining Mantaflow (and its integration with Blender). I'm moving this to Known Issue.

Added subscriber: @BEHE

Added subscriber: @BEHE

Added subscriber: @frispete

Added subscriber: @frispete
Added subscriber: @Iago-Diogo-de-Vasconcelos-Mota

Added subscriber: @SahilShahzad

Added subscriber: @SahilShahzad

Got the same error again, Blender 3.3, Temp fix for those looking: set cache type to Modular, and then bake separately, worked for me. memory issues? but ram usage was at 50% only on mine.

Got the same error again, Blender 3.3, Temp fix for those looking: set cache type to Modular, and then bake separately, worked for me. memory issues? but ram usage was at 50% only on mine.
Member

Added subscribers: @Ivan-2, @rlguy

Added subscribers: @Ivan-2, @rlguy
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:44:51 +01:00
Brecht Van Lommel added
Priority
Normal
and removed
Priority
High
labels 2023-02-15 10:19:43 +01:00

There is no intention to fix this bug?, mantaflow is practically unusable today. It has such basic bugs, that it is not possible to create a complex scene.

But not even a scene as simple as having an effector with an animation.

There is no intention to fix this bug?, mantaflow is practically unusable today. It has such basic bugs, that it is not possible to create a complex scene. But not even a scene as simple as having an effector with an animation.
Member

Agree on this, shouldn't this be fixed? it's a full crash of Blender, does not seem to be related with Mantaflow (the sim part) but more with the management part, at least it should give an error, but not a crash I assume :)

Agree on this, shouldn't this be fixed? it's a full crash of Blender, does not seem to be related with Mantaflow (the sim part) but more with the management part, at least it should give an error, but not a crash I assume :)
@juang3d @Esteban-G-Vega https://projects.blender.org/blender/blender/issues/87975#issuecomment-221359
Member

@mod_moder that's clear, the thing is that this is not about mantaflow itself (the simulation) but a generic crash in the software, it has no relation with the simulator but with the blender integration, and it makes blender to fully crash, so I don't see a reason to link this to the actual mantaflow development, I see it more related to a cleanup of crashing bugs in blender, what usually where forbidden and quickly resolved, precisely because it kills blender's stability.

So I doubt this should be treated as a Mantaflow bug, and more like a Blender stability bug, because it's probably some kind of memory leak that should not be happening at all, no matter what's the status of the simulator :)

To be clear, at the very least there should be an error print to the console and avoid the blender crash, that's the very minimum I think, to avoid the Blender crash.

@mod_moder that's clear, the thing is that this is not about mantaflow itself (the simulation) but a generic crash in the software, it has no relation with the simulator but with the blender integration, and it makes blender to fully crash, so I don't see a reason to link this to the actual mantaflow development, I see it more related to a cleanup of crashing bugs in blender, what usually where forbidden and quickly resolved, precisely because it kills blender's stability. So I doubt this should be treated as a Mantaflow bug, and more like a Blender stability bug, because it's probably some kind of memory leak that should not be happening at all, no matter what's the status of the simulator :) To be clear, at the very least there should be an error print to the console and avoid the blender crash, that's the very minimum I think, to avoid the Blender crash.
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
12 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#87975
No description provided.