Persistent data –> Out of GPU memory (macOS) #110520

Open
opened 2023-07-27 09:03:06 +02:00 by vintezis · 9 comments

System Information
Operating system: MacOS 12.6.6
Graphics card: M1

Blender Version
Broken: 3.6.1
Worked: (newest version of Blender that worked as expected)

Short description of error
If "Persistent data" checkbox is on, after a couple of frames rendering, Blender is quits or just says "Out of GPU memory" (a MacOS bugreport and screenshots are attached)

If I turn OFF persistent data switcher, animation rendering is working fine. It seems, the data is persistent, but the BVH loading happens on all frames, so the memory filling up.

Exact steps for others to reproduce the error

  • Download and open the attached .blend file.
  • Navigate to the 'Render' tab in the top menu.
  • Select 'Render Animation' from the dropdown menu.
  • Allow a few frames to render.

GPU-memory-OUT.blend.zip

**System Information** Operating system: MacOS 12.6.6 Graphics card: M1 **Blender Version** Broken: 3.6.1 Worked: (newest version of Blender that worked as expected) **Short description of error** If "Persistent data" checkbox is on, after a couple of frames rendering, Blender is quits or just says "Out of GPU memory" (a MacOS bugreport and screenshots are attached) If I turn OFF persistent data switcher, animation rendering is working fine. It seems, the data is persistent, but the BVH loading happens on all frames, so the memory filling up. **Exact steps for others to reproduce the error** - Download and open the attached .blend file. - Navigate to the 'Render' tab in the top menu. - Select 'Render Animation' from the dropdown menu. - Allow a few frames to render. [GPU-memory-OUT.blend.zip](attachments/e51278a9-bb5f-4ecb-b08b-1d02254a7f9d)
vintezis added the
Type
Report
Status
Needs Triage
Priority
Normal
labels 2023-07-27 09:03:07 +02:00
YimingWu added the
Platform
macOS
label 2023-07-27 16:59:04 +02:00

Could you provide a simplified file, or mention any of the Demo-Files so we can replicate the problem?

