CUDA Illegal address when rendering with F12 #108315

Closed
opened 2023-05-26 15:05:01 +02:00 by William Leeson · 0 comments
Member

System Information
Operating system: Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.36 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 530.41.03

Blender Version
Broken: version: 4.0.0 Alpha, branch: upstream_main, commit date: 2023-05-25 07:59, hash: f669f6cd8c1d
Worked: (newest version of Blender that worked as expected)

Short description of error
Crash when rendering with F12.

Exact steps for others to reproduce the error
To catch the error you'll need a debug build otherwise it just appears to render ok:

  1. Load in the test scene shadow_link_mesh.blend.
  2. Set the samples to 256.
  3. Set the resolution to 1024x1024 at 100%.
  4. Hit F12 to render.
  5. On the second iteration the app reports a CUDA error.
E0526 14:59:43.912490 77038 device_impl.cpp:74] Error destroying resource event. (CUDA error string: an illegal memory access was encountered, CUDA error code: 700)
Error: Illegal address in CUDA queue copy_from_device (integrator_init_from_bake integrator_shade_surface integrator_sorted_paths_array)Illegal address in CUDA queue copy_from_device (integrator_shade_dedicated_light integrator_queued_paths_array)

I have a call stack for this using the following command line

/usr/local/cuda-12.1/bin/compute-sanitizer --tool memcheck ../build_linux_debug/bin/blender

========= Invalid __global__ read of size 4 bytes
	 =========     at 0xbd0 in /home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/geom/motion_triangle_shader.h:34:motion_triangle_shader_setup(const KernelGlobalsGPU *, ShaderData *, float3, float3, float, int, int, bool)
	 =========     by thread (186,0,0) in block (470,0,0)
	 =========     Address 0x7f604d4335fc is out of bounds
	 =========     and is 4 bytes before the nearest allocation at 0x7f604d433600 of size 127,880 bytes
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/geom/shader_data.h:97:shader_setup_from_ray(const KernelGlobalsGPUx *, ShaderData *, const Ray *, const Intersection *) [0x5670]
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_surface.h:34:integrate_surface_shader_setup [0x4af0]
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:132:shadow_linking_shade_surface_emission(const KernelGlobalsGPU *, int, Ray &, Intersection &, ShaderData *, float *, float3 &, float &, int &) [0x4b00]
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:196:shadow_linking_shade(const KernelGlobalsGPU *, int, float *) [0x4870]
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:259:integrator_shade_dedicated_light(const KernelGlobalsGPU *, int, float *) [0x5a0]
	 =========     Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/device/gpu/kernel.h:363:kernel_gpu_integrator_shade_dedicated_light [0x500]
	 =========     Saved host backtrace up to driver entry point at kernel launch time
	 =========     Host Frame: [0x30b442]
	 =========                in /lib64/libcuda.so.1
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/device/cuda/queue.cpp:111:ccl::CUDADeviceQueue::enqueue(ccl::DeviceKernel, int, ccl::DeviceKernelArguments const&) [0x3f081eb]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/device/optix/queue.cpp:52:ccl::OptiXDeviceQueue::enqueue(ccl::DeviceKernel, int, ccl::DeviceKernelArguments const&) [0x3f30ff4]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:532:ccl::PathTraceWorkGPU::enqueue_path_iteration(ccl::DeviceKernel, int) [0x58e8214]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:459:ccl::PathTraceWorkGPU::enqueue_path_iteration() [0x58e7e83]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:345:ccl::PathTraceWorkGPU::render_samples_impl(ccl::PathTraceWork::RenderStatistics&, int, int, int) [0x58e7971]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work.cpp:116:ccl::PathTraceWork::render_samples(ccl::PathTraceWork::RenderStatistics&, int, int, int) [0x58d84b4]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace.cpp:439:ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}::operator()(int) const [0x58c02d6]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/parallel_for.h:176:tbb::internal::parallel_for_body<ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}, int>::operator()(tbb::blocked_range<int> const&) const [0x58cdb87]
	 =========                in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender
	 =========     Host Frame:/home/william/Source/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/parallel_for.h:116:tbb::interface9::internal::start_for<tbb::blocked_range<int>, tbb::internal::parallel_for_body<ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}, int>, tbb::auto_partitioner const>::run_body(tbb::blocked_range<int>&) [0x58cce59]
