Blender hangs when using masking, dilate-erode and soften node #44871

Closed
opened 2015-05-28 14:41:36 +02:00 by Sebastian Koenig · 24 comments

System Information
OSX 10.10.2, GTX970

Blender Version
Broken: 000dfc0
Worked: 2.74

Short description of error
This is a bit of a weird bug.
Blender hangs when combining the soften node and the dilate erode node together with masking. It only happens if soften and dilate are active, if one of them is muted blender works fine. I suspect the dilate/erode node is problematic in some way anyway, because if i set it to linear feathering, i get these issues in the console: http://www.pasteall.org/58689
I guess the interesting line here is "BLI_assert failed: /Volumes/blender/source/blender/compositor/operations/COM_BlurBaseOperation.cpp:144, make_dist_fac_inverse(), at '0'"

Exact steps for others to reproduce the error
Open this file: linear_feather.blend
Press F12
Tweak the mask rapidly, maybe by moving its center point quickly in small steps around. At some point blender just hangs and has to be killed. No errors in the console, not even with --debug or even using lldp. It's superweird. And: i couldn't reproduce on linux.

**System Information** OSX 10.10.2, GTX970 **Blender Version** Broken: 000dfc0 Worked: 2.74 **Short description of error** This is a bit of a weird bug. Blender hangs when combining the soften node and the dilate erode node together with masking. It only happens if soften and dilate are active, if one of them is muted blender works fine. I suspect the dilate/erode node is problematic in some way anyway, because if i set it to linear feathering, i get these issues in the console: http://www.pasteall.org/58689 I guess the interesting line here is "BLI_assert failed: /Volumes/blender/source/blender/compositor/operations/COM_BlurBaseOperation.cpp:144, make_dist_fac_inverse(), at '0'" **Exact steps for others to reproduce the error** Open this file: [linear_feather.blend](https://archive.blender.org/developer/F180792/linear_feather.blend) Press F12 Tweak the mask rapidly, maybe by moving its center point quickly in small steps around. At some point blender just hangs and has to be killed. No errors in the console, not even with --debug or even using lldp. It's superweird. And: i couldn't reproduce on linux.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @sebastian_k

Added subscriber: @sebastian_k
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

I would try I build from build bot there were some threading issues that were fixed so it's worth a try

https://builder.blender.org/download/

I would try I build from build bot there were some threading issues that were fixed so it's worth a try https://builder.blender.org/download/
Author
Member

Added subscriber: @jensverwiebe

Added subscriber: @jensverwiebe
Author
Member

I tested buildbot, also @jensverwiebe could confirm the issue.

I tested buildbot, also @jensverwiebe could confirm the issue.

Added subscriber: @Psy-Fi

Added subscriber: @Psy-Fi

Meh, Indeed I can't reproduce issue on linux. I'm putting the file through valgrind but it's so sloooooow that I don't think it will be possible to find the issue easily.

Meh, Indeed I can't reproduce issue on linux. I'm putting the file through valgrind but it's so sloooooow that I don't think it will be possible to find the issue easily.
Member

nothing under windows

nothing under windows

Added subscriber: @mont29

Added subscriber: @mont29

Added subscriber: @ideasman42

Added subscriber: @ideasman42

Manged to redo the report, with address sanitizers thread checking, see: P228.

@Sergey, you worked most here before heres a proposed fix P229 ...

Posting here incase theres good reason to resolve some other way.


Updated: managed to find another race condition, needs further investigation.

Manged to redo the report, with address sanitizers thread checking, see: [P228](https://archive.blender.org/developer/P228.txt). @Sergey, you worked most here before heres a proposed fix [P229](https://archive.blender.org/developer/P229.txt) ... Posting here incase theres good reason to resolve some other way. ---- Updated: managed to find another race condition, needs further investigation.

Added subscriber: @Sergey

Added subscriber: @Sergey

@ideasman42, didn't see your comment before.. I've run into same report from hellgrind and your patch is correct. Please go ahead and commit it.

@sebastian_k, the assert failure you see is likely caused by the memory corruption. Did you manage to reproduce the hanging blender when running it from lldb? If so, having full threads backtrace will give some clues.

@ideasman42, didn't see your comment before.. I've run into same report from hellgrind and your patch is correct. Please go ahead and commit it. @sebastian_k, the assert failure you see is likely caused by the memory corruption. Did you manage to reproduce the hanging blender when running it from lldb? If so, having full threads backtrace will give some clues.

Checked this morning,

Found another race condition, 2 threads are using LOCK_DRAW_IMAGE at the same time (initImage and draw_image_main)

See stack trace: P230

note, when hanging there are 2 threads in BLI_lock_thread, one waiting on LOCK_VIEWER the other on LOCK_DRAW_IMAGE. however both threads lock LOCK_DRAW_IMAGE in their call-stack.

Checked this morning, Found another race condition, 2 threads are using `LOCK_DRAW_IMAGE` at the same time (`initImage` and `draw_image_main`) See stack trace: [P230](https://archive.blender.org/developer/P230.txt) note, when hanging there are 2 threads in `BLI_lock_thread`, one waiting on `LOCK_VIEWER` the other on `LOCK_DRAW_IMAGE`. however both threads lock `LOCK_DRAW_IMAGE` in their call-stack.
Author
Member

@Sergey I was able to reproduce with lldb, but that didn't seem to print anything. Are there any options or arguments I should run Blender with for threads backtrace?

@Sergey I was able to reproduce with lldb, but that didn't seem to print anything. Are there any options or arguments I should run Blender with for threads backtrace?

Added subscriber: @sebastian-4

Added subscriber: @sebastian-4

@sebastian-4, you need to type in lldb after the crash: thread backtrace all.

@sebastian-4, you need to type in lldb after the crash: `thread backtrace all`.
Member

@ sebastian: use "thread apply all bt"

Jens

@ sebastian: use "thread apply all bt" Jens
Author
Member

Here's a backtrace:
http://www.pasteall.org/58892

Here's a backtrace: http://www.pasteall.org/58892

Sounds quite similar to what helgrind reports about locking order. Will check tomorrow.

Sounds quite similar to what helgrind reports about locking order. Will check tomorrow.
Sergey Sharybin self-assigned this 2015-06-09 21:07:08 +02:00

This issue was referenced by bb5e46f105

This issue was referenced by bb5e46f10506f6fcfdf5777af3f0039bab49ed3c

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

This issue was referenced by 45fd68bc98

This issue was referenced by 45fd68bc98e0146c01dd075ebc15502c02033153
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
8 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#44871
No description provided.