Ctest: Crash in cycles_image_colorspace_cpu #85087

Open
opened 2021-01-26 20:27:18 +01:00 by Ray molenkamp · 13 comments
Member

System Information
Operating system: Windows
Graphics card: Irrelevant

Broken: current master (c32c6a5f85)
Worked: Unknown

Short description of error

During testing of D10212: Cmake/deps: Update OSL to 1.11.10.0 I noticed a single test failing... once... by repeating the test over and over I got it to misbehave once every 5-45 minutes , so... that's not gonna be super fun to track down.

I attached 3 stack traces which all point to the same location, a null check there just mask the issue, personally I'd take a crash over a random bad frame being output.

Exact steps for others to reproduce the error

ctest -C Release -VV -R cycles_image_colorspace_cpu --repeat-until-fail 9999 -O Fail.log

image_non_color.crash.txt

image_log_osl.crash.txt

image_alpha_blend.crash.txt

I mentioned this on chat earlier today, but tracking ticket is probably nicer cc: @brecht

**System Information** Operating system: Windows Graphics card: Irrelevant Broken: current master (c32c6a5f85) Worked: Unknown **Short description of error** During testing of [D10212: Cmake/deps: Update OSL to 1.11.10.0](https://archive.blender.org/developer/D10212) I noticed a single test failing... once... by repeating the test over and over I got it to misbehave once every 5-45 minutes , so... that's not gonna be super fun to track down. I attached 3 stack traces which all point to the same location, a null check there just mask the issue, personally I'd take a crash over a random bad frame being output. **Exact steps for others to reproduce the error** `ctest -C Release -VV -R cycles_image_colorspace_cpu --repeat-until-fail 9999 -O Fail.log` [image_non_color.crash.txt](https://archive.blender.org/developer/F9599092/image_non_color.crash.txt) [image_log_osl.crash.txt](https://archive.blender.org/developer/F9599093/image_log_osl.crash.txt) [image_alpha_blend.crash.txt](https://archive.blender.org/developer/F9599094/image_alpha_blend.crash.txt) I mentioned this on chat earlier today, but tracking ticket is probably nicer cc: @brecht
Author
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Author
Member

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

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

Added subscriber: @brecht

Added subscriber: @brecht

Thanks!

Thanks!
Member

Added subscriber: @leesonw

Added subscriber: @leesonw
Member

I ran the tests with the address sanitizer on and it crashes so I can confirm there is a memory stomping bug here. I am working on getting a call stack so as to determine the source of the error.

I ran the tests with the address sanitizer on and it crashes so I can confirm there is a memory stomping bug here. I am working on getting a call stack so as to determine the source of the error.
Author
Member

Your first task and they are making you look at a bug that triggers once every 45 mins or so? that's just.... mean.....

Your first task and they are making you look at a bug that triggers once every 45 mins or so? that's just.... mean.....
Member

Believe it or not I picked it myself :-) what was I thinking :-/. I wanted a bug that did not require a GPU to start and that was the only one I could find. It's hasn't been to hard to reproduce though as it seems to occur every time the test is run it only does bad things every 45 mins or so (who know what else it is corrupting). It seems there are some corrupt vtables that are causing weird things to happen. Now I am just hunting down the source to find out what is damaging the vtables and this appears to have something todo with OSL.

Believe it or not I picked it myself :-) what was I thinking :-/. I wanted a bug that did not require a GPU to start and that was the only one I could find. It's hasn't been to hard to reproduce though as it seems to occur every time the test is run it only does bad things every 45 mins or so (who know what else it is corrupting). It seems there are some corrupt vtables that are causing weird things to happen. Now I am just hunting down the source to find out what is damaging the vtables and this appears to have something todo with OSL.

Since you mention vtables, this might have something to do with RTTI, see RTTI_DISABLE_FLAGS. OSL and LLVM are compiled without RTTI, while Blender is compiled with. Trying to get those things to link together may not be valid.

I don't know off the top of my head what the best way is to confirm if that is indeed the case, or how best to solve it if confirmed.

Since you mention vtables, this might have something to do with RTTI, see `RTTI_DISABLE_FLAGS`. OSL and LLVM are compiled without RTTI, while Blender is compiled with. Trying to get those things to link together may not be valid. I don't know off the top of my head what the best way is to confirm if that is indeed the case, or how best to solve it if confirmed.
Member

The funny thing is that is does not happen will all OSL configs but maybe only some use RTTI :-) Thanks for the info that might help.

The funny thing is that is does not happen will all OSL configs but maybe only some use RTTI :-) Thanks for the info that might help.
Author
Member

any tips to get that quickly reproducible case? I build with asan on windows, that sadly saw no issues but it only has asan, lacks many of the other sanitizers available on linux

any tips to get that quickly reproducible case? I build with asan on windows, that sadly saw no issues but it only has asan, lacks many of the other sanitizers available on linux
Member

I not sure what you can do, basically I just switched on ASAN and it detects it on the

 image_alpha_blend_osl.blend

file. However, this morning I was running without the GUI and then the issues disappear totally. I have noticed that it also disappears with the

image_log_osl.blend

file but all other osl files cause it. So I was looking into see what was the difference but I am not sure that's what it is. It seems how the memory is oragnised seems to push various parts into the bad memory write. I am going to try to put a break on write once I figure out what is getting stomped in the vtable and hopefully that'll catch it :-/

I not sure what you can do, basically I just switched on ASAN and it detects it on the ``` image_alpha_blend_osl.blend ``` file. However, this morning I was running without the GUI and then the issues disappear totally. I have noticed that it also disappears with the ``` image_log_osl.blend ``` file but all other osl files cause it. So I was looking into see what was the difference but I am not sure that's what it is. It seems how the memory is oragnised seems to push various parts into the bad memory write. I am going to try to put a break on write once I figure out what is getting stomped in the vtable and hopefully that'll catch it :-/
Contributor

Added subscriber: @Raimund58

Added subscriber: @Raimund58
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
4 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#85087
No description provided.