**System Information** Operating system: Linux-6.2.15-200.fc37.x86_64-x86_64-with-glibc2.36 64 Bits, X11 UI Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 530.41.03 **Blender Version** Broken: version: 4.0.0 Alpha, branch: upstream_main, commit date: 2023-05-25 07:59, hash: `f669f6cd8c1d` Worked: (newest version of Blender that worked as expected) **Short description of error** Crash when rendering with F12. **Exact steps for others to reproduce the error** To catch the error you'll need a debug build otherwise it just appears to render ok: 1. Load in the test scene `shadow_link_mesh.blend`. 2. Set the samples to 256. 3. Set the resolution to 1024x1024 at 100%. 4. Hit F12 to render. 5. On the second iteration the app reports a CUDA error. ``` E0526 14:59:43.912490 77038 device_impl.cpp:74] Error destroying resource event. (CUDA error string: an illegal memory access was encountered, CUDA error code: 700) Error: Illegal address in CUDA queue copy_from_device (integrator_init_from_bake integrator_shade_surface integrator_sorted_paths_array)Illegal address in CUDA queue copy_from_device (integrator_shade_dedicated_light integrator_queued_paths_array) I have a call stack for this using the following command line /usr/local/cuda-12.1/bin/compute-sanitizer --tool memcheck ../build_linux_debug/bin/blender ========= Invalid __global__ read of size 4 bytes ========= at 0xbd0 in /home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/geom/motion_triangle_shader.h:34:motion_triangle_shader_setup(const KernelGlobalsGPU *, ShaderData *, float3, float3, float, int, int, bool) ========= by thread (186,0,0) in block (470,0,0) ========= Address 0x7f604d4335fc is out of bounds ========= and is 4 bytes before the nearest allocation at 0x7f604d433600 of size 127,880 bytes ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/geom/shader_data.h:97:shader_setup_from_ray(const KernelGlobalsGPUx *, ShaderData *, const Ray *, const Intersection *) [0x5670] ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_surface.h:34:integrate_surface_shader_setup [0x4af0] ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:132:shadow_linking_shade_surface_emission(const KernelGlobalsGPU *, int, Ray &, Intersection &, ShaderData *, float *, float3 &, float &, int &) [0x4b00] ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:196:shadow_linking_shade(const KernelGlobalsGPU *, int, float *) [0x4870] ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/integrator/shade_dedicated_light.h:259:integrator_shade_dedicated_light(const KernelGlobalsGPU *, int, float *) [0x5a0] ========= Device Frame:/home/william/Source/blender-git/build_linux_debug/bin/4.0/scripts/addons/cycles/source/kernel/device/gpu/kernel.h:363:kernel_gpu_integrator_shade_dedicated_light [0x500] ========= Saved host backtrace up to driver entry point at kernel launch time ========= Host Frame: [0x30b442] ========= in /lib64/libcuda.so.1 ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/device/cuda/queue.cpp:111:ccl::CUDADeviceQueue::enqueue(ccl::DeviceKernel, int, ccl::DeviceKernelArguments const&) [0x3f081eb] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/device/optix/queue.cpp:52:ccl::OptiXDeviceQueue::enqueue(ccl::DeviceKernel, int, ccl::DeviceKernelArguments const&) [0x3f30ff4] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:532:ccl::PathTraceWorkGPU::enqueue_path_iteration(ccl::DeviceKernel, int) [0x58e8214] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:459:ccl::PathTraceWorkGPU::enqueue_path_iteration() [0x58e7e83] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work_gpu.cpp:345:ccl::PathTraceWorkGPU::render_samples_impl(ccl::PathTraceWork::RenderStatistics&, int, int, int) [0x58e7971] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace_work.cpp:116:ccl::PathTraceWork::render_samples(ccl::PathTraceWork::RenderStatistics&, int, int, int) [0x58d84b4] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/blender/intern/cycles/integrator/path_trace.cpp:439:ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}::operator()(int) const [0x58c02d6] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/parallel_for.h:176:tbb::internal::parallel_for_body<ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}, int>::operator()(tbb::blocked_range<int> const&) const [0x58cdb87] ========= in /home/william/Source/blender-git/blender/../build_linux_debug/bin/blender ========= Host Frame:/home/william/Source/blender-git/lib/linux_x86_64_glibc_228/tbb/include/tbb/parallel_for.h:116:tbb::interface9::internal::start_for<tbb::blocked_range<int>, tbb::internal::parallel_for_body<ccl::PathTrace::path_trace(ccl::RenderWork&)::{lambda(int)#1}, int>, tbb::auto_partitioner const>::run_body(tbb::blocked_range<int>&) [0x58cce59] ```
William Leeson added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-05-26 15:05:02 +02:00
Brecht Van Lommel was assigned by William Leeson 2023-05-26 15:07:15 +02:00
Sergey Sharybin was assigned by William Leeson 2023-05-26 15:07:30 +02:00
Iliya Katushenock added the
Interest
Render & Cycles
label 2023-05-26 17:02:43 +02:00
Blender Bot added
Status
Resolved
and removed
Status
Needs Triage
labels 2023-05-26 17:36:34 +02:00
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
1 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#108315
No description provided.