Often crash on reading heavy resources #85088

Closed
opened 2021-01-26 21:01:08 +01:00 by Bo Maryniuk · 14 comments

System Information
Operating system: MacOS 10.15.2, Linux Ubuntu 20.04
Graphics card: Intel stuff :-(

Blender Version
Broken: 2.9+ (all existing)
Worked: 2.8 (not sure if it is actually not broken, but at least noticeably less encountering such things)

Short description of error
Crash on making complex collection visible in viewport.

Exact steps for others to reproduce the error
Set some collection as invisible in viewport, which has tons of textures and stuff inside.
Then keep it invisible for a while (let the memory changes enough), do some renders.
So if machine has not so much RAM, e.g. 8GB overall, and Blender swaps to a bigger size of it,
like 5-7GB, try to make that collection back visible.

It almost certainly will immediately crash. This bug was started to be very annoying since
2.9 version, and is still in 2.93 Alpha I am trying updating almost every day.

To my eyes it looks like Blender is trying to access some pages it swapped (?) and then
this seems doesn't work for that well.

Additionally to this, crashes was also trying to open just a file browser, e.g. set render
output directory, once Blender allocated a lot of RAM on 8GB memory machine. But these
are almost impossible to replicate, as they are very rare.

**System Information** Operating system: MacOS 10.15.2, Linux Ubuntu 20.04 Graphics card: Intel stuff :-( **Blender Version** Broken: 2.9+ (all existing) Worked: 2.8 (not sure if it is actually not broken, but at least noticeably less encountering such things) **Short description of error** Crash on making complex collection visible in viewport. **Exact steps for others to reproduce the error** Set some collection as invisible in viewport, which has tons of textures and stuff inside. Then keep it invisible for a while (let the memory changes enough), do some renders. So if machine has not so much RAM, e.g. 8GB overall, and Blender swaps to a bigger size of it, like 5-7GB, try to make that collection back visible. It almost certainly will immediately crash. This bug was started to be very annoying since 2.9 version, and is still in 2.93 Alpha I am trying updating almost every day. To my eyes it looks like Blender is trying to access some pages it swapped (?) and then this seems doesn't work for that well. Additionally to this, crashes was also trying to open just a file browser, e.g. set render output directory, once Blender allocated a lot of RAM on 8GB memory machine. But these are almost impossible to replicate, as they are very rare.
Author

Added subscriber: @isbm

Added subscriber: @isbm

Added subscriber: @rjg

Added subscriber: @rjg

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'

This sounds like you're simply running out of memory. If the content you are trying to display requires more RAM than is available then macOS can try to use the swap file, but once that space is exhausted the application will be terminated. There is nothing Blender can do about this, you would have to make sure that your project works within the constraints of your hardware.

If you suspect that Blender has a memory leak that under certain conditions results in memory remaining allocated in greater quantities than is correct, then we would need more information to investigate this, e.g. exact step by step instruction that would allow us to replicate the problem.

This sounds like you're simply running out of memory. If the content you are trying to display requires more RAM than is available then macOS can try to use the swap file, but once that space is exhausted the application will be terminated. There is nothing Blender can do about this, you would have to make sure that your project works within the constraints of your hardware. If you suspect that Blender has a memory leak that under certain conditions results in memory remaining allocated in greater quantities than is correct, then we would need more information to investigate this, e.g. exact step by step instruction that would allow us to replicate the problem.
Author

Hi Rob!

Thank you for the reply. Well, certainly Blender should not just kill all the work, but say "Unable to allocate more memory" and just discard the task. I hope we agree here. :)

Second, this is actually much more tricky than just that. I've noticed if I render something, then adjust/render/adjust etc., it even can drop the memory use from like 6GB to 2-3GB (data taken from the status bar, unless it is totally wrong). And then if I try to access the object again, it immediately crashes. Knowing this super-annoying bug, which is, again, not that present in 2.8, I just very often saving the file. So after it crashes, if I restart Blender, reload everything and just continue from that point, I can keep working w/o problems at all, until it again loses a sync and crashes.

It more feels like it is a resource management bug, because it looks like it simply loses a sync of data/resources and then when trying to re-access it, gets it wrong and segfaults. In any case, if Blender knows it is going to run out of memory, it still should be able to prevent crash, rather then just crash, right? But to me it looks a bug on resources re-reading/un-swapping (I don't know the details of that part of the code).

Hope it clarifies?

Hi Rob! Thank you for the reply. Well, certainly Blender should not just kill all the work, but say "Unable to allocate more memory" and just discard the task. I hope we agree here. :) Second, this is actually much more tricky than just that. I've noticed if I render something, then adjust/render/adjust etc., it even can drop the memory use from like 6GB to 2-3GB (data taken from the status bar, unless it is totally wrong). And then if I try to access the object again, it immediately crashes. Knowing this super-annoying bug, which is, again, not that present in 2.8, I just very often saving the file. So after it crashes, if I restart Blender, reload everything and just continue from that point, I can keep working w/o problems at all, until it again loses a sync and crashes. It more feels like it is a resource management bug, because it looks like it simply loses a sync of data/resources and then when trying to re-access it, gets it wrong and segfaults. In any case, if Blender knows it is going to run out of memory, it still should be able to prevent crash, rather then just crash, right? But to me it looks a bug on resources re-reading/un-swapping (I don't know the details of that part of the code). Hope it clarifies?

