VTK9/OSMesa21/LLVM12 MacOS Crash

I have built several generations of VTK with OSMesa for offscreen rendering on Linux servers, and several versions of VTK on MacOS for Cocoa from source over the years. I recently built VTK with the latest versions above on Linux successfully, and with Cocoa. However, my attempted duplicate and careful OSMesa/LLVM build on MacOS Catalina 10.15.7 with gcc@9 crashes. I was not allowed to upload the crash so it is below. I applied some of the suggested workarounds on this and other forums. I don’t know why it is even calling this library because I am writing PNG images but not reading any. I followed these instructions, the major difference being meson and ninja. https://www.paraview.org/Wiki/ParaView/ParaView_And_Mesa_3D. Thanks.

(base) iMac-Pro:ImplicitFunctions rspencer$ time ~/Projects/VTKgcc/vtkINSTALL/bin/vtkpython Alveoli.py
vtkpython(52511,0x10e5d1dc0) malloc: *** error for object 0x110b5a5e0: pointer being freed was not allocated
vtkpython(52511,0x10e5d1dc0) malloc: *** set a breakpoint in malloc_error_break to debug

Loguru caught a signal: SIGABRT
( 0.060s) [main thread ] :0 FATL| Signal: SIGABRT
Process: vtkpython [52511]
Path: /Users/USER/*/vtkpython
Identifier: vtkpython
Version: 0
Code Type: X86-64 (Native)
Parent Process: bash [1983]
Responsible: Terminal [1590]
User ID: 1823

Date/Time: 2022-05-22 19:22:56.105 -0400
OS Version: Mac OS X 10.15.7 (19H1824)
Report Version: 12
Bridge OS Version: 6.4 (19P4242)
Anonymous UUID: 42F69EF7-F61C-8EE4-F997-10F90756BB17

Time Awake Since Boot: 14000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 main thread Dispatch queue: com.apple.main-thread

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
/Users/rspencer/Projects/VTKgcc/vtkINSTALL/lib/python3.9/site-packages/vtkmodules/…/…/…/libvtkDICOMParser-9.1.1.dylib
abort() called
vtkpython(52511,0x10e5d1dc0) malloc: *** error for object 0x110b5a5e0: pointer being freed was not allocated

Thread 0 Crashed:: main thread Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff7349e32a __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff7355ae60 pthread_kill + 430
2 libsystem_c.dylib 0x00007fff73425808 abort + 120
3 libsystem_malloc.dylib 0x00007fff7351b50b malloc_vreport + 548
4 libsystem_malloc.dylib 0x00007fff7351e40f malloc_report + 151
5 libstdc++.6.dylib 0x000000010d7be6bd std::locale::_Impl::~_Impl() + 109
6 libstdc++.6.dylib 0x000000010d7be7e1 std::locale::operator=(std::locale const&) + 81
7 libstdc++.6.dylib 0x000000010d7bbf3c std::ios_base::_M_init() + 60
8 libstdc++.6.dylib 0x000000010d81bff1 std::basic_ios<char, std::char_traits >::init(std::basic_streambuf<char, std::char_traits >) + 17
9 libstdc++.6.dylib 0x00000001109b77c7 std::ios_base::Init::Init() (.part.0) + 663
10 libvtkDICOMParser-9.1.9.1.0.dylib 0x0000000110d26f50 _GLOBAL__sub_I_DICOMAppHelper.cxx + 16
11 dyld 0x000000010e521353 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 535
12 dyld 0x000000010e52175e ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 40
13 dyld 0x000000010e51c17b ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const
, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 493
14 dyld 0x000000010e51c0e6 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 344
15 dyld 0x000000010e51c0e6 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, char const*, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 344
16 dyld 0x000000010e51a234 ImageLoader::processInitializers(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&, ImageLoader::UninitedUpwards&) + 188
17 dyld 0x000000010e51a2d4 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 82
18 dyld 0x000000010e50bef2 dyld::runInitializers(ImageLoader*) + 82
19 dyld 0x000000010e51601b dlopen_internal + 609
20 libdyld.dylib 0x00007fff73341d8a dlopen + 171
21 libpython3.9.dylib 0x000000010cb91ca1 _imp_create_dynamic + 1553
22 libpython3.9.dylib 0x000000010ca84503 cfunction_vectorcall_FASTCALL + 99
23 libpython3.9.dylib 0x000000010cb552c2 _PyEval_EvalFrameDefault + 44690
24 libpython3.9.dylib 0x000000010cb48fcd _PyEval_EvalCode + 557
25 libpython3.9.dylib 0x000000010ca28f61 _PyFunction_Vectorcall + 433
26 libpython3.9.dylib 0x000000010cb5754c call_function + 172
27 libpython3.9.dylib 0x000000010cb5507d _PyEval_EvalFrameDefault + 44109
28 libpython3.9.dylib 0x000000010ca28ea8 _PyFunction_Vectorcall + 248
29 libpython3.9.dylib 0x000000010cb5754c call_function + 172
30 libpython3.9.dylib 0x000000010cb54fd7 _PyEval_EvalFrameDefault + 43943
31 libpython3.9.dylib 0x000000010ca28ea8 _PyFunction_Vectorcall + 248
32 libpython3.9.dylib 0x000000010cb5754c call_function + 172
33 libpython3.9.dylib 0x000000010cb550b3 _PyEval_EvalFrameDefault + 44163
34 libpython3.9.dylib 0x000000010ca28ea8 _PyFunction_Vectorcall + 248
35 libpython3.9.dylib 0x000000010cb5754c call_function + 172
36 libpython3.9.dylib 0x000000010cb550b3 _PyEval_EvalFrameDefault + 44163
37 libpython3.9.dylib 0x000000010ca28ea8 _PyFunction_Vectorcall + 248
38 libpython3.9.dylib 0x000000010cb5754c call_function + 172
39 libpython3.9.dylib 0x000000010cb550b3 _PyEval_EvalFrameDefault + 44163
40 libpython3.9.dylib 0x000000010ca28ea8 _PyFunction_Vectorcall + 248
41 libpython3.9.dylib 0x000000010ca2a68a object_vacall + 474
42 libpython3.9.dylib 0x000000010ca2a92d _PyObject_CallMethodIdObjArgs + 253
43 libpython3.9.dylib 0x000000010cb8c7e1 PyImport_ImportModuleLevelObject + 1217
44 libpython3.9.dylib 0x000000010cb52924 _PyEval_EvalFrameDefault + 34036
45 libpython3.9.dylib 0x000000010cb48fcd _PyEval_EvalCode + 557
46 libpython3.9.dylib 0x000000010cbb7e01 pyrun_file + 321
47 libpython3.9.dylib 0x000000010cbb765a pyrun_simple_file + 394
48 libpython3.9.dylib 0x000000010cbb747d PyRun_SimpleFileExFlags + 109
49 libpython3.9.dylib 0x000000010cbdf389 pymain_run_file + 329
50 libpython3.9.dylib 0x000000010cbde92b pymain_run_python + 443
51 libpython3.9.dylib 0x000000010cbde715 Py_RunMain + 37
52 libpython3.9.dylib 0x000000010cbdfdc1 pymain_main + 49
53 libpython3.9.dylib 0x000000010cbdfd68 Py_Main + 56
54 libvtkPythonInterpreter-9.1.9.1.0.dylib 0x000000010c9299bb vtkPythonInterpreter::PyMain(int, char**) + 491 (vtkPythonInterpreter.cxx:555)
55 vtkpython 0x000000010c90dc9b main + 139 (basic_string.h:226)
56 libdyld.dylib 0x00007fff73356cc9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000000010e5d1dc0 rcx: 0x00007ffee32f2618 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee32f2640 rsp: 0x00007ffee32f2618
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x000000010e5d1dc0 r11: 0x0000000000000246
r12: 0x0000000000000307 r13: 0x0000000000000050 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff7349e32a rfl: 0x0000000000000246 cr2: 0x000000010e656220

Logical CPU: 0
Error Code: 0x020000b8
Trap Number: 133

Binary Images:
0x10c90a000 - 0x10c90dfff +vtkpython (0) /Users/USER//vtkpython
0x10c921000 - 0x10c92cfe7 +libvtkPythonInterpreter-9.1.9.1.0.dylib (0) <85691377-625E-399D-AAEC-8E2C461DBB12> /Users/USER/
/libvtkPythonInterpreter-9.1.9.1.0.dylib
0x10c945000 - 0x10c97cfff +libvtkWrappingPythonCore3.9-9.1.9.1.0.dylib (0) /Users/USER//libvtkWrappingPythonCore3.9-9.1.9.1.0.dylib
0x10c9b1000 - 0x10c9b4ff3 +_heapq.cpython-39-darwin.so (0) <216FF585-5494-3D40-8FE7-A886628469E3> /Users/USER/
/_heapq.cpython-39-darwin.so
0x10c9b7000 - 0x10ccf5ff7 +libpython3.9.dylib (0) <764391C0-BD18-3CAB-B387-F8EEEE151D5C> /Users/USER//libpython3.9.dylib
0x10cdb0000 - 0x10cdb2fff +_bisect.cpython-39-darwin.so (0) <12E48C1E-25DB-30E8-B49B-A160911EDD32> /Users/USER/
/_bisect.cpython-39-darwin.so
0x10cdb6000 - 0x10d2c9fe7 +libvtkCommonCore-9.1.9.1.0.dylib (0) <7ABDA766-5C25-3AAC-862F-E9753D53629C> /Users/USER//libvtkCommonCore-9.1.9.1.0.dylib
0x10d726000 - 0x10d761fe7 +libvtksys-9.1.9.1.0.dylib (0) /Users/USER/
/libvtksys-9.1.9.1.0.dylib
0x10d7a3000 - 0x10d90efef +libstdc++.6.dylib (0) /usr/local/opt/gcc@9/lib/gcc/9/libstdc++.6.dylib
0x10dae2000 - 0x10daf9fff +libgcc_s.1.dylib (1) /usr/local/lib/gcc/9/libgcc_s.1.dylib
0x10db0a000 - 0x10de35fff +libvtkCommonMisc-9.1.9.1.0.dylib (0) <7CC5EA67-41EC-3E48-AA0D-9E6AD17CDC99> /Users/USER//libvtkCommonMisc-9.1.9.1.0.dylib
0x10e4d2000 - 0x10e4d5fff +libvtkkissfft-9.1.9.1.0.dylib (0) /Users/USER/
/libvtkkissfft-9.1.9.1.0.dylib
0x10e4fc000 - 0x10e4feff7 +_random.cpython-39-darwin.so (0) /Users/USER//_random.cpython-39-darwin.so
0x10e506000 - 0x10e598267 dyld (750.7) /usr/lib/dyld
0x10e60c000 - 0x10e627fe7 +libvtkCommonMath-9.1.9.1.0.dylib (0) <6F5BDB54-52C1-39A9-BF5F-04944D4E90A7> /Users/USER/
/libvtkCommonMath-9.1.9.1.0.dylib
0x10e644000 - 0x10e66fff7 +libvtkloguru-9.1.9.1.0.dylib (0) /Users/USER//libvtkloguru-9.1.9.1.0.dylib
0x10e6ed000 - 0x10e6f7ffb +math.cpython-39-darwin.so (0) <4C008D45-C01A-3EF2-82A3-201DE2FBB350> /Users/USER/
/math.cpython-39-darwin.so
0x10e6fc000 - 0x10e700ff3 +_sha512.cpython-39-darwin.so (0) <72E19678-3EC3-3F35-9A11-62B9938BFF1C> /Users/USER//_sha512.cpython-39-darwin.so
0x10e703000 - 0x10e716fff +vtkCommonColor.cpython-39-darwin.so (0) <9E42DDA7-4D68-3D10-985E-D784BFC6D0C1> /Users/USER/
/vtkCommonColor.cpython-39-darwin.so
0x10e72b000 - 0x10e742fef +libvtkCommonColor-9.1.9.1.0.dylib (0) <6D70564D-C0B4-3D0F-AB86-E5427B3530C3> /Users/USER//libvtkCommonColor-9.1.9.1.0.dylib
0x10e75b000 - 0x10eb16fef +libvtkCommonDataModel-9.1.9.1.0.dylib (0) <26B24AD8-FC39-3766-A652-591E533B7262> /Users/USER/
/libvtkCommonDataModel-9.1.9.1.0.dylib
0x10ee27000 - 0x10ee4efff +libvtkCommonTransforms-9.1.9.1.0.dylib (0) <10E09F3F-2EDD-3E80-A786-2A062454A971> /Users/USER//libvtkCommonTransforms-9.1.9.1.0.dylib
0x10ee7b000 - 0x10eeaaff7 +libvtkCommonSystem-9.1.9.1.0.dylib (0) <19B5391F-F325-3C9A-8D9B-FB94EF427BE8> /Users/USER/
/libvtkCommonSystem-9.1.9.1.0.dylib
0x10eee3000 - 0x10ef16fff +libvtkpugixml-9.1.9.1.0.dylib (0) /Users/USER//libvtkpugixml-9.1.9.1.0.dylib
0x10ef47000 - 0x10f3a6fff +vtkCommonCore.cpython-39-darwin.so (0) <0AB4B5A9-8581-3ECB-8610-68BFD04C51AF> /Users/USER/
/vtkCommonCore.cpython-39-darwin.so
0x10f74b000 - 0x10fcbafff +vtkCommonDataModel.cpython-39-darwin.so (0) /Users/USER//vtkCommonDataModel.cpython-39-darwin.so
0x1100eb000 - 0x11014eff7 +vtkCommonMath.cpython-39-darwin.so (0) <22D46A88-3816-34DC-9304-E9C057D9FB1A> /Users/USER/
/vtkCommonMath.cpython-39-darwin.so
0x11019f000 - 0x1101e6fff +vtkCommonTransforms.cpython-39-darwin.so (0) <01B609C8-77F2-3FA0-87D7-F7F49FC21FB6> /Users/USER//vtkCommonTransforms.cpython-39-darwin.so
0x110227000 - 0x1102b4fff +vtkIOImage.cpython-39-darwin.so (0) <46A3871D-C0CE-39B4-B72A-2FADC85DAE20> /Users/USER/
/vtkIOImage.cpython-39-darwin.so
0x110315000 - 0x110488fef +libvtkIOImage-9.1.9.1.0.dylib (0) <79E03D2D-9175-3767-9B1C-A3520CDD7DEC> /Users/USER//libvtkIOImage-9.1.9.1.0.dylib
0x110531000 - 0x110738fff +libvtkImagingCore-9.1.9.1.0.dylib (0) <532BEDA8-E659-3098-A468-F626614DEE4C> /Users/USER/
/libvtkImagingCore-9.1.9.1.0.dylib
0x11081d000 - 0x1108c0ff7 +libvtkCommonExecutionModel-9.1.9.1.0.dylib (0) <5D7A30F7-2332-3842-B79C-65ADE2B6CF3C> /Users/USER//libvtkCommonExecutionModel-9.1.9.1.0.dylib
0x1109a1000 - 0x110b40ff7 +libstdc++.6.dylib (0) /usr/local/opt/gcc/lib/gcc/11/libstdc++.6.dylib
0x110d15000 - 0x110d2bff7 +libvtkDICOMParser-9.1.9.1.0.dylib (0) <903EC969-EF1D-351B-B177-CA6ACB67E081> /Users/USER/
/libvtkDICOMParser-9.1.9.1.0.dylib
0x110d3f000 - 0x110dd4ff7 +libvtkmetaio-9.1.9.1.0.dylib (0) <1257F59F-5691-3F46-91B1-AC27C156A675> /Users/USER//libvtkmetaio-9.1.9.1.0.dylib
0x110e28000 - 0x110e6afef +libvtkpng-9.1.9.1.0.dylib (0) <0A091A25-F55D-3FB7-A62D-3F33C306F47B> /Users/USER/
/libvtkpng-9.1.9.1.0.dylib
0x110e75000 - 0x110eeefef +libvtktiff-9.1.9.1.0.dylib (0) <6EB63BA6-9411-3699-BA1A-EC598A297E30> /Users/USER//libvtktiff-9.1.9.1.0.dylib
0x110efd000 - 0x110f14ff7 +libvtkzlib-9.1.9.1.0.dylib (0) <23B6B563-BB94-3238-B0D7-A7EA869C1681> /Users/USER/
/libvtkzlib-9.1.9.1.0.dylib
0x110f25000 - 0x110f9bff7 +libvtkjpeg-9.1.9.1.0.dylib (0) <9A542449-E6B4-336D-A02B-8012EA5E01E6> /Users/USER/*/libvtkjpeg-9.1.9.1.0.dylib
0x7fff3a257000 - 0x7fff3a6d8fe6 com.apple.CoreFoundation (6.9 - 1678.103) <88349516-A0E5-3F1B-8619-799F48F3807D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff6fe63000 - 0x7fff6fe65ff7 libDiagnosticMessagesClient.dylib (112) /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff70339000 - 0x7fff7033afff libSystem.B.dylib (1281.100.1) /usr/lib/libSystem.B.dylib
0x7fff7061f000 - 0x7fff70671fff libc++.1.dylib (902.1) <59A8239F-C28A-3B59-B8FA-11340DC85EDC> /usr/lib/libc++.1.dylib
0x7fff70672000 - 0x7fff70687ffb libc++abi.dylib (902) /usr/lib/libc++abi.dylib
0x7fff710f3000 - 0x7fff710f5fff libfakelink.dylib (149.1) <36146CB2-E6A5-37BB-9EE8-1B4034D8F3AD> /usr/lib/libfakelink.dylib
0x7fff71205000 - 0x7fff7145cfff libicucore.A.dylib (64260.0.1) <8AC2CB07-E7E0-340D-A849-186FA1F27251> /usr/lib/libicucore.A.dylib
0x7fff7219b000 - 0x7fff721cefde libobjc.A.dylib (787.1) <6DF81160-5E7F-3E31-AA1E-C875E3B98AF6> /usr/lib/libobjc.A.dylib
0x7fff72877000 - 0x7fff72889ff3 libz.1.dylib (76) <793D9643-CD83-3AAC-8B96-88D548FAB620> /usr/lib/libz.1.dylib
0x7fff73138000 - 0x7fff7313dff3 libcache.dylib (83) /usr/lib/system/libcache.dylib
0x7fff7313e000 - 0x7fff73149fff libcommonCrypto.dylib (60165.120.1) /usr/lib/system/libcommonCrypto.dylib
0x7fff7314a000 - 0x7fff73151fff libcompiler_rt.dylib (101.2) <49B8F644-5705-3F16-BBE0-6FFF9B17C36E> /usr/lib/system/libcompiler_rt.dylib
0x7fff73152000 - 0x7fff7315bff7 libcopyfile.dylib (166.40.1) <3C481225-21E7-370A-A30E-0CCFDD64A92C> /usr/lib/system/libcopyfile.dylib
0x7fff7315c000 - 0x7fff731eefdb libcorecrypto.dylib (866.140.2) /usr/lib/system/libcorecrypto.dylib
0x7fff732fb000 - 0x7fff7333bff0 libdispatch.dylib (1173.100.2) /usr/lib/system/libdispatch.dylib
0x7fff7333c000 - 0x7fff73372fff libdyld.dylib (750.7) /usr/lib/system/libdyld.dylib
0x7fff73373000 - 0x7fff73373ffb libkeymgr.dylib (30) /usr/lib/system/libkeymgr.dylib
0x7fff73381000 - 0x7fff73381ff7 liblaunch.dylib (1738.140.3) /usr/lib/system/liblaunch.dylib
0x7fff73382000 - 0x7fff73387ff7 libmacho.dylib (959.0.1) /usr/lib/system/libmacho.dylib
0x7fff73388000 - 0x7fff7338aff3 libquarantine.dylib (110.40.6) <6CADF28C-2F20-3FA5-9FB9-49EAB0FD2489> /usr/lib/system/libquarantine.dylib
0x7fff7338b000 - 0x7fff7338cff7 libremovefile.dylib (48) <7C7EFC79-BD24-33EF-B073-06AED234593E> /usr/lib/system/libremovefile.dylib
0x7fff7338d000 - 0x7fff733a4ff3 libsystem_asl.dylib (377.60.4) /usr/lib/system/libsystem_asl.dylib
0x7fff733a5000 - 0x7fff733a5ff7 libsystem_blocks.dylib (74) <0D53847E-AF5F-3ACF-B51F-A15DEA4DEC58> /usr/lib/system/libsystem_blocks.dylib
0x7fff733a6000 - 0x7fff7342dfff libsystem_c.dylib (1353.100.4) /usr/lib/system/libsystem_c.dylib
0x7fff7342e000 - 0x7fff73431ffb libsystem_configuration.dylib (1061.141.2) <393137B7-3631-3450-B6F4-95EECD3ADDFF> /usr/lib/system/libsystem_configuration.dylib
0x7fff73432000 - 0x7fff73435fff libsystem_coreservices.dylib (114.1) <72857ADA-AA97-398B-B089-F50B2E89064B> /usr/lib/system/libsystem_coreservices.dylib
0x7fff73436000 - 0x7fff7343efff libsystem_darwin.dylib (1353.100.4) <19242BF1-BAF6-3DF0-AAD3-93E3E0870DBE> /usr/lib/system/libsystem_darwin.dylib
0x7fff7343f000 - 0x7fff73446fff libsystem_dnssd.dylib (1096.100.3) /usr/lib/system/libsystem_dnssd.dylib
0x7fff73447000 - 0x7fff73448ffb libsystem_featureflags.dylib (17) <29FD922A-EC2C-3F25-BCCC-B58D716E60EC> /usr/lib/system/libsystem_featureflags.dylib
0x7fff73449000 - 0x7fff73496ff7 libsystem_info.dylib (538) <8A321605-5480-330B-AF9E-64E65DE61747> /usr/lib/system/libsystem_info.dylib
0x7fff73497000 - 0x7fff734c3ff7 libsystem_kernel.dylib (6153.141.59) /usr/lib/system/libsystem_kernel.dylib
0x7fff734c4000 - 0x7fff7350bfff libsystem_m.dylib (3178) <00F331F1-0D09-39B3-8736-1FE90E64E903> /usr/lib/system/libsystem_m.dylib
0x7fff7350c000 - 0x7fff73533fff libsystem_malloc.dylib (283.100.6) <8549294E-4C53-36EB-99F3-584A7393D8D5> /usr/lib/system/libsystem_malloc.dylib
0x7fff73534000 - 0x7fff73541ffb libsystem_networkextension.dylib (1095.140.2) /usr/lib/system/libsystem_networkextension.dylib
0x7fff73542000 - 0x7fff7354bff7 libsystem_notify.dylib (241.100.2) /usr/lib/system/libsystem_notify.dylib
0x7fff7354c000 - 0x7fff73554fef libsystem_platform.dylib (220.100.1) <009A7C1F-313A-318E-B9F2-30F4C06FEA5C> /usr/lib/system/libsystem_platform.dylib
0x7fff73555000 - 0x7fff7355ffff libsystem_pthread.dylib (416.100.3) <62CB1A98-0B8F-31E7-A02B-A1139927F61D> /usr/lib/system/libsystem_pthread.dylib
0x7fff73560000 - 0x7fff73564ff3 libsystem_sandbox.dylib (1217.141.8) <9BE68E25-D41B-30DD-A1F9-35506143DB2A> /usr/lib/system/libsystem_sandbox.dylib
0x7fff73565000 - 0x7fff73567fff libsystem_secinit.dylib (62.100.2) /usr/lib/system/libsystem_secinit.dylib
0x7fff73568000 - 0x7fff7356fffb libsystem_symptoms.dylib (1238.120.2) <702D0910-5C34-3D43-9631-8BD215DE4FE1> /usr/lib/system/libsystem_symptoms.dylib
0x7fff73570000 - 0x7fff73586ff2 libsystem_trace.dylib (1147.120.1) /usr/lib/system/libsystem_trace.dylib
0x7fff73588000 - 0x7fff7358dff7 libunwind.dylib (35.4) <42B7B509-BAFE-365B-893A-72414C92F5BF> /usr/lib/system/libunwind.dylib
0x7fff7358e000 - 0x7fff735c3ffe libxpc.dylib (1738.140.3) <8DA7D88F-AE2F-3BCF-8426-8D041E57A9AA> /usr/lib/system/libxpc.dylib

