System Information
Operating system: Gentoo Linux
Graphics card: 25:00.0 VGA compatible controller: NVIDIA Corporation GP107 [GeForce GTX 1050 Ti] (rev a1)
Blender Version
Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) a02992f13138 https://builder.blender.org/download/daily/archive/blender-3.3.0-alpha+master.a02992f13138-linux.x86_64-release.tar.xz
Worked: (newest version of Blender that worked as expected) c0e453233132 https://builder.blender.org/download/daily/archive/blender-3.3.0-alpha+master.c0e453233132-linux.x86_64-release.tar.xz
Short description of error
I'm the primary developer of the BlenderBIM Add-on (https://blenderbim.org/) which provides import / export support for the .ifc format for architects and engineers in Blender. The core functionality of the add-on revolves around the "IfcOpenShell" C++ library with Python bindings. One of the functions of IfcOpenShell is to process geometry with OpenCascade with multithreading, and return back verts / edges / faces so users can load geometry into Blender.
This functionality has worked for a very long time since Blender 2.5 but with recent builds it has started segfaulting. The IfcOpenShell library I am loading is unchanged.
I understand this is not core Blender functionality, so I apologise if this is the wrong channel, but maybe it is a symptom of other issues in Blender. There are also lots of users of the add-on who depend on this (there is no other way to load building data into Blender) so I hope I have helped unearth an issue.
This is the segfault I get, I'm not sure how useful this backtrace is though.
It works on c0e453233132 and segfaults in a02992f13138 so I assume a change made between those 12 hours is the cause of the issue. Hope that narrows it down.
It does not segfault on Windows. It seems Linux specific. I have not tested on Mac.
# Blender 3.3.0, Commit date: 2022-06-29 10:58, Hash a02992f13138 # backtrace ./blender(BLI_system_backtrace+0x20) [0xc22f250] ./blender() [0x11f46ca] /lib64/libc.so.6(+0x38ba0) [0x7efc5d331ba0] ./blender(_ZZSt9call_onceIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbEJPS1_S9_SA_EEvRSt9once_flagOT_DpOT0_ENUlvE0_4_FUNEv+0x17) [0x290a5f7] /lib64/libpthread.so.0(+0xf88a) [0x7efc5d80088a] /home/dion/.config/blender/3.1/scripts/addons/blenderbim/libs/site/packages/ifcopenshell/_ifcopenshell_wrapper.so(_ZNSt6thread11_State_implINS_8_InvokerISt5tupleIJZNSt13__future_base17_Async_state_implINS1_IS2_IJZN7IfcGeom27IteratorImplementation_Ifc410initializeEvEUlvE_EEEEvEC4EOS9_EUlvE_EEEEE6_M_runEv+0x118) [0x7efc347ed918] ./blender() [0xc6c13c0] /lib64/libpthread.so.0(+0x7e5e) [0x7efc5d7f8e5e] /lib64/libc.so.6(clone+0x3f) [0x7efc5d3f4f0f] # Python backtrace
Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).
- Install the IfcOpenShell Python library by downloading the Python module from https://s3.amazonaws.com/ifcopenshell-builds/ifcopenshell-python-31-v0.7.0-dc67287-linux64.zip and extracting it to somewhere in Blender's Python sys.path.
- This is a minimal script you can run in either the Blender Python console or text editor.
Here is the test.ifc file you can download and adjust the path in the script below:
import ifcopenshell
import ifcopenshell.geom
f = ifcopenshell.open('/home/dion/test.ifc')
s = ifcopenshell.geom.settings()
i = ifcopenshell.geom.iterator(s, f, num_threads=3)
i.initialize()- In the final line of code "i.initialize()", it will segfault. If you change num_threads to 1 there is no segfault. This makes me think that there was some change in Blender that is related to multithreading.
For convenience, here is the Github link to the time range between the two commits. https://github.com/blender/blender/commits/master?after=087f27a52f7857887e90754d87a7a73715ebc3fb+489&branch=master&qualified_name=refs%2Fheads%2Fmaster - to my untrained eye I don't see anything that jumps out as being significant. Also posted here to the primary developer of IfcOpenShell: https://github.com/IfcOpenShell/IfcOpenShell/issues/2309