@isbm Blender can at most check if the allocation fails, but if the OOM killer of the OS terminates the process for allocating more than is available, including swap, then there is nothing the software can do about it.

That description does sound like a bug but we need at least a stack trace from the crash reporter that should open afterwards and step by step instructions to reproduce it. Otherwise the developers on macOS won't be able to track down the issue.

The issue you've describe in your last comment doesn't sound like you're running out of memory. That would crash pretty much immediately at the peak of the memory usage not later on when attempting to work on a particular object.

@isbm Blender can at most check if the allocation fails, but if the OOM killer of the OS terminates the process for allocating more than is available, including swap, then there is nothing the software can do about it. That description does sound like a bug but we need at least a stack trace from the crash reporter that should open afterwards and step by step instructions to reproduce it. Otherwise the developers on macOS won't be able to track down the issue. The issue you've describe in your last comment doesn't sound like you're running out of memory. That would crash pretty much immediately at the peak of the memory usage not later on when attempting to work on a particular object.
Author

OK, so what's the next steps? I can drop here the result stack from that typical post-mortem window, if that helps.

OK, so what's the next steps? I can drop here the result stack from that typical post-mortem window, if that helps.

@isbm Yes, please put that in a *.txt file and upload it here.

2019_12_04_upload_icon_developer_blender_org.png

@isbm Yes, please put that in a *.txt file and upload it here. ![2019_12_04_upload_icon_developer_blender_org.png](https://archive.blender.org/developer/F8190038/2019_12_04_upload_icon_developer_blender_org.png)
Author

Rob, here you go. One of the crashes.
It rendered pretty much nice everything, but then a single access to something in the object tree took it down. Status bar was shoing something like 3.5Gb RAM allocated.2021-feb-5.txt

Rob, here you go. One of the crashes. It rendered pretty much nice everything, but then a single access to something in the object tree took it down. Status bar was shoing something like 3.5Gb RAM allocated.[2021-feb-5.txt](https://archive.blender.org/developer/F9654611/2021-feb-5.txt)
Author

Another one. This time about 2Gb RAM allocated, according to the status bar.
2021-feb-6.txt

Another one. This time about 2Gb RAM allocated, according to the status bar. [2021-feb-6.txt](https://archive.blender.org/developer/F9672945/2021-feb-6.txt)

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

From crash logs this seems related to #87161 (Blender randomly crash without reason in 'glDrawElementsInstancedBaseVertex' (in 'OVERLAY_wireframe_draw' or 'workbench_draw_sample'))
Will close this as duplicate. Thanks for the report.
Feel free to comment if there is misunderstanding. Will reopen in that case.

From crash logs this seems related to #87161 (Blender randomly crash without reason in 'glDrawElementsInstancedBaseVertex' (in 'OVERLAY_wireframe_draw' or 'workbench_draw_sample')) Will close this as duplicate. Thanks for the report. Feel free to comment if there is misunderstanding. Will reopen in that case.
Member

Closed as duplicate of #87161

Closed as duplicate of #87161
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#85088
No description provided.