Regression: GPU memory accumulation in Cycles render #95837

Closed
opened 2022-02-17 15:23:57 +01:00 by Semih Iyikalender · 11 comments

System Information
Operating system: Linux-5.13.0-28-generic-x86_64-with-glibc2.31 64 Bits
Graphics card: NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 495.29.05

Blender Version
Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-16 18:49, hash: 05697470ab 3.1.0 Beta, branch: master, commit date: 2022-02-13 02:13, hash: 517afcc858b0
Worked: blender-3.0.0-linux-x64

This broke between bad 922ae55a16 & good 37d6ae16be (20cb2c72a5 possibly?)

Short description of error
There is a GPU memory accumulation in Cycles render.
1024 samples with denoiser on. Also, extra compositing on frames results "out of GPU memory" error in later frames.
I watched with watch nvidia-smi command, each frame GPU memory increases. In the process section blender starts around 200Mb memory usage, after rendering 200 frames becomes 3Gb.
And quitting the render window doesn't decrease the memory usage, stays in the last state.
Tested with 128, 8, 1 samples, with and without denoiser and disabled compositing, there is still a memory accumulation that occurs in each scenario.

Exact steps for others to reproduce the error
Just render it.
render_bug_tests.blend

note: the following error gets spit to the console:

Invalid graphics context in cuGraphicsUnregisterResource(cu_graphicsresource) (intern/cycles/device/cuda/graphics_interop.cpp:36)

Other related reports with the same error message include

  • #95733 (Cycles Cuda/Optix error message with multi GPU devices. (Invalid graphics context in cuGraphicsUnregisterResource))
  • #95651 (GPU error (Invalid graphics context in cuGraphicsUnregisterResource))
  • #95631 (VRAM is not being freed when rendering (Invalid graphics context in cuGraphicsUnregisterResource))
  • #89747 (Cycles Render - Textures Disappear then Crashes the Render)
  • #95763 (Cycles freeze with hologram shader)
**System Information** Operating system: Linux-5.13.0-28-generic-x86_64-with-glibc2.31 64 Bits Graphics card: NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 495.29.05 **Blender Version** Broken: version: 3.1.0 Beta, branch: master, commit date: 2022-02-16 18:49, hash: `05697470ab` 3.1.0 Beta, branch: master, commit date: 2022-02-13 02:13, hash: `517afcc858b0` Worked: blender-3.0.0-linux-x64 This broke between bad 922ae55a16 & good 37d6ae16be (20cb2c72a5 possibly?) **Short description of error** There is a GPU memory accumulation in Cycles render. 1024 samples with denoiser on. Also, extra compositing on frames results "out of GPU memory" error in later frames. I watched with `watch nvidia-smi` command, each frame GPU memory increases. In the process section blender starts around 200Mb memory usage, after rendering 200 frames becomes 3Gb. And quitting the render window doesn't decrease the memory usage, stays in the last state. Tested with 128, 8, 1 samples, with and without denoiser and disabled compositing, there is still a memory accumulation that occurs in each scenario. **Exact steps for others to reproduce the error** Just render it. [render_bug_tests.blend](https://archive.blender.org/developer/F12871282/render_bug_tests.blend) note: the following error gets spit to the console: ``` Invalid graphics context in cuGraphicsUnregisterResource(cu_graphicsresource) (intern/cycles/device/cuda/graphics_interop.cpp:36) ``` Other related reports with the same error message include - #95733 (Cycles Cuda/Optix error message with multi GPU devices. (Invalid graphics context in cuGraphicsUnregisterResource)) - #95651 (GPU error (Invalid graphics context in cuGraphicsUnregisterResource)) - #95631 (VRAM is not being freed when rendering (Invalid graphics context in cuGraphicsUnregisterResource)) - #89747 (Cycles Render - Textures Disappear then Crashes the Render) - #95763 (Cycles freeze with hologram shader)

Added subscriber: @merkwur

Added subscriber: @merkwur

Added subscriber: @tempdevnova

Added subscriber: @tempdevnova

Yep can definetly confirm this with my own blender files on my GTX 1080.

Can't really figure out the cause howver... I always assumed it was because of persistent data option but you didn't even have it on.

The same issue also exists within the viewport, where after rendering an image and switching the viewport to rendered mode it would report "out of host and shared memory" and cause blender to crash.

Yep can definetly confirm this with my own blender files on my GTX 1080. Can't really figure out the cause howver... I always assumed it was because of persistent data option but you didn't even have it on. The same issue also exists within the viewport, where after rendering an image and switching the viewport to rendered mode it would report "out of host and shared memory" and cause blender to crash.

I haven't experienced any issue in the viewport which includes 700 objects, 500k trinagles, two armature, and mb-lab data.
I can say that I have a relatively smooth experience with navigating around in the viewport-render view with all the objects and textures included, and occasionally rendering a single image.
Hence, I can't relate to your issue in this. That might be some other issue like; CUDA version or driver, etc?
But definitely, there is some issue with the rendering of multiple frames.

I haven't experienced any issue in the viewport which includes 700 objects, 500k trinagles, two armature, and mb-lab data. I can say that I have a relatively smooth experience with navigating around in the viewport-render view with all the objects and textures included, and occasionally rendering a single image. Hence, I can't relate to your issue in this. That might be some other issue like; CUDA version or driver, etc? But definitely, there is some issue with the rendering of multiple frames.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm, will try to narrow it down.

Can confirm, will try to narrow it down.
Member

Added subscribers: @Sergey, @brecht

Added subscribers: @Sergey, @brecht
Member

This broke between bad 922ae55a16 & good 37d6ae16be (20cb2c72a5 possibly?)

CC @Sergey
CC @brecht

This broke between bad 922ae55a16 & good 37d6ae16be (20cb2c72a5 possibly?) CC @Sergey CC @brecht
Philipp Oeser changed title from GPU memory accumulation in Cycles render to Regression: GPU memory accumulation in Cycles render 2022-02-18 10:06:59 +01:00
Sergey Sharybin self-assigned this 2022-02-18 14:20:58 +01:00

This issue was referenced by e4b7d52fe4

This issue was referenced by e4b7d52fe4fe3076f5f68ff575c200f5cf16e416

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
5 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#95837
No description provided.