Could you provide a simplified file, or mention any of the [Demo-Files](https://www.blender.org/download/demo-files/) so we can replicate the problem?
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-07-28 07:55:55 +02:00
Author

It seems the link for the blender file disappeared...

Im trying to upload to here directly.

It seems the link for the blender file disappeared... Im trying to upload to here directly.
Iliya Katushenock added the
Interest
Render & Cycles
label 2023-08-23 13:53:53 +02:00
Member

Unable to confirm on windows (4.0, 8a735d0aa4c7). ~1.6GB VRAM was utilized during the render by persistent data cache.
@vintezis , are you rendering on CPU or GPU? How much RAM/VRAM you have? And how much is utilized during render?

**System Information**
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 532.03
Unable to confirm on windows (4.0, `8a735d0aa4c7`). ~1.6GB VRAM was utilized during the render by persistent data cache. @vintezis , are you rendering on CPU or GPU? How much RAM/VRAM you have? And how much is utilized during render? ``` **System Information** Operating system: Windows-10-10.0.22000-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3050 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 532.03 ```
Author

As you see on screenshots its macOS on M1 SoC. RAM is 16GB unified memory and of course GPU rendering is set.

It seems to me in this case persistent data always added to the previous dataset from previous frame. Thats why the RAM is overflowing.

As you see on screenshots its macOS on M1 SoC. RAM is 16GB unified memory and of course GPU rendering is set. It seems to me in this case persistent data always added to the previous dataset from previous frame. Thats why the RAM is overflowing.
Member

It seems to me in this case persistent data always added to the previous dataset from previous frame. Thats why the RAM is overflowing.

Increase in memory usage is expected as said in the manual: https://docs.blender.org/manual/en/dev/render/cycles/render_settings/performance.html#final-render

are you rendering on CPU or GPU

This is still unanswered 😅

Could this be mac specific? @mano-wii will you be able to test on mac system?

> It seems to me in this case persistent data always added to the previous dataset from previous frame. Thats why the RAM is overflowing. Increase in memory usage is expected as said in the manual: https://docs.blender.org/manual/en/dev/render/cycles/render_settings/performance.html#final-render > are you rendering on CPU or GPU This is still unanswered 😅 Could this be mac specific? @mano-wii will you be able to test on mac system?
Author

are you rendering on CPU or GPU

This is still unanswered 😅

the error message is "Out of GPU memory" and i wrote in previous comment "GPU rendering was set".... so yes im using GPU for rendering

If this is mac specific then its 3.6 (or 3.5) specific also because about one year ago wasn't any problem with this file on the same computer.

> > are you rendering on CPU or GPU > > This is still unanswered 😅 the error message is "Out of GPU memory" and i wrote in previous comment "GPU rendering was set".... so yes im using GPU for rendering If this is mac specific then its 3.6 (or 3.5) specific also because about one year ago wasn't any problem with this file on the same computer.
Member

Ah, right. Title itself mentions the word "GPU"
I'll reset the status.

Ah, right. Title itself mentions the word "GPU" I'll reset the status.
Pratik Borhade added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2023-08-31 10:54:47 +02:00
Member

Could be related to #106552
There might be memory leak when rendering with Persistent data, hence the higher memory usage (~18 GB as shown in the screen shot)
Could you check this issue again in recent 4.0 build?: https://builder.blender.org/download/daily/

Could this be mac specific? @mano-wii will you be able to test on mac system?

@mano-wii ^

Could be related to #106552 There might be memory leak when rendering with Persistent data, hence the higher memory usage (~18 GB as shown in the screen shot) Could you check this issue again in recent 4.0 build?: https://builder.blender.org/download/daily/ > Could this be mac specific? @mano-wii will you be able to test on mac system? @mano-wii ^
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-09-26 06:41:14 +02:00

I can confirm by rendering just 1 of the frames in the attached file. (Which helps since each frame takes 17 minutes to render).
I tested on 4.0 and monitored activity to check memory. The RAM memory is no more than 8GB.
I imagined that b7fe84d9bc might improve this situation.

Read blend: "/Users/germanocavalcante/Downloads/Gold Rings 01, HDRI.blend"
2023-09-26 11:33:39.061951-0300 Blender[38572:158893] [Window] Warning: Window CocoaWindow 0x114c37200 ordered front from a non-active application and may order beneath the active application's windows.
2023-09-26 11:33:50.270198-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.317923-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.318530-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.320249-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.320507-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached

(...)

2023-09-26 11:33:50.374728-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.375387-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.376425-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
2023-09-26 11:33:50.376956-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached
System is out of GPU memory

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

2023-09-26 11:39:03.757839-0300 Blender[38572:164767] -[_MTLCommandEncoder dealloc], line 131: error 'Command encoder released without endEncoding'
-[_MTLCommandEncoder dealloc]:131: failed assertion `Command encoder released without endEncoding'

It's possible this is a case where Blender simply ran out of VRAM memory due to the complex scene.
I'm not sure if it's actually a Metal bug.
While we want to improve Blender to handle system running out of memory gracefully, this is not currently considered a bug.

May need investigation from the Cycles team.

I can confirm by rendering just 1 of the frames in the attached file. (Which helps since each frame takes 17 minutes to render). I tested on 4.0 and monitored activity to check memory. The RAM memory is no more than 8GB. I imagined that b7fe84d9bc might improve this situation. ``` Read blend: "/Users/germanocavalcante/Downloads/Gold Rings 01, HDRI.blend" 2023-09-26 11:33:39.061951-0300 Blender[38572:158893] [Window] Warning: Window CocoaWindow 0x114c37200 ordered front from a non-active application and may order beneath the active application's windows. 2023-09-26 11:33:50.270198-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.317923-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.318530-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.320249-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.320507-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached (...) 2023-09-26 11:33:50.374728-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.375387-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.376425-0300 Blender[38572:164769] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached 2023-09-26 11:33:50.376956-0300 Blender[38572:164768] mdb_txn_commit error: MDB_MAP_FULL: Environment mapsize limit reached System is out of GPU memory Refer to the Cycles GPU rendering documentation for possible solutions: https://docs.blender.org/manual/en/latest/render/cycles/gpu_rendering.html 2023-09-26 11:39:03.757839-0300 Blender[38572:164767] -[_MTLCommandEncoder dealloc], line 131: error 'Command encoder released without endEncoding' -[_MTLCommandEncoder dealloc]:131: failed assertion `Command encoder released without endEncoding' ``` It's possible this is a case where Blender simply ran out of VRAM memory due to the complex scene. I'm not sure if it's actually a Metal bug. While we want to improve Blender to handle system running out of memory gracefully, this is not currently considered a bug. May need investigation from the Cycles team.
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#110520
No description provided.