External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 9122
thread_create: 0
thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=461.1M resident=0K(0%) swapped_out_or_unallocated=461.1M(100%)
Writable regions: Total=293.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=293.0M(100%)

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
Kernel Alloc Once 8K 1
MALLOC 44.1M 15
MALLOC guard page 24K 5
MALLOC_MEDIUM (reserved) 240.0M 2 reserved VM address space (unallocated)
STACK GUARD 56.0M 1
Stack 8192K 1
VM_ALLOCATE 4K 1
__DATA 4635K 88
__DATA_CONST 1208K 32
__LINKEDIT 412.6M 61
__OBJC_RO 32.3M 1
__OBJC_RW 1860K 2
__TEXT 48.7M 82
__UNICODE 564K 1
shared memory 12K 3
=========== ======= =======
TOTAL 850.1M 297
TOTAL, minus reserved VM space 610.1M 297

I tried to edit, but had to reply.

Progress Update: I simplified my PNG output method and rebuilt everything (VTK/OSMesa/LLVM) on the Mac. Using the same VTK script on both systems, Linux definitely uses the OSMesa renderer but I don’t see the same llvm threads or extra CPU utilization on the Mac. But I can avoid crashes as of this writing. I used the vtkGraphicsFactory on the Mac to give it an extra push, but if there are other ways to force or observe the OSMesa/LLVM renderer on a Mac, please let me know. I think I can continue my project with what I have though, which is to use MPI. Thanks.

Software/llvmpipe rendering with g++ is working on the Mac. I had to use Xcode Instruments to see the llvm threads but there is not much difference in run-time for my current scene, but it is working. It took quite a few iterations of and workarounds for lllvm/OSMesa rebuilds to get past the original crash.