box64 icon indicating copy to clipboard operation
box64 copied to clipboard

Segmentation Fault trying to run Blender 2.79

Open Gato303 opened this issue 4 years ago • 9 comments

OS: Ubuntu Mate 21.10 64bits System: Raspberry Pi 4B 4GB #Overclock options: over_voltage=2 arm_freq=1750 gpu_freq=600 gpu_mem=256 BOX version: compiled from box64-0.1.6 source

Trying to run Blender 2.79 (the nighty build version contained in a tar.bz2 that needs no installation) since in the Ubuntu 21.10 repositories only Blender 2.93 is found and can't be properly run in the Raspberry Pi 4B (even using MESA_GL_VERSION_OVERRIDE=3.3) cause the SoC only supports up to OpenGL3.0 and Blender 2.93 requires OpenGL3.3.

I run Blender 2.79 with Box64 and got SIGSEGV error and execution is aborted.

Output generated by Box64:

carlos@carlos-pi:~/blender-2.79$ box64 ./blender Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Box64 with Dynarec v0.1.6 nogit built on Dec 20 2021 20:41:16 Using default BOX64_LD_LIBRARY_PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/ Using default BOX64_PATH: ./:bin/ Counted 63 Env var Looking for ./blender Using native(wrapped) librt.so.1 Using native(wrapped) libpthread.so.0 Using native(wrapped) libGLU.so.1 Using native(wrapped) libGL.so.1 Using native(wrapped) libX11.so.6 Using native(wrapped) libXi.so.6 Using native(wrapped) libXext.so.6 Using native(wrapped) libxcb.so.1 Using native(wrapped) libXau.so.6 Using native(wrapped) libXdmcp.so.6 Using native(wrapped) libXxf86vm.so.1 Using native(wrapped) libXfixes.so.3 Using native(wrapped) libXrender.so.1 Using native(wrapped) libutil.so.1 Using native(wrapped) libdl.so.2 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libm.so.6 Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1 Error: Global Symbol __RML_open_factory not found, cannot apply R_X86_64_GLOB_DAT @0x84375a0 ((nil)) in /home/carlos/blender-2.79/blender Error: Global Symbol __TBB_make_rml_server not found, cannot apply R_X86_64_GLOB_DAT @0x84375a8 ((nil)) in /home/carlos/blender-2.79/blender Error: Global Symbol __RML_close_factory not found, cannot apply R_X86_64_GLOB_DAT @0x84375b0 ((nil)) in /home/carlos/blender-2.79/blender Error: Global Symbol __TBB_call_with_my_server_info not found, cannot apply R_X86_64_GLOB_DAT @0x84375b8 ((nil)) in /home/carlos/blender-2.79/blender Error: Global Symbol __morestack not found, cannot apply R_X86_64_GLOB_DAT @0x843f948 ((nil)) in /home/carlos/blender-2.79/blender 2770|SIGSEGV @0xffffa2adb9e8 (???(0xffffa2adb9e8)) (x64pc=0x2ff8b8e//home/carlos/blender-2.79/blender:"???", rsp=0xffffa41d4500, stack=0xffffa39d6000:0xffffa41d6000 own=(nil) fp=0xffffa0ed4f58), for accessing 0xffffffffa15d6e80 (code=1/prot=0), db=0x6cce7c60(0xffffa2adb9b0:0xffffa2adbccc/0x2ff8b82:0x2ff8cf5/???:clean, hash:abec495e/abec495e) handler=(nil) Segmentation fault (core dumped) ` Any pointers about what can be done to solve this errors? I will be thankfull for any help.

Gato303 avatar Jan 23 '22 18:01 Gato303

I got the same errors (along with "Error: Global Symbol qt_version_tag not found") with Quartus. I'll take a look.

mhavu avatar Apr 05 '22 15:04 mhavu

It seems TBB was statically linked in Blender 2.79, whereas in my case __RML_open_factory, __TBB_make_rml_server, __RML_close_factory, and __TBB_call_with_my_server_info are in libtbb.so.2:

     7: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __TBB_call_with_[...]
    49: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __RML_open_factory
    72: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __TBB_make_rml_server
   113: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __RML_close_factory
   728: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __TBB_call_with_[...]
   891: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __RML_open_factory
   966: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __TBB_make_rml_server
  1076: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __RML_close_factory

They all seem to be weak symbols without default definitions, which probably explains the errors. A definition is found when the executable is run on x86_64, however. I have no idea from where they are found yet, but I'll keep on digging. Any hints, @ptitSeb?

mhavu avatar Apr 05 '22 18:04 mhavu

The symbols are nowhere to be found, and I'm starting to think they are not actually needed. Maybe the missing global symbols should be warnings instead of errors, and they have (or at least should have) nothing to do with the segmentation fault. @ptitSeb, should the jump table still be correctly built in case there are missing symbols?

mhavu avatar Apr 06 '22 06:04 mhavu

Those WEAK symbol are probably optionnal. Yes, I should put a "Warning" instead of an "Error" for Weak GLOBAL_DAT stuff.

When a symbol is missing, it's value is NULL. And if it's indeed optionnal, the program test for NULL value and shouldn't crash. Anyway, I don't think those Error/Warning are the cause of the crash. The segfault is for accessing a non-NULL value. Issue is that pointer value seems "too big" to be correct, I should try on my side to debug this.

ptitSeb avatar Apr 06 '22 07:04 ptitSeb

Indeed. In my case, the segfault comes from accessing 0xfffffffffffffff8, which is clearly too big.

mhavu avatar Apr 06 '22 07:04 mhavu

I have tried it on my side, and there is a randomness in the crash, making it diificult to track the bug down. There maybe multiple bugs here also. It's slightly more stable without dynarec (using BOX64_DYNAREC=0), but even there, it crashes eventualy.

ptitSeb avatar Apr 06 '22 09:04 ptitSeb

I tried various software components in the Quartus suite, and BOX64_DYNAREC=0 doesn't seem to have any effect. The components that use Qt seem to segfault when accessing pointer values in seemingly valid range (e.g. 0x2a0000004a):

3027|SIGSEGV @0xffff57841728 (???(0xffff57841728)) (x64pc=0xffff70b12550//home/mhavu/intelFPGA/21.1/quartus/linux64/libccl_mem.so:"/home/mhavu/intelFPGA/21.1/quartus/linux64/libccl_mem.so/Z24mem_register_dll_for_pgoPKcS0 + 272", rsp=0xffff91150be8, stack=0xffff90952000:0xffff91152000 own=(nil) fp=0xffff657d8e80), for accessing 0x2a0000004a (code=1/prot=0), db=0x7b621930(0xffff57841728:0xffff5784195c/0xffff70b12550:0xffff70b125ad//home/mhavu/intelFPGA/21.1/quartus/linux64/libccl_mem.so/Z24mem_register_dll_for_pgoPKcS0 + 272:clean, hash:8dad1db9/8dad1db9) handler=(nil)

This is probably another bug that is not related to the one described for non-Qt software above.

mhavu avatar Apr 07 '22 07:04 mhavu

Can this ticket be closed now?

ptitSeb avatar Feb 15 '24 17:02 ptitSeb

Can this ticket be closed now?

Uhm.... I don't know, I am now on Rasberry Pi OS (Debian 12 Bookworm) and I installed Box86 and Box64 using Pi-Apps, I run Blender 2.79b downloaded from https://download.blender.org/release/Blender2.79/ the program opens, shows correctly the UI, everything seems fine.

But when I try to add a new mesh to the scene, say a simple cube, or try to edit the default cube in the scene, Blender abruptly closes with no messages, exiting a "segmentation fault" in the terminal.

Terminal output: carlos@carlos:~/blender-2.79b-linux-glibc219-x86_64 $box64 blender Dynarec for ARM64, with extension: ASIMD CRC32 PageSize:4096 Running on Cortex-A72 with 4 Cores Params database has 57 entries Box64 with Dynarec v0.2.7 82ae65f4 built on Feb 8 2024 06:25:38 BOX64: Didn't detect 48bits of address space, considering it's 39bits Counted 46 Env var BOX64 LIB PATH: ./:lib/:lib64/:x86_64/:bin64/:libs64/:/lib/x86_64-linux-gnu/:/usr/lib/x86_64-linux-gnu/ BOX64 BIN PATH: ./:bin/:/usr/local/sbin/:/usr/local/bin/:/usr/sbin/:/usr/bin/:/sbin/:/bin/:/usr/local/games/:/usr/games/ Looking for blender Rename process to "blender" Redirecting overridden malloc from dynsym function for /home/carlos/blender-2.79b-linux-glibc219-x86_64/blender Using native(wrapped) librt.so.1 Using native(wrapped) libpthread.so.0 Using native(wrapped) libGLU.so.1 Using native(wrapped) libGL.so.1 Using native(wrapped) libX11.so.6 Using native(wrapped) libXi.so.6 Using native(wrapped) libXext.so.6 Using native(wrapped) libxcb.so.1 Using native(wrapped) libXau.so.6 Using native(wrapped) libdl.so.2 Using native(wrapped) libXdmcp.so.6 Using native(wrapped) libXxf86vm.so.1 Using native(wrapped) libXfixes.so.3 Using native(wrapped) libXrender.so.1 Using native(wrapped) libutil.so.1 Using native(wrapped) libc.so.6 Using native(wrapped) ld-linux-x86-64.so.2 Using native(wrapped) libbsd.so.0 Using native(wrapped) libm.so.6 Using emulated /lib/x86_64-linux-gnu/libgcc_s.so.1 Warning: Global Symbol __RML_open_factory not found, cannot apply R_X86_64_GLOB_DAT @0x80f6600 ((nil)) in /home/carlos/blender-2.79b-linux-glibc219-x86_64/blender Warning: Global Symbol __TBB_make_rml_server not found, cannot apply R_X86_64_GLOB_DAT @0x80f6608 ((nil)) in /home/carlos/blender-2.79b-linux-glibc219-x86_64/blender Warning: Global Symbol __RML_close_factory not found, cannot apply R_X86_64_GLOB_DAT @0x80f6610 ((nil)) in /home/carlos/blender-2.79b-linux-glibc219-x86_64/blender Warning: Global Symbol __TBB_call_with_my_server_info not found, cannot apply R_X86_64_GLOB_DAT @0x80f6618 ((nil)) in /home/carlos/blender-2.79b-linux-glibc219-x86_64/blender Using native(wrapped) libSDL2.so Error loading needed lib libjack.so Warning: Cannot dlopen("libjack.so"/0x61449a8, 1) Error loading needed lib libjack.so.0 Warning: Cannot dlopen("libjack.so.0"/0x61449b3, 1) Error loading needed lib libjack.so.1 Warning: Cannot dlopen("libjack.so.1"/0x61449c0, 1) Error loading needed lib libjack.so.2 Warning: Cannot dlopen("libjack.so.2"/0x61449cd, 1) Read prefs: /home/carlos/.config/blender/2.79/config/userpref.blend Using native(wrapped) libpulse.so.0 found bundled python: /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/math.cpython-35m-x86_64-linux-gnu.so measureit: Imported multifiles Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_heapq.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_hashlib.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_random.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_datetime.cpython-35m-x86_64-linux-gnu.so archimesh: Imported multifiles Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_posixsubprocess.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/select.cpython-35m-x86_64-linux-gnu.so archipack: ready Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/array.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_struct.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/_elementtree.cpython-35m-x86_64-linux-gnu.so Using emulated /home/carlos/blender-2.79b-linux-glibc219-x86_64/2.79/python/lib/python3.5/lib-dynload/pyexpat.cpython-35m-x86_64-linux-gnu.so 4381|SIGSEGV @0x7f712c5d8c (???(0x7f712c5d8c)) (x64pc=0x60422a3//home/carlos/blender-2.79b-linux-glibc219-x86_64/blender:"/home/carlos/blender-2.79b-linux-glibc219-x86_64/blender + 0x5c42220", rsp=0x7fa89c2650, stack=0x7fa81c4000:0x7fa89c4000 own=(nil) fp=0x1), for accessing 0xffffffffffffff90 (code=1/prot=0), db=0x7f712aeaf8(0x7f712c5b38:0x7f712c6510/0x6042220:0x60423d0//home/carlos/blender-2.79b-linux-glibc219-x86_64/blender + 0x5c42220:clean, hash:c7a1715b/c7a1715b) handler=0x1078280 RAX:0x0000000000000000 RCX:0x0000000000000000 RDX:0x0000000000000090 RBX:0x0000000046e8a150 RSP:0x0000007fa89c2650 RBP:0x0000007fa89c2760 RSI:0x0000000000000000 RDI:0x0000000000000000 R8:0x0000000046e8a150 R9:0x0000000000000000 R10:0x0000000046f4e608 R11:0x0000000006464b60 R12:0x0000007fa89c27a0 R13:0x0000000000000000 R14:0x0000000000000001 R15:0x0000007fa89c29c0 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 RSP-0x20:0x000000003f800000 RSP-0x18:0x0000000000000000 RSP-0x10:0x000000003f800000 RSP-0x08:0x0000000000000000 RSP+0x00:0x000000003f800000 RSP+0x08:0x0000000080000000 RSP+0x10:0x000000003f800000 RSP+0x18:0x0000000000000000 Writing: /tmp/blender.crash.txt 4381|SIGSEGV @0x7fa958a9cc (kill(/lib/aarch64-linux-gnu/libc.so.6)) (x64pc=0x1104b3/???:"???", rsp=0x7fa89c18f8, stack=0x7fa81c4000:0x7fa89c4000 own=(nil) fp=0x46b0af40), for accessing 0x3e80000111d (code=0/prot=0), db=(nil)((nil):(nil)/(nil):(nil)/???:clean, hash:0/0) handler=(nil) RSP-0x20:0x000000000000000b RSP-0x18:0x0000000045961158 RSP-0x10:0x00000000433c5cb0 RSP-0x08:0x0000000000000015 RSP+0x00:0x00000000010783bb RSP+0x08:0x65646e656c422023 RSP+0x10:0x282039372e322072 RSP+0x18:0x202c293020627573 RAX:0x000000000000111d RCX:0x0000000000110220 RDX:0xffffffffffffffe8 RBX:0x0000007fa89c1b00 RSP:0x0000007fa89c18f8 RBP:0x0000000046b0af40 RSI:0x000000000000000b RDI:0x000000000000111d R8:0x0000000046b37808 R9:0x0000000000000000 R10:0x0000000046f4e608 R11:0x0000000006464b60 R12:0x000000000000000b R13:0x0000000045961158 R14:0x0000007fa89c1900 R15:0x0000007fa97598e0 ES:0x002b CS:0x0033 SS:0x002b DS:0x002b FS:0x0043 GS:0x0053 Segmentation fault

Gato303 avatar Feb 16 '24 02:02 Gato303