CPU OSL Cycles crashes blender in latest GIT (353d023) with barcelona scene. #47120

Closed
opened 2016-01-04 22:06:58 +01:00 by mathieu menuet · 19 comments

System Information
W7 x64

Blender Version
Broken: Latest GIT (04 01 2016), build with Cmake. Build from 30.12.2015 late in night also crashes (own modifs, so no usefull hash to provide)
Worked: build from 29 December (made with scons)

Short description of error
OSL rendering with packed images makes cycles crash after sometime. First an error message appears crash.PNG, but render continues, then Blender crashes completely.

Exact steps for others to reproduce the error
Open attached file, hit F12 bug osl.blend

**System Information** W7 x64 **Blender Version** Broken: Latest GIT (04 01 2016), build with Cmake. Build from 30.12.2015 late in night also crashes (own modifs, so no usefull hash to provide) Worked: build from 29 December (made with scons) **Short description of error** OSL rendering with packed images makes cycles crash after sometime. First an error message appears ![crash.PNG](https://archive.blender.org/developer/F271554/crash.PNG), but render continues, then Blender crashes completely. **Exact steps for others to reproduce the error** Open attached file, hit F12 [bug osl.blend](https://archive.blender.org/developer/F271558/bug_osl.blend)
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @bliblubli

Added subscriber: @bliblubli

Added subscriber: @Sergey

Added subscriber: @Sergey
Sergey Sharybin self-assigned this 2016-01-05 09:12:01 +01:00

Will have a look today.

Will have a look today.

I can not reproduce the issue on neither Windows nor on Linux using debug builds (on Linux address sanitizer is active). Hence several questions:

  • Does this happen on background mode?
  • Does this happen when rendering with Fullscreen output?
  • Does this happen with locked interface option enabled?
  • Does this happen with builds from buidler.blender.org (fresh build will be ready there soon)
I can not reproduce the issue on neither Windows nor on Linux using debug builds (on Linux address sanitizer is active). Hence several questions: - Does this happen on background mode? - Does this happen when rendering with Fullscreen output? - Does this happen with locked interface option enabled? - Does this happen with builds from buidler.blender.org (fresh build will be ready there soon)
Author

Yes it happens with the latest buildbot from today 05012016. By reopening the file, I noticed that it switch automatically to GPU rendering if availaible. So you may have tested with GPU and thus without OSL. I don't know why it does so, because I save with CPU rendering on factory settings, so it can't be due to an addon.

Yes it happens with the latest buildbot from today 05012016. By reopening the file, I noticed that it switch automatically to GPU rendering if availaible. So you may have tested with GPU and thus without OSL. I don't know why it does so, because I save with CPU rendering on factory settings, so it can't be due to an addon.

What about reaimining questions?

What about reaimining questions?
Author

Sorry, yes it happens with fullscreen and locked interface. When I had both, it crashed instantly the first time, but when doing it again, it took more time. The moment where it happen seems to be somehow random...
By the way, I tried to simplify the case without success. Simple files don't crash, at least, i couldn't get them to crash. But other production files I can't share do (now that we use OSL with packed images :D)
For the background mode, it didn't crash, but it also rendered faster, so I should try more to see if it was just luck.

Sorry, yes it happens with fullscreen and locked interface. When I had both, it crashed instantly the first time, but when doing it again, it took more time. The moment where it happen seems to be somehow random... By the way, I tried to simplify the case without success. Simple files don't crash, at least, i couldn't get them to crash. But other production files I can't share do (now that we use OSL with packed images :D) For the background mode, it didn't crash, but it also rendered faster, so I should try more to see if it was just luck.
Author

yipi, succeed in background mode :) :

..\..\..\..\src\libtexture\texturesys.cpp:491: failed assertion 'errptr->size() < 1024*1024*16 && "Accumulated error messages > 16MB. Try checking return codes!"'
Fra:1 Mem:147.55M (0.00M, Peak 216.52M) | Time:01:11.70 | Remaining:10:17.19 | Mem:110.26M, Peak:110.26M | GPU Benchmark, RenderLayer | Path Tracing Tile 375/3600
Fra:1 Mem:147.55M (0.00M, Peak 216.52M) | Time:01:11.73 | Remaining:10:17.25 | Mem:110.26M, Peak:110.26M | GPU Benchmark, RenderLayer | Path Tracing Tile 376/3600
..\..\..\..\src\libtexture\texturesys.cpp:491: failed assertion 'errptr->size() < 1024*1024*16 && "Accumulated error messages > 16MB. Try checking return codes!"'
AL lib: (EE) alc_cleanup: 1 device not closed
yipi, succeed in background mode :) : ``` ..\..\..\..\src\libtexture\texturesys.cpp:491: failed assertion 'errptr->size() < 1024*1024*16 && "Accumulated error messages > 16MB. Try checking return codes!"' Fra:1 Mem:147.55M (0.00M, Peak 216.52M) | Time:01:11.70 | Remaining:10:17.19 | Mem:110.26M, Peak:110.26M | GPU Benchmark, RenderLayer | Path Tracing Tile 375/3600 Fra:1 Mem:147.55M (0.00M, Peak 216.52M) | Time:01:11.73 | Remaining:10:17.25 | Mem:110.26M, Peak:110.26M | GPU Benchmark, RenderLayer | Path Tracing Tile 376/3600 ..\..\..\..\src\libtexture\texturesys.cpp:491: failed assertion 'errptr->size() < 1024*1024*16 && "Accumulated error messages > 16MB. Try checking return codes!"' AL lib: (EE) alc_cleanup: 1 device not closed ```

