Page 1 of 1

Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Fri Nov 20, 2020 7:23 pm
by cleaver
Hi team!

I'm new to this forum but I've been using LuxCore (and Luxrender before that for a long time).

I'm running Ubuntu 20.04 with Nvidia GeForce GTX 1660 and the proprietary nvidia driver version 450.80.02.

I recently noticed that my Blender 2.83.8 crashes with Segmentation fault when cancelling a render of any scene with BlendLuxCore 2.3 but only when INTEL_OIDN denoiser is enabled.

The Segmentation fault occurs when cancelling a running render (by pressing the Esc key) from within Blender.

Here's a code snippet with the log that Blender produces when it crashes:

Code: Select all

[LuxCore][453.983] [PathOCLBaseRenderThread::0] Defined symbols:  -D LUXRAYS_OPENCL_KERNEL -D SLG_OPENCL_KERNEL -D RENDER_ENGINE_PATHOCL -D PARAM_RAY_EPSILON_MIN=1.000000e-05f -D PARAM_RAY_EPSILON_MAX=1.000000e-01f -D PARAM_ENABLE_TEX_CONST_FLOAT -D PARAM_ENABLE_TEX_CONST_FLOAT3 -D PARAM_ENABLE_TEX_IMAGEMAP -D PARAM_ENABLE_TEX_SCALE -D PARAM_ENABLE_TEX_MIX -D PARAM_ENABLE_TEX_BAND -D PARAM_ENABLE_TEX_HITPOINTALPHA -D PARAM_ENABLE_TEX_NORMALMAP -D PARAM_ENABLE_TEX_FRESNELCOLOR -D PARAM_ENABLE_TEX_FRESNELCONST -D PARAM_ENABLE_TEX_CLAMP -D PARAM_ENABLE_TEX_HSV -D PARAM_ENABLE_MAT_MATTE -D PARAM_ENABLE_MAT_GLASS -D PARAM_ENABLE_MAT_MIX -D PARAM_ENABLE_MAT_MATTETRANSLUCENT -D PARAM_ENABLE_MAT_GLOSSY2 -D PARAM_ENABLE_MAT_GLOSSY2_INDEX -D PARAM_ENABLE_MAT_METAL2 -D PARAM_ENABLE_MAT_METAL2_ANISOTROPIC -D PARAM_ENABLE_MAT_ROUGHGLASS -D PARAM_ENABLE_MAT_CLEAR_VOL -D PARAM_ENABLE_MAT_HOMOGENEOUS_VOL -D PARAM_ENABLE_MAT_GLOSSYTRANSLUCENT -D PARAM_ENABLE_MAT_GLOSSYTRANSLUCENT_INDEX -D LUXCORE_NVIDIA_OPENCL
[LuxCore][453.983] [PathOCLBaseRenderThread::0] Compiling kernels 
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Kernels cached
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling Film_Clear Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling InitSeed Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling Init Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_RT_NEXT_VERTEX Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_HIT_NOTHING Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_HIT_OBJECT Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_RT_DL Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_DL_ILLUMINATE Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_DL_SAMPLE_BSDF Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_GENERATE_NEXT_VERTEX_RAY Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_SPLAT_SAMPLE Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_NEXT_SAMPLE Kernel
[LuxCore][454.001] [PathOCLBaseRenderThread::0] Compiling AdvancePaths_MK_GENERATE_CAMERA_RAY Kernel
[LuxCore][454.002] [PathOCLBaseRenderThread::0] Kernels compilation time: 21ms
[LuxCore][454.004] Starting 3 native render threads
Session started in 4.2 s
[LuxCore][454.176] Film OpenCL image pipeline
[LuxCore][454.177] Film OpenCL Device used: GeForce GTX 1660 Intersect
[LuxCore][454.177]   Device OpenCL version: OpenCL 1.2 CUDA
[LuxRays][454.347] [Device GeForce GTX 1660 Intersect] IMAGEPIPELINE buffer size: 8748Kbytes
[LuxRays][454.349] [Device GeForce GTX 1660 Intersect] Merge buffer size: 11664Kbytes
[LuxCore][454.349] [MergeSampleBuffersOCL] Defined symbols: -D LUXRAYS_OPENCL_KERNEL -D SLG_OPENCL_KERNEL
[LuxCore][454.349] [MergeSampleBuffersOCL] Compiling kernels 
[LuxCore][454.351] [MergeSampleBuffersOCL] Kernels cached
[LuxCore][454.352] [MergeSampleBuffersOCL] Compiling Film_MergeBufferInitialize Kernel
[LuxCore][454.352] [MergeSampleBuffersOCL] Compiling Film_MergeRADIANCE_PER_PIXEL_NORMALIZED Kernel
[LuxCore][454.352] [MergeSampleBuffersOCL] Compiling Film_MergeRADIANCE_PER_SCREEN_NORMALIZED Kernel
[LuxCore][454.352] [MergeSampleBuffersOCL] Compiling Film_MergeBufferFinalize Kernel
[LuxCore][454.352] [MergeSampleBuffersOCL] Kernels compilation time: 2ms
[LuxCore][454.365] [LinearToneMap] Defined symbols: 
[LuxCore][454.365] [LinearToneMap] Compiling kernels 
[LuxCore][454.367] [LinearToneMap] Kernels cached
[LuxCore][454.367] [LinearToneMap] Compiling LinearToneMap_Apply Kernel
[LuxCore][454.367] [LinearToneMap] Kernels compilation time: 2ms
Refreshing DENOISED
[SDL][460.275] Image pipeline: film.imagepipelines.1
[SDL][460.275] Image pipeline step 0: INTEL_OIDN
[SDL][460.275] Image pipeline step 1: NOP
[SDL][460.275] Image pipeline step 2: TONEMAP_LINEAR
Writing: /tmp/CannelleEtFromage.crash.txt
Segmentation fault

Here's the crash backtrace:

Code: Select all

cat /tmp/CannelleEtFromage.crash.txt
# Blender 2.83.8, Commit date: 2020-10-21 08:12, Hash 5949b796f002
bpy.context.space_data.context = 'RENDER'  # Property
bpy.context.scene.luxcore.denoiser.type = 'BCD'  # Property
bpy.context.scene.luxcore.denoiser.type = 'OIDN'  # Property

# backtrace
/opt/blender/blender(BLI_system_backtrace+0x1d) [0x6989e5d]
/opt/blender/blender() [0xc15ae2]
/lib/x86_64-linux-gnu/libc.so.6(+0x46210) [0x7f3a170bd210]
/opt/blender/blender(free+0x2da) [0xef7fca]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x13acec) [0x7f39e12c0cec]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x13a92d) [0x7f39e12c092d]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x1386c7) [0x7f39e12be6c7]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x397f29) [0x7f39e151df29]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(_ZN6mkldnn4impl3cpu2tr8kernel_t6createERKNS3_6desc_tE+0x27) [0x7f39e1519217]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x397e3c) [0x7f39e151de3c]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0xe035c) [0x7f39e126635c]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(_ZN4oidn7NetworkILi8EE7addConvERKSsRKSt10shared_ptrIN6mkldnn6memoryEES9_b+0x9f1) [0x7f39e1262591]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(_ZN4oidn17AutoencoderFilter8buildNetILi8EEESt10shared_ptrINS_10ExecutableEEv+0x1259) [0x7f39e12839b9]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(+0x109c74) [0x7f39e128fc74]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libtbb.so.2(_ZNK3tbb10interface78internal15task_arena_base16internal_executeERNS1_13delegate_baseE+0x59a) [0x7f39e0f4f04a]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(_ZN4oidn17AutoencoderFilter6commitEv+0x54) [0x7f39e1277cf4]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/libOpenImageDenoise.so.0(oidnCommitFilter+0x42) [0x7f39e1250d72]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN3slg9IntelOIDN5ApplyERNS_4FilmEj+0x30f) [0x7f39e6a817ef]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN3slg13ImagePipeline5ApplyERNS_4FilmEj+0x163) [0x7f39e69f6813]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(_ZN3slg4Film30ExecuteImagePipelineThreadImplEj+0x2e) [0x7f39e696be8e]
/home/cleaver/.config/blender/2.83/scripts/addons/BlendLuxCore/bin/pyluxcore.so(+0x180edcd) [0x7f39e7826dcd]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x9609) [0x7f3a177b9609]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x43) [0x7f3a17199293]
I'd greatly appreciate it guys if you could help me troubleshoot this. I wonder if it's a bug or if there's a problem with my system.

I am able to reproduce the crash every time with different scenes (e.g. the example Cannelle & Fromage scene, but not only) with OIDN enabled.

Thanks for your support!

Github issue submitted as well.

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Fri Nov 20, 2020 8:21 pm
by Dade
Any particular reason to still use v2.3 ? It is quite old. Can you try with v2.5beta1 (viewtopic.php?f=9&t=2805) ?

What CPU are you also using ? Intel ODIN runs on the CPU , not the GPU.

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Sat Nov 21, 2020 9:54 am
by cleaver
I'm using an Ivy Bridge Intel i7-3770 CPU.

I tried switching to Lux 2.4 previously when it came out (because of the Cuda goodness, etc.), but I found out it produced around 15% less Samples/Sec on my system as compared to 2.3, everything else (scene, settings, etc.) being exactly the same so I went back to 2.3.

I'll definitely try 2.5 beta. Is there any particular reason why 2.4 would measure less Samples/Sec than 2.3 with my hardware?

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Sat Nov 21, 2020 10:18 am
by Dade
cleaver wrote: Sat Nov 21, 2020 9:54 am I'll definitely try 2.5 beta. Is there any particular reason why 2.4 would measure less Samples/Sec than 2.3 with my hardware?
Yes, v2.4 has a single GPU kernel that is compiled only once while v2.3 requires a kernel compilation nearly for each rendering.

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Sat Nov 21, 2020 11:00 am
by B.Y.O.B.
cleaver wrote: Sat Nov 21, 2020 9:54 am Is there any particular reason why 2.4 would measure less Samples/Sec than 2.3 with my hardware?
See https://wiki.luxcorerender.org/LuxCoreR ... ce_on_GPUs

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Sat Nov 21, 2020 12:20 pm
by cleaver
Thank you both for pointing this out to me guys! I'll definitely try the OIDN with 2.4 and 2.5 and will report if I'm able to reproduce the crash.

Re: Luxcore 2.3 crashes Blender 2.83.8 with IODN enabled

Posted: Sat Nov 21, 2020 12:58 pm
by cleaver
Guys, I confirm I don't have the OIDN crash issue described above with Lux 2.4 - it works as expected, I won't be using version 2.3 anymore.
Thanks a lot for your time and happy coding. :)