prman-pixar / RenderManForBlender

RenderMan for Blender render addon
MIT License
804 stars 134 forks source link

Crashing in Rocky 9 #706

Closed flipphillips closed 3 days ago

flipphillips commented 4 months ago

description

Rendering crashes blender in Rocky 9 hard w/ core dump

to replicate

1, Launch blender 4.1

  1. Enable RenderMan plugin
  2. Context menu "Use RenderMan"
  3. Attempt to IPR to anything

expected

Render!

actual

❯ blender
Read prefs: "/home/flip/.config/blender/4.1/config/userpref.blend"
***  abort: due to uncaught exception  ***
zsh: IOT instruction (core dumped)  blender

regression

setup

❯ uname -a
Linux mss-fxpppr-dell 5.14.0-362.24.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Apr 4 22:31:43 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

❯ cat /etc/*-release

NAME="Rocky Linux"
VERSION="9.3 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.3"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.3 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.3"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.3"
Rocky Linux release 9.3 (Blue Onyx)
Rocky Linux release 9.3 (Blue Onyx)
Rocky Linux release 9.3 (Blue Onyx)

❯ prman --version
Pixar PhotoRealistic RenderMan 26.0
  linked Thu Apr 04 20:10:37 2024 PDT @2323226
  build linuxRHEL7_x86-64_gcc93icx232_external_release
  copyright (c) 1988-2024 Pixar.

❯ blender --version
Blender 4.1.0
    build date: 2024-03-26
    build time: 00:31:19
    build commit date: 2024-03-25
    build commit time: 20:42
    build hash: 40a5e739e270
    build platform: Linux
    build type: Release
    build c flags:  -Wall -Werror=implicit-function-declaration -Wstrict-prototypes -Werror=return-type -Werror=vla -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wrestrict -Wno-stringop-overread -Wno-stringop-overflow -Wnonnull -Wabsolute-value -Wuninitialized -Wredundant-decls -Wshadow -Wimplicit-fallthrough=5 -Wno-error=unused-but-set-variable  -std=gnu11 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2  
    build c++ flags:  -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wcomma-subscript -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wimplicit-fallthrough=5 -Wundef -Wmissing-declarations  -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2  
    build link flags:  -Wl,--version-script='/home/blender/git/blender-v410/blender.git/source/creator/symbols_unix.map'
    build system: CMake

gdb output

not terribly useful, but...

#0  0x00007fab372a154c in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007fab37254d06 in raise () from /lib64/libc.so.6
#2  0x00007fab37228885 in abort () from /lib64/libc.so.6
#3  0x00007faa92af5c82 in ?? () from /opt/pixar/RenderManProServer-26.0/lib/libprman.so
#4  0x00007fab376ad37c in __cxxabiv1::__terminate (handler=<optimized out>) at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:48
#5  0x00007fab376ad3e7 in std::terminate () at ../../../../libstdc++-v3/libsupc++/eh_terminate.cc:58
#6  0x00007fab376ad36f in std::rethrow_exception (ep=...) at ../../../../libstdc++-v3/libsupc++/eh_ptr.cc:217
#7  0x00007faa91cf0964 in ?? () from /opt/pixar/RenderManProServer-26.0/lib/../lib/libstats.so
#8  0x00007faa91d733ba in ?? () from /opt/pixar/RenderManProServer-26.0/lib/../lib/libstats.so
#9  0x00007faa91e80740 in ?? () from /opt/pixar/RenderManProServer-26.0/lib/../lib/libstats.so
#10 0x00007fab3729f802 in start_thread () from /lib64/libc.so.6
#11 0x00007fab3723f450 in clone3 () from /lib64/libc.so.6
(gdb) 
flipphillips commented 4 months ago

One additional note, if I run it in

blender --debug

it crashes on exit if the RenderMan plugin is even enabled. Doesn't even need to be invoked.

prman-pixar commented 4 months ago

Hi Filip,

This is just a guess but I have a feeling this due to ABI std::string incompatibilities. It definitely crashes for me when using Blender 4.1 with the current version of RenderMan 26.0, on an RHEL9 instance. However, it works as expected when using our in progress RHEL9 build of RenderMan.

I would try this again when the RHEL9 build comes out (slated for 26.2).

flipphillips commented 4 months ago

OK - that makes sense. Strings - always strings. My Pascal ray tracer in the '80s - strings. Convert that code to C in the 90s - strings. Strings!!!

Feel free to put me on the external beta list again for that build :)

flipphillips commented 2 months ago

Added note - awkwardly debugging with VScode, I noticed that it appears to crash in attach of class RfBStatsManager(object):

Right where it starts to try to join

       self.boot_strap_thread = threading.Thread(target=self.boot_strap)
        self.boot_strap_thread.start()
        # wait 5 seconds
-> -> ->        if not self.boot_strap_thread.join(5.0):
            # boostrap thread didn't stop, abort
            self.kill_boostap_thread()
prman-pixar commented 1 week ago

@flipphillips We just released RenderMan 26.2 which should now work on Rocky 9. If you can give it a try and report back whether or not it worked for you that would be great.

flipphillips commented 3 days ago

So far, so good. Thanks!