Still can not reproduce locally on neither the systems here..

Can you test this patch:

P310: Snippet for #47120

diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp
index 9ac8a3e..f5527cf 100644
--- a/intern/cycles/kernel/osl/osl_services.cpp
+++ b/intern/cycles/kernel/osl/osl_services.cpp
@@ -1020,6 +1020,9 @@ bool OSLRenderServices::texture(ustring filename,
 			if(nchannels == 4)
 				result- [x] = 1.0f;
 		}
+
+		string err = ts->geterror();
+		(void)err;
 	}
 
 	return status;
@@ -1107,6 +1110,8 @@ bool OSLRenderServices::texture3d(ustring filename,
 				result- [x] = 1.0f;
 		}
 
+		string err = ts->geterror();
+		(void)err;
 	}
 
 	return status;

Still can not reproduce locally on neither the systems here.. Can you test this patch: [P310: Snippet for #47120](https://archive.blender.org/developer/P310.txt) ``` diff --git a/intern/cycles/kernel/osl/osl_services.cpp b/intern/cycles/kernel/osl/osl_services.cpp index 9ac8a3e..f5527cf 100644 --- a/intern/cycles/kernel/osl/osl_services.cpp +++ b/intern/cycles/kernel/osl/osl_services.cpp @@ -1020,6 +1020,9 @@ bool OSLRenderServices::texture(ustring filename, if(nchannels == 4) result- [x] = 1.0f; } + + string err = ts->geterror(); + (void)err; } return status; @@ -1107,6 +1110,8 @@ bool OSLRenderServices::texture3d(ustring filename, result- [x] = 1.0f; } + string err = ts->geterror(); + (void)err; } return status; ```
Author

There is no link to your patch as far as I can see. Did you set it to CPU rendering on your computer before starting the rendering? I don't know why, but it set it to GPU automatically and I can't change this behavior.

There is no link to your patch as far as I can see. Did you set it to CPU rendering on your computer before starting the rendering? I don't know why, but it set it to GPU automatically and I can't change this behavior.

Patch is inlined to the comment.

Ofcourse i switched to CPU, But finally i managed to rdo the issue with the build from bildbot. Annoyingly, it requires to wait for quite some time before the issue is visible. Will try to nail something down.

Patch is inlined to the comment. Ofcourse i switched to CPU, But finally i managed to rdo the issue with the build from bildbot. Annoyingly, it requires to wait for quite some time before the issue is visible. Will try to nail something down.

This issue was referenced by 03302fd5ed

This issue was referenced by 03302fd5edb154623f073e15a46e24f94445a3f4

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

The issue should now be fixed. Let me know if it's still fails for you in sme way.

The issue should now be fixed. Let me know if it's still fails for you in sme way.
Author

Just tested it many times. Crash still happened once. This time instantly in the UI before the first tile was rendered. But after that, background rendering worked successfully 3 times and UI render also... So it looks like it's solved but I'm not 100% sure. anyway it's better :)

Just tested it many times. Crash still happened once. This time instantly in the UI before the first tile was rendered. But after that, background rendering worked successfully 3 times and UI render also... So it looks like it's solved but I'm not 100% sure. anyway it's better :)

This is likely to be caused by threading conflict in particles between viewport and render thread. Rendering in full screen mode or with locked interface solves those crashes.

This is likely to be caused by threading conflict in particles between viewport and render thread. Rendering in full screen mode or with locked interface solves those crashes.
Author

Yep, after 2 days of rendering in Fullscreenmode, the problem didn't show up anymore. Never had this particle problem before but it works now, so I'm happy :)

Yep, after 2 days of rendering in Fullscreenmode, the problem didn't show up anymore. Never had this particle problem before but it works now, so I'm happy :)

This issue was referenced by blender/cycles@81b7701941

This issue was referenced by blender/cycles@81b7701941af3745b29c581148ba8d0428fd0b4b
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#47120
No description provided.