GafferHQ / gaffer

Gaffer is a node-based application for lookdev, lighting and automation
http://www.gafferhq.org
BSD 3-Clause "New" or "Revised" License
945 stars 205 forks source link

Gaffer crashing with Cycle #5907

Open A6i8 opened 2 months ago

A6i8 commented 2 months ago

Version: Gaffer 1.4.6.0-linux-gcc9 Third-party tools: None Third-party modules: None

Linux version: 5.14.0-427.16.1.el9_4.x86_64 ldd (GNU libc) : 2.34

Description

Gaffer Crashing while using Cycle randomly e.g. (connecting node, while changing property )

Debug log

Click to Expand

``` 0 0x00007fff93a58b1a in ccl::subd_triangle_attribute_float2(ccl::KernelGlobalsCPU const*, ccl::ShaderData const*, ccl::AttributeDescriptor, ccl::float2*, ccl::float2*) [clone .isra.0] () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so #1 0x00007fff93aa9f82 in ccl::OSLRenderServices::get_attribute(ccl::ShaderData*, bool, OpenImageIO_v2_5::ustring, OpenImageIO_v2_5::TypeDesc, OpenImageIO_v2_5::ustring, void*) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so #2 0x00007fff93aac2e5 in ccl::OSLRenderServices::get_attribute(OSL_v1_12::ShaderGlobals*, bool, OpenImageIO_v2_5::ustring, OpenImageIO_v2_5::TypeDesc, OpenImageIO_v2_5::ustring, void*) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so #3 0x00007fffda41aa11 in OSL_v1_12::ShadingContext::osl_get_attribute(OSL_v1_12::ShaderGlobals*, void*, int, OpenImageIO_v2_5::ustring, OpenImageIO_v2_5::ustring, int, int, OpenImageIO_v2_5::TypeDesc, void*) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/liboslexec.so.1.12 #4 0x00007fffda3cd63b in osl_get_attribute () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/liboslexec.so.1.12 #5 0x00007fffc18dc04f in ?? () #6 0x000000000002030b in ?? () #7 0x00007fff5c034cdc in ?? () #8 0x00007fffc18dc000 in ?? () #9 0x00007ffe75a6a170 in ?? () #10 0x00007ffe52ff7470 in ?? () #11 0x00007fffc18da0b1 in ?? () #12 0x000000000002030b in ?? () #13 0x0000000000000000 in ?? () ```

johnhaddon commented 2 months ago

I suspect this is the same problem as https://github.com/GafferHQ/gaffer/issues/4913 - bugs with Cycles subdivision handling. Can you try using a MeshType node to force the type to Polygons and confirm if the crashes go away?

Note that Gaffer has a MeshTesselation node that can be used to apply subdivision manually before exporting to Cycles - it is both faster and more stable than Cycles' own code.

A6i8 commented 2 months ago

Even with MeshType : Polygons not working

Subdivision also disable

Debug log

#0  0x00007fff93991c7d in int ccl::integrate_surface<955u>(ccl::KernelGlobalsCPU const*, ccl::IntegratorStateCPU*, float*) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so
#1  0x00007fff93a2d29e in ccl::kernel_cpu_integrator_megakernel(ccl::KernelGlobalsCPU const*, ccl::IntegratorStateCPU*, float*) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so
#2  0x00007fff93ac229d in ccl::PathTraceWorkCPU::render_samples_full_pipeline(ccl::KernelGlobalsCPU*, ccl::KernelWorkTile const&, int) () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so
#3  0x00007fff93ac287f in tbb::interface9::internal::start_for<tbb::blocked_range<long>, tbb::internal::parallel_for_body<ccl::PathTraceWorkCPU::render_samples(ccl::PathTraceWork::RenderStatistics&, int, int, int)::{lambda()#1}::operator()() const::{lambda(long)#1}, long>, tbb::auto_partitioner const>::execute() () from /opt/gaffer-1.4.6.0-linux-gcc11/lib/libGafferCycles.so
#4  0x00007fffe95e6a55 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::process_bypass_loop (this=this@entry=0x7fffe5933e00, context_guard=..., t=0x7fffe5937240, isolation=isolation@entry=0) at ../../src/tbb/custom_scheduler.h:474
#5  0x00007fffe95e6d88 in tbb::internal::custom_scheduler<tbb::internal::IntelSchedulerTraits>::local_wait_for_all (this=0x7fffe5933e00, parent=..., child=<optimized out>) at ../../src/tbb/custom_scheduler.h:636
#6  0x00007fffe95e0867 in tbb::internal::arena::process (this=0x7fff991a8380, s=...) at ../../src/tbb/arena.cpp:196
#7  0x00007fffe95df070 in tbb::internal::market::process (this=0x7fffe59cf580, j=...) at ../../src/tbb/market.cpp:667
#8  0x00007fffe95db7bc in tbb::internal::rml::private_worker::run (this=0x7fffc296db00) at ../../src/tbb/private_server.cpp:266
#9  0x00007fffe95db9f9 in tbb::internal::rml::private_worker::thread_routine (arg=<optimized out>) at ../../src/tbb/private_server.cpp:219
#10 0x00007ffff7889c02 in start_thread (arg=<optimized out>) at pthread_create.c:443
#11 0x00007ffff790ec40 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
johnhaddon commented 2 months ago

Can you provide a minimal .gfr file that shows the problem, along with a description of how to reproduce it please? The stack trace shows a crash in Cycles itself, so doesn't give us much to go on.

A6i8 commented 2 months ago

Please find the attached zip file.

Mostly crashing within 2-5min with IPR going on.

Attachment: https://we.tl/t-6U05UT2YnR