Kozea / cairocffi

CFFI-based cairo bindings for Python.
https://doc.courtbouillon.org/cairocffi
BSD 3-Clause "New" or "Revised" License
206 stars 53 forks source link

cairocffi segfaults on MacOSX #73

Closed seehuhn closed 8 years ago

seehuhn commented 8 years ago

Hello,

I am encountering intermittent crashes of cairocffi on MacOSX, often (always?) while the Python program is terminating. Here is one instance of this:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                             0x0000000105fa7365 0 + 4395266917
1   libffi.6.dylib                  0x0000000105f97934 ffi_call_unix64 + 76
2   libffi.6.dylib                  0x0000000105f97264 ffi_call + 836
3   _cffi_backend.cpython-35m-darwin.so 0x0000000105f79e88 cdata_call + 1032
4   org.python.python               0x0000000104da1cd5 PyObject_Call + 97
5   org.python.python               0x0000000104d9edea PyObject_CallFunctionObjArgs + 190
6   _cffi_backend.cpython-35m-darwin.so 0x0000000105f7b6ab cdatagcp_dealloc + 91
7   org.python.python               0x0000000104dd232b dict_dealloc + 120
8   org.python.python               0x0000000104de7fb7 subtype_dealloc + 662
9   org.python.python               0x0000000104dd232b dict_dealloc + 120
10  org.python.python               0x0000000104de7fb7 subtype_dealloc + 662
11  org.python.python               0x0000000104dd232b dict_dealloc + 120
12  org.python.python               0x0000000104df07ea subtype_clear + 145
13  org.python.python               0x0000000104e72c8c collect + 2006
14  org.python.python               0x0000000104e724ad _PyGC_CollectNoFail + 44
15  org.python.python               0x0000000104e5217f PyImport_Cleanup + 693
16  org.python.python               0x0000000104e5c1e6 Py_Finalize + 95
17  org.python.python               0x0000000104e71ea1 Py_Main + 3629
18  org.python.python               0x0000000104d94e27 0x104d93000 + 7719
19  libdyld.dylib                   0x00007fff8cfe15c9 start + 1

My program uses plain Python 3, with numpy and cairocffi as dependencies, and running similar programs which use only numpy seems not to lead to crashes. Thus I suspect the problem must be with cairocffi.

Details:

Any help in debugging this would be most welcome. If you need any other information, please let me know.

Many thanks, Jochen

Process:               Python [3826]
Path:                  /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               3.5.0 (3.5.0)
Code Type:             X86-64 (Native)
Parent Process:        bash [3720]
Responsible:           iTerm [350]
User ID:               501

Date/Time:             2015-09-28 09:42:28.132 +0100
OS Version:            Mac OS X 10.10.5 (14F27)
Report Version:        11
Anonymous UUID:        BAFDA3B0-4853-AE32-0427-7488262C47CD

Time Awake Since Boot: 980 seconds

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

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000105fa7365

VM Regions Near 0x105fa7365:
    VM_ALLOCATE            0000000105f9a000-0000000105f9b000 [    4K] rw-/rwx SM=ALI  
--> 
    MALLOC (admin)         00000001061dc000-00000001061dd000 [    4K] r--/rwx SM=ZER  

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                             0x0000000105fa7365 0 + 4395266917
1   libffi.6.dylib                  0x0000000105f97934 ffi_call_unix64 + 76
2   libffi.6.dylib                  0x0000000105f97264 ffi_call + 836
3   _cffi_backend.cpython-35m-darwin.so 0x0000000105f79e88 cdata_call + 1032
4   org.python.python               0x0000000104da1cd5 PyObject_Call + 97
5   org.python.python               0x0000000104d9edea PyObject_CallFunctionObjArgs + 190
6   _cffi_backend.cpython-35m-darwin.so 0x0000000105f7b6ab cdatagcp_dealloc + 91
7   org.python.python               0x0000000104dd232b dict_dealloc + 120
8   org.python.python               0x0000000104de7fb7 subtype_dealloc + 662
9   org.python.python               0x0000000104dd232b dict_dealloc + 120
10  org.python.python               0x0000000104de7fb7 subtype_dealloc + 662
11  org.python.python               0x0000000104dd232b dict_dealloc + 120
12  org.python.python               0x0000000104df07ea subtype_clear + 145
13  org.python.python               0x0000000104e72c8c collect + 2006
14  org.python.python               0x0000000104e724ad _PyGC_CollectNoFail + 44
15  org.python.python               0x0000000104e5217f PyImport_Cleanup + 693
16  org.python.python               0x0000000104e5c1e6 Py_Finalize + 95
17  org.python.python               0x0000000104e71ea1 Py_Main + 3629
18  org.python.python               0x0000000104d94e27 0x104d93000 + 7719
19  libdyld.dylib                   0x00007fff8cfe15c9 start + 1

Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib          0x00007fff93205232 kevent64 + 10
1   libdispatch.dylib               0x00007fff93e33a6a _dispatch_mgr_thread + 52

Thread 2:
0   libsystem_kernel.dylib          0x00007fff9320494a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8e04c3dd start_wqthread + 13

Thread 3:
0   libsystem_kernel.dylib          0x00007fff9320494a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8e04c3dd start_wqthread + 13

Thread 4:
0   libsystem_kernel.dylib          0x00007fff9320494a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8e04c3dd start_wqthread + 13

Thread 5:
0   libsystem_kernel.dylib          0x00007fff9320494a __workq_kernreturn + 10
1   libsystem_pthread.dylib         0x00007fff8e04c3dd start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00000001062385a8  rcx: 0x00007fff6db7aab0  rdx: 0x00007fff5ae6bec0
  rdi: 0x00007fb31934d000  rsi: 0x00007fff6dbab050  rbp: 0x00007fff5ae6bf30  rsp: 0x00007fff5ae6bf28
   r8: 0x00007fff6dbabfc0   r9: 0x000000000000000a  r10: 0x00007fff5ae6be80  r11: 0x0000000105fa7365
  r12: 0x0000000000000001  r13: 0x00000001062385a0  r14: 0x00007fff7c65c070  r15: 0x0000000000000000
  rip: 0x0000000105fa7365  rfl: 0x0000000000010246  cr2: 0x0000000105fa7365

Logical CPU:     2
Error Code:      0x00000014
Trap Number:     14

Binary Images:
       0x104d93000 -        0x104d94fff +org.python.python (3.5.0 - 3.5.0) <E405313F-010A-341A-A923-C9B4DBC59211> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python
       0x104d97000 -        0x104effff7 +org.python.python (3.5.0, [c] 2001-2015 Python Software Foundation. - 3.5.0) <C81AD58F-E349-31E6-914F-36F66AB4DF98> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/Python
       0x1052d1000 -        0x1052d5fff +math.cpython-35m-darwin.so (0) <CC0CFFF9-2758-3BA3-93C1-96F07B7C05A7> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/math.cpython-35m-darwin.so
       0x10531b000 -        0x10545bff7 +multiarray.cpython-35m-darwin.so (???) <44E8EBF1-93E3-30FF-B0CB-DE938F262E99> /usr/local/lib/python3.5/site-packages/numpy/core/multiarray.cpython-35m-darwin.so
       0x105515000 -        0x10551eff7 +_datetime.cpython-35m-darwin.so (0) <E1EB8393-52CE-32FF-B286-FEB3BC188B89> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_datetime.cpython-35m-darwin.so
       0x105526000 -        0x10558aff7 +umath.cpython-35m-darwin.so (???) <8C90351E-83E7-3FEB-A001-4908FAEB067E> /usr/local/lib/python3.5/site-packages/numpy/core/umath.cpython-35m-darwin.so
       0x105636000 -        0x105637fff +_heapq.cpython-35m-darwin.so (0) <AC3948B3-79DE-3C09-84CA-A919D7042611> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_heapq.cpython-35m-darwin.so
       0x1056dc000 -        0x1056dffff +_struct.cpython-35m-darwin.so (0) <F6F5F136-E89B-3065-AF85-C2BD6361EBEE> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_struct.cpython-35m-darwin.so
       0x1056e6000 -        0x1056f1fff +_pickle.cpython-35m-darwin.so (0) <1FB9D0D8-D01C-3350-895E-CEE389428CB3> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_pickle.cpython-35m-darwin.so
       0x1056fb000 -        0x1056ffff7 +_dotblas.cpython-35m-darwin.so (???) <841EE110-915B-3BD7-92D1-39F8C119E490> /usr/local/lib/python3.5/site-packages/numpy/core/_dotblas.cpython-35m-darwin.so
       0x105743000 -        0x105760fff +scalarmath.cpython-35m-darwin.so (???) <3B8C7BF4-9EDE-386A-8F23-7ED6CEFFB67C> /usr/local/lib/python3.5/site-packages/numpy/core/scalarmath.cpython-35m-darwin.so
       0x1058f0000 -        0x1058f1fff +grp.cpython-35m-darwin.so (0) <7A789D70-4FC4-3BCE-94BE-084793B4165A> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/grp.cpython-35m-darwin.so
       0x1058f4000 -        0x1058f5fff +_bz2.cpython-35m-darwin.so (0) <8F608D05-8755-31D9-94B5-26C4231AD93D> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_bz2.cpython-35m-darwin.so
       0x105939000 -        0x10593cfff +_lzma.cpython-35m-darwin.so (0) <C9075C00-9569-3D2D-8486-49ECA3144C66> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_lzma.cpython-35m-darwin.so
       0x105941000 -        0x10595dff7 +liblzma.5.dylib (0) <8CD2A0DF-4B4E-3C7B-AF46-B8C07555596B> /usr/local/lib/liblzma.5.dylib
       0x105963000 -        0x105966fff +_hashlib.cpython-35m-darwin.so (0) <75A829BB-3989-3520-BD96-DE591DB0D0B9> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_hashlib.cpython-35m-darwin.so
       0x10596a000 -        0x1059a8fff +libssl.1.0.0.dylib (0) <782F3DA1-E630-3220-A243-652B6E186C20> /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
       0x1059c4000 -        0x105b35487 +libcrypto.1.0.0.dylib (0) <AF424CA2-8DBA-3B77-B5A1-A96DA39378E1> /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
       0x105bac000 -        0x105badfff +_random.cpython-35m-darwin.so (0) <DC63EEA7-8E68-3781-9F9F-115D27127AD6> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_random.cpython-35m-darwin.so
       0x105bf0000 -        0x105bf4fff +_compiled_base.cpython-35m-darwin.so (???) <CCDDA959-E605-3C6A-97F1-958758CE47E8> /usr/local/lib/python3.5/site-packages/numpy/lib/_compiled_base.cpython-35m-darwin.so
       0x105bf8000 -        0x105bf9fff +lapack_lite.cpython-35m-darwin.so (???) <24AF05F7-E1B7-35C9-A338-634A0858CF18> /usr/local/lib/python3.5/site-packages/numpy/linalg/lapack_lite.cpython-35m-darwin.so
       0x105bfd000 -        0x105c10ff7 +_umath_linalg.cpython-35m-darwin.so (???) <CABFAB34-71BB-397F-A762-89C38C613B39> /usr/local/lib/python3.5/site-packages/numpy/linalg/_umath_linalg.cpython-35m-darwin.so
       0x105c9c000 -        0x105ca4fff +fftpack_lite.cpython-35m-darwin.so (???) <0D3A2204-CDDA-3E1B-BAFC-E657E16C4FB0> /usr/local/lib/python3.5/site-packages/numpy/fft/fftpack_lite.cpython-35m-darwin.so
       0x105ce8000 -        0x105d48ff7 +mtrand.cpython-35m-darwin.so (???) <1D75DA75-C76C-3F55-B132-7EE4252C3A84> /usr/local/lib/python3.5/site-packages/numpy/random/mtrand.cpython-35m-darwin.so
       0x105d9d000 -        0x105dacfff +_ctypes.cpython-35m-darwin.so (0) <B3840DC1-A5E5-3D85-8C89-09C425ED13B4> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_ctypes.cpython-35m-darwin.so
       0x105f1f000 -        0x105f20fff +_posixsubprocess.cpython-35m-darwin.so (0) <2847EBA0-0B12-3AD1-B61B-3A53BE97A29E> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/_posixsubprocess.cpython-35m-darwin.so
       0x105f23000 -        0x105f26fff +select.cpython-35m-darwin.so (0) <31390ED9-5880-323F-A2B3-5E425CF2FE5B> /usr/local/Cellar/python3/3.5.0/Frameworks/Python.framework/Versions/3.5/lib/python3.5/lib-dynload/select.cpython-35m-darwin.so
       0x105f6b000 -        0x105f7fff7 +_cffi_backend.cpython-35m-darwin.so (0) <36757BB5-6312-30D9-AD83-EE68DEA613F0> /usr/local/lib/python3.5/site-packages/_cffi_backend.cpython-35m-darwin.so
       0x105f92000 -        0x105f97fff +libffi.6.dylib (0) <96B06D41-55D6-35B0-9A25-8328B24A8CCB> /usr/local/opt/libffi/lib/libffi.6.dylib
    0x7fff6db6b000 -     0x7fff6dba1887  dyld (353.2.3) <B1B370A5-479F-3533-8AD7-97B687D4F989> /usr/lib/dyld
    0x7fff8bc75000 -     0x7fff8bc86ff7  libz.1.dylib (55) <88C7C7DE-04B8-316F-8B74-ACD9F3DE1AA1> /usr/lib/libz.1.dylib
    0x7fff8bc87000 -     0x7fff8bce1ff7  com.apple.LanguageModeling (1.0 - 1) <ACA93FE0-A0E3-333E-AE3C-8EB7DE5F362F> /System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling
    0x7fff8bd8a000 -     0x7fff8be7afef  libJP2.dylib (1239) <A2238936-B354-399A-B0C8-FB8A29AE9A82> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib
    0x7fff8be7b000 -     0x7fff8beefffb  com.apple.securityfoundation (6.0 - 55126) <AC8ED0BD-32F0-3EB8-B7B2-9AA14E07E8AB> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation
    0x7fff8c21b000 -     0x7fff8c21cff3  libSystem.B.dylib (1213) <1866C519-C5F3-3D09-8C17-A8F703664521> /usr/lib/libSystem.B.dylib
    0x7fff8c21d000 -     0x7fff8c28cfff  com.apple.SearchKit (1.4.0 - 1.4.0) <80883BD1-C9BA-3794-A20E-476F94DD89A9> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
    0x7fff8c2c5000 -     0x7fff8c2d5ff7  libbsm.0.dylib (34) <A3A2E56C-2B65-37C7-B43A-A1F926E1A0BB> /usr/lib/libbsm.0.dylib
    0x7fff8c2de000 -     0x7fff8c30dff7  com.apple.CoreServicesInternal (221.7.2 - 221.7.2) <B93D4775-149C-3698-B38C-9C50673D455C> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal
    0x7fff8c74d000 -     0x7fff8c7c6fe7  libcorecrypto.dylib (233.30.1) <5779FFA0-4D9A-3AD4-B7F2-618227621DC8> /usr/lib/system/libcorecrypto.dylib
    0x7fff8c879000 -     0x7fff8c87bfff  libsystem_sandbox.dylib (358.20.5) <3F5E973F-C702-31AC-97BC-05F5C195683C> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff8c946000 -     0x7fff8c952fff  com.apple.speech.synthesis.framework (5.3.11 - 5.3.11) <DFC7FD85-F1B0-317C-8513-722570CB8FB9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis
    0x7fff8cae4000 -     0x7fff8cafaff7  libsystem_asl.dylib (267) <F153AC5B-0542-356E-88C8-20A62CA704E2> /usr/lib/system/libsystem_asl.dylib
    0x7fff8cafb000 -     0x7fff8cafffff  libCoreVMClient.dylib (79.1) <201EF6DF-5074-3CB7-A361-398CF957A264> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib
    0x7fff8cc8b000 -     0x7fff8ce9bff7  com.apple.CFNetwork (720.5.7 - 720.5.7) <A47D7DD2-5903-39D0-8D27-5A7E2D119D84> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
    0x7fff8cf8a000 -     0x7fff8cfdbfff  com.apple.audio.CoreAudio (4.3.0 - 4.3.0) <450293F7-DAE7-3DD0-8F7C-71FC2FD72627> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
    0x7fff8cfdc000 -     0x7fff8cfddff7  libsystem_blocks.dylib (65) <9615D10A-FCA7-3BE4-AA1A-1B195DACE1A1> /usr/lib/system/libsystem_blocks.dylib
    0x7fff8cfde000 -     0x7fff8cfe1ff7  libdyld.dylib (353.2.3) <CFBBE540-D503-3AFC-B5D6-644F1E69949B> /usr/lib/system/libdyld.dylib
    0x7fff8d3ee000 -     0x7fff8d3f0fff  libCVMSPluginSupport.dylib (11.1.2) <1C5C1757-67F1-3C23-90EF-643619A0E7DC> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib
    0x7fff8e04b000 -     0x7fff8e054fff  libsystem_pthread.dylib (105.40.1) <ACE90967-ECD0-3251-AEEB-461E3C6414F7> /usr/lib/system/libsystem_pthread.dylib
    0x7fff8e0ea000 -     0x7fff8e0f3ff3  com.apple.CommonAuth (4.0 - 2.0) <9A484EE6-0003-3AB1-AE4F-AA543BBBF53F> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth
    0x7fff8e138000 -     0x7fff8e184ff7  libcups.2.dylib (408.2) <E8AD18F9-61E4-3791-B840-504468C25556> /usr/lib/libcups.2.dylib
    0x7fff8ea29000 -     0x7fff8ea2effb  libheimdal-asn1.dylib (398.40.1) <7D2BE3DE-60F7-3A6E-A92E-DA0EF9D3417E> /usr/lib/libheimdal-asn1.dylib
    0x7fff8eb46000 -     0x7fff8eb48fff  libRadiance.dylib (1239) <594FD1C9-2041-3877-9AD2-0A977EBBB1D0> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib
    0x7fff8eb9d000 -     0x7fff8ebb9ff7  libsystem_malloc.dylib (53.30.1) <DDA8928B-CC0D-3255-BD8A-3FEA0982B890> /usr/lib/system/libsystem_malloc.dylib
    0x7fff8ebba000 -     0x7fff8ebc2fff  libsystem_dnssd.dylib (576.30.4) <0CEB5910-843F-315C-A1DE-5D955A48A045> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff8ecea000 -     0x7fff8ed0ffff  libPng.dylib (1239) <0F0DDDBD-E508-377D-859F-14D11D019705> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
    0x7fff8ef41000 -     0x7fff8ef41fff  com.apple.Accelerate.vecLib (3.10 - vecLib 3.10) <9D749502-A228-3BF1-B52F-A182DEEB2C4D> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
    0x7fff8ef75000 -     0x7fff8ef7dffb  libcopyfile.dylib (118.1.2) <0C68D3A6-ACDD-3EF3-991A-CC82C32AB836> /usr/lib/system/libcopyfile.dylib
    0x7fff8ef89000 -     0x7fff8efa4fff  com.apple.AppleVPAFramework (1.4.5 - 1.4.5) <A6421B0B-6D4D-3E64-AC61-DDB04ED7CFF0> /System/Library/PrivateFrameworks/AppleVPA.framework/Versions/A/AppleVPA
    0x7fff8f04b000 -     0x7fff8f0d7fe7  libsystem_c.dylib (1044.40.1) <F0635E0F-FE4B-34DB-ACF9-A58C1E9070E9> /usr/lib/system/libsystem_c.dylib
    0x7fff8f0d8000 -     0x7fff8f0d8ff7  liblaunch.dylib (559.40.1) <4F81CA3A-D2CE-3030-A89D-42F3DAD7BA8F> /usr/lib/system/liblaunch.dylib
    0x7fff8f445000 -     0x7fff8f480fff  com.apple.QD (301 - 301) <C4D2AD03-B839-350A-AAF0-B4A08F8BED77> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
    0x7fff8f70c000 -     0x7fff8f70fffb  libCGXType.A.dylib (788.3) <7CC6CD5B-AD6B-3B36-9165-BFB1E5274F69> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib
    0x7fff8f7b2000 -     0x7fff8f8cbffb  com.apple.CoreText (352.0 - 454.10) <3293BF91-B587-3B49-A159-A04D58533F14> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText
    0x7fff8f988000 -     0x7fff8fd95ff7  libLAPACK.dylib (1128) <F9201AE7-B031-36DB-BCF8-971E994EF7C1> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
    0x7fff8ff26000 -     0x7fff8ff2ffff  libGFXShared.dylib (11.1.2) <7F9F6175-E993-3014-8C9B-1F08CE7C75A2> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib
    0x7fff901df000 -     0x7fff901ecff7  libbz2.1.0.dylib (36) <2DF83FBC-5C08-39E1-94F5-C28653791B5F> /usr/lib/libbz2.1.0.dylib
    0x7fff9027f000 -     0x7fff90284fff  com.apple.DiskArbitration (2.6 - 2.6) <0DFF4D9B-2AC3-3B82-B5C5-30F4EFBD2DB9> /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
    0x7fff90a34000 -     0x7fff90b46ff7  libvDSP.dylib (516) <151B3CCB-77D3-3715-A3D0-7C74CD5C7FFC> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
    0x7fff90b47000 -     0x7fff90b7ffff  libsystem_network.dylib (412.20.3) <6105C134-6722-3C0A-A4CE-5E1261E2E1CC> /usr/lib/system/libsystem_network.dylib
    0x7fff90d03000 -     0x7fff90d1bff7  libexpat.1.dylib (12) <C5FE8836-E277-3162-9D15-6735321CB2C6> /usr/lib/libexpat.1.dylib
    0x7fff90d2c000 -     0x7fff90d2cfff  com.apple.CoreServices (62 - 62) <C69DA8A7-B536-34BF-A93F-1C170E2C6D58> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
    0x7fff90d2d000 -     0x7fff90d5dfff  libsystem_m.dylib (3086.1) <1E12AB45-6D96-36D0-A226-F24D9FB0D9D6> /usr/lib/system/libsystem_m.dylib
    0x7fff90d80000 -     0x7fff90d88ff3  com.apple.CoreServices.FSEvents (1210.20.1 - 1210.20.1) <84F79D3E-7B5E-3C93-8479-35794A3F125E> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents
    0x7fff90d89000 -     0x7fff90d90fff  com.apple.NetFS (6.0 - 4.0) <C263C8F8-F284-3101-AC82-A97A81716063> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS
    0x7fff90db6000 -     0x7fff910d1fcf  com.apple.vImage (8.0 - 8.0) <1183FE6A-FDB6-3B3B-928D-50C7909F2308> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
    0x7fff91215000 -     0x7fff91215ff7  libunc.dylib (29) <5676F7EA-C1DF-329F-B006-D2C3022B7D70> /usr/lib/system/libunc.dylib
    0x7fff91481000 -     0x7fff914efff3  com.apple.Heimdal (4.0 - 2.0) <8D1667CF-D454-3E07-A58E-E15591B5A95E> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal
    0x7fff914f2000 -     0x7fff9153fff7  com.apple.print.framework.PrintCore (10.3 - 451.1) <DE992474-0841-38A1-B4F6-46D653E454D5> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore
    0x7fff91545000 -     0x7fff91545ff7  libkeymgr.dylib (28) <77845842-DE70-3CC5-BD01-C3D14227CED5> /usr/lib/system/libkeymgr.dylib
    0x7fff915d4000 -     0x7fff915d7fff  com.apple.xpc.ServiceManagement (1.0 - 1) <A95A15CD-3B21-3513-AFF8-1D7DE3DBFA12> /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement
    0x7fff915d8000 -     0x7fff915f1ff7  com.apple.CFOpenDirectory (10.10 - 187) <3FCEE6F7-A8C6-3222-B22D-8AD290E477E2> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory
    0x7fff91971000 -     0x7fff91c58ffb  com.apple.CoreServices.CarbonCore (1108.6 - 1108.6) <8953580E-7857-33B2-AA64-98296830D3A8> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
    0x7fff91c6b000 -     0x7fff91c85ff7  com.apple.Kerberos (3.0 - 1) <7760E0C2-A222-3709-B2A6-B692D900CEB1> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos
    0x7fff91cfb000 -     0x7fff91d01fff  libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib
    0x7fff91d2a000 -     0x7fff91d85fe7  libTIFF.dylib (1239) <568B04C1-118C-3E22-87E5-E1FF7AAE589C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib
    0x7fff91ebd000 -     0x7fff91f35ff7  com.apple.SystemConfiguration (1.14.4 - 1.14) <3DFFD7F7-BD23-3F4C-A209-C4A0D99F6573> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff91f3f000 -     0x7fff92272ff7  libmecabra.dylib (666.7) <0ED8AE5E-7A5B-34A6-A2EE-2B852E60E1E2> /usr/lib/libmecabra.dylib
    0x7fff923c9000 -     0x7fff923cafff  libsystem_secinit.dylib (18) <581DAD0F-6B63-3A48-B63B-917AF799ABAA> /usr/lib/system/libsystem_secinit.dylib
    0x7fff923e1000 -     0x7fff923e4fff  com.apple.IOSurface (97.4 - 97.4) <AE11CFBC-4D46-30F3-BEEC-4C8131079391> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface
    0x7fff92449000 -     0x7fff92489ff7  libGLImage.dylib (11.1.2) <9B05F3BF-D111-3B01-B7F8-C5EF7E02000B> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib
    0x7fff924b7000 -     0x7fff92501fff  com.apple.HIServices (1.22 - 523) <E2F3C5FF-8C50-3E4F-BE63-77A700466663> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices
    0x7fff92502000 -     0x7fff92503ffb  libremovefile.dylib (35) <3485B5F4-6CE8-3C62-8DFD-8736ED6E8531> /usr/lib/system/libremovefile.dylib
    0x7fff92599000 -     0x7fff92727fff  libBLAS.dylib (1128) <497912C1-A98E-3281-BED7-E9C751552F61> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
    0x7fff92728000 -     0x7fff92739ff3  libsystem_coretls.dylib (35.40.1) <155DA0A9-2046-332E-BFA3-D7974A51F731> /usr/lib/system/libsystem_coretls.dylib
    0x7fff9273a000 -     0x7fff927a1ffb  com.apple.datadetectorscore (6.0 - 396.1.2) <D04A8016-B2AD-33A2-8A8E-5793968A8370> /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore
    0x7fff927a2000 -     0x7fff92a18ff7  com.apple.security (7.0 - 57031.40.6) <FCCCC4FD-043A-30CA-9997-4211CA0E9297> /System/Library/Frameworks/Security.framework/Versions/A/Security
    0x7fff92a19000 -     0x7fff92a41fff  libsystem_info.dylib (459.40.1) <2E16C4B3-A327-3957-9C41-143911979A1E> /usr/lib/system/libsystem_info.dylib
    0x7fff92a65000 -     0x7fff92b9ffff  com.apple.ImageIO.framework (3.3.0 - 1239) <6033D915-B9A2-3F21-8F35-2E18EF66CA6F> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
    0x7fff92ba0000 -     0x7fff92babff7  libkxld.dylib (2782.40.9) <2ADAE067-78A0-371E-A5A8-1E7C892D193C> /usr/lib/system/libkxld.dylib
    0x7fff92e5a000 -     0x7fff92eb9fff  com.apple.AE (681.5 - 681.7) <2BF39455-1CDD-392C-824A-9972C6B1FB57> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE
    0x7fff92f1c000 -     0x7fff93010fff  libFontParser.dylib (134.7) <C49EDC56-A82A-39EF-9F20-C2342E4188ED> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib
    0x7fff93012000 -     0x7fff93158fef  libsqlite3.dylib (168.2) <53F6A294-15D7-3804-9ABF-47D35E15CDFB> /usr/lib/libsqlite3.dylib
    0x7fff931de000 -     0x7fff931edfff  com.apple.LangAnalysis (1.7.0 - 1.7.0) <D1E527E4-C561-352F-9457-E8C50232793C> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis
    0x7fff931ee000 -     0x7fff9320bfff  libsystem_kernel.dylib (2782.40.9) <16AD15EF-3DAE-3F63-9D26-26CCE1920762> /usr/lib/system/libsystem_kernel.dylib
    0x7fff93218000 -     0x7fff93243ff3  libarchive.2.dylib (30) <8CBB4416-EBE9-3574-8ADC-44655D245F39> /usr/lib/libarchive.2.dylib
    0x7fff9325d000 -     0x7fff93286ffb  libxslt.1.dylib (13) <AED1143F-B848-3E73-81ED-71356F25F084> /usr/lib/libxslt.1.dylib
    0x7fff93287000 -     0x7fff9328cff7  libmacho.dylib (862) <126CA2ED-DE91-308F-8881-B9DAEC3C63B6> /usr/lib/system/libmacho.dylib
    0x7fff933ba000 -     0x7fff933defef  libJPEG.dylib (1239) <75667D4A-9359-3178-9D3A-2AE5A60DE55F> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib
    0x7fff93491000 -     0x7fff93493ff7  libsystem_coreservices.dylib (9) <41B7C578-5A53-31C8-A96F-C73E030B0938> /usr/lib/system/libsystem_coreservices.dylib
    0x7fff93494000 -     0x7fff93494fff  libOpenScriptingUtil.dylib (162.2) <D6A2216D-ADB2-3F24-AD30-F6D00829F545> /usr/lib/libOpenScriptingUtil.dylib
    0x7fff93495000 -     0x7fff9349dfff  libsystem_platform.dylib (63) <64E34079-D712-3D66-9CE2-418624A5C040> /usr/lib/system/libsystem_platform.dylib
    0x7fff935b8000 -     0x7fff93950ff7  com.apple.CoreFoundation (6.9 - 1153.18) <5C0892B8-9691-341F-9279-CA3A74D59AA0> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff93ad7000 -     0x7fff93bfbff7  com.apple.LaunchServices (644.56 - 644.56) <20AABB1C-9319-3E4D-A024-51B0DD5FCD3B> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices
    0x7fff93c8b000 -     0x7fff93df2ffb  com.apple.audio.toolbox.AudioToolbox (1.12 - 1.12) <5678FC94-456A-3F5F-BA9A-10EB6E462997> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox
    0x7fff93e2f000 -     0x7fff93e59ff7  libdispatch.dylib (442.1.4) <502CF32B-669B-3709-8862-08188225E4F0> /usr/lib/system/libdispatch.dylib
    0x7fff93e5a000 -     0x7fff93eefff7  com.apple.ColorSync (4.9.0 - 4.9.0) <9150C2B7-2E6E-3509-96EA-7B3F959F049E> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync
    0x7fff93ef0000 -     0x7fff93ef9ff7  libsystem_notify.dylib (133.1.1) <61147800-F320-3DAA-850C-BADF33855F29> /usr/lib/system/libsystem_notify.dylib
    0x7fff93efa000 -     0x7fff93f08ff7  com.apple.opengl (11.1.2 - 11.1.2) <5F355713-4637-33CD-9CBA-4B4CA43FB0FE> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
    0x7fff93f76000 -     0x7fff93f7aff7  libGIF.dylib (1239) <FEC02C42-A490-3DBC-9D4E-5B4AAA62722C> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib
    0x7fff93f7b000 -     0x7fff93f7ffff  libcache.dylib (69) <45E9A2E7-99C4-36B2-BEE3-0C4E11614AD1> /usr/lib/system/libcache.dylib
    0x7fff93f9c000 -     0x7fff93f9dfff  liblangid.dylib (117) <B54A4AA0-2E53-3671-90F5-AFF711C0EB9E> /usr/lib/liblangid.dylib
    0x7fff93f9e000 -     0x7fff947dfff3  com.apple.CoreGraphics (1.600.0 - 788.3) <0AAD1F22-9823-3D31-A25B-F8C1D7915AC4> /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics
    0x7fff94888000 -     0x7fff948b3ff7  com.apple.DictionaryServices (1.2 - 229.1) <62EC3E1B-5A28-3252-90FF-C2E9999C2A2A> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
    0x7fff948b4000 -     0x7fff948bffff  libcommonCrypto.dylib (60061.30.1) <E789748D-F9A7-3CFF-B317-90DF348B1E95> /usr/lib/system/libcommonCrypto.dylib
    0x7fff948c0000 -     0x7fff94932fff  com.apple.framework.IOKit (2.0.2 - 1050.20.2) <09C0518C-90DF-3FC3-96D6-34D35F72C8EF> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
    0x7fff94999000 -     0x7fff94a37fff  com.apple.Metadata (10.7.0 - 917.36) <00C4CB5D-E723-3612-84E0-439098392CDD> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
    0x7fff94a38000 -     0x7fff94d69fff  com.apple.Foundation (6.9 - 1154) <49EE64E1-9F53-35D1-A481-2EFE2789B254> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
    0x7fff94d73000 -     0x7fff94d9efff  libc++abi.dylib (125) <88A22A0F-87C6-3002-BFBA-AC0F2808B8B9> /usr/lib/libc++abi.dylib
    0x7fff94dba000 -     0x7fff94dbbfff  libDiagnosticMessagesClient.dylib (100) <2EE8E436-5CDC-34C5-9959-5BA218D507FB> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff94f54000 -     0x7fff94f56fff  libquarantine.dylib (76.20.1) <7AF90041-2768-378A-925A-D83161863642> /usr/lib/system/libquarantine.dylib
    0x7fff94f77000 -     0x7fff94f7bfff  libpam.2.dylib (20) <E805398D-9A92-31F8-8005-8DC188BD8B6E> /usr/lib/libpam.2.dylib
    0x7fff94fe2000 -     0x7fff94ff9ff7  libLinearAlgebra.dylib (1128) <E78CCBAA-A999-3B65-8EC9-06DB15E67C37> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
    0x7fff950e4000 -     0x7fff950feff7  liblzma.5.dylib (7) <1D03E875-A7C0-3028-814C-3C27F7B7C079> /usr/lib/liblzma.5.dylib
    0x7fff95c81000 -     0x7fff95c9effb  libresolv.9.dylib (57) <26B38E61-298A-3C3A-82C1-3B5E98AD5E29> /usr/lib/libresolv.9.dylib
    0x7fff95ce0000 -     0x7fff95d21fff  libGLU.dylib (11.1.2) <2BA52A8D-ED35-3D86-B2D6-41479969C96D> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib
    0x7fff95d3d000 -     0x7fff95ddce27  com.apple.AppleJPEG (1.0 - 1) <6627DDD9-A8FE-3968-B23A-B6A29AA3919A> /System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG
    0x7fff96455000 -     0x7fff96504fe7  libvMisc.dylib (516) <6739E390-46E7-3BFA-9B69-B278562326E6> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
    0x7fff9651d000 -     0x7fff9651ffff  libsystem_configuration.dylib (699.40.2) <56F94DCE-DBDE-3615-8F07-DE6270D9F8BE> /usr/lib/system/libsystem_configuration.dylib
    0x7fff975d2000 -     0x7fff975d9ff7  libcompiler_rt.dylib (35) <BF8FC133-EE10-3DA6-9B90-92039E28678F> /usr/lib/system/libcompiler_rt.dylib
    0x7fff97629000 -     0x7fff976a7fff  com.apple.CoreServices.OSServices (640.4 - 640.4) <BE8DF749-84BA-3029-AE1D-32F3993A78A4> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
    0x7fff976f9000 -     0x7fff97706fff  libxar.1.dylib (255) <7CD69BB5-97BA-3858-8A8B-2F33F129E6E7> /usr/lib/libxar.1.dylib
    0x7fff9844a000 -     0x7fff9864446f  libobjc.A.dylib (647) <759E155D-BC42-3D4E-869B-6F57D477177C> /usr/lib/libobjc.A.dylib
    0x7fff991a4000 -     0x7fff99215ffb  com.apple.ApplicationServices.ATS (360 - 375.4) <A1BEBCF8-8FC8-345D-B91D-1DA5773AF5A3> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS
    0x7fff9924f000 -     0x7fff99295ff7  libauto.dylib (186) <A260789B-D4D8-316A-9490-254767B8A5F1> /usr/lib/libauto.dylib
    0x7fff99308000 -     0x7fff99323ff7  libCRFSuite.dylib (34) <D64842BE-7BD4-3D0C-9842-1D202F7C2A51> /usr/lib/libCRFSuite.dylib
    0x7fff9944c000 -     0x7fff99450fff  com.apple.TCC (1.0 - 1) <CCA42EE2-3400-3444-9486-BC454E60D944> /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC
    0x7fff99451000 -     0x7fff99471ff7  com.apple.MultitouchSupport.framework (264.6 - 264.6) <1539F1F6-6334-37F3-9C52-02EFFBF4835D> /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport
    0x7fff99472000 -     0x7fff99483fff  libcmph.dylib (1) <46EC3997-DB5E-38AE-BBBB-A035A54AD3C0> /usr/lib/libcmph.dylib
    0x7fff99484000 -     0x7fff994caff7  libFontRegistry.dylib (134.1) <CE41D8C2-BEED-345C-BC4F-3775CC06C672> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib
    0x7fff994cb000 -     0x7fff995bdff3  libxml2.2.dylib (26.1) <3FBA890F-2850-3A45-87EA-DB6892BDEB60> /usr/lib/libxml2.2.dylib
    0x7fff995be000 -     0x7fff99612fff  libc++.1.dylib (120) <1B9530FD-989B-3174-BB1C-BDC159501710> /usr/lib/libc++.1.dylib
    0x7fff99b9a000 -     0x7fff99ba5fff  libGL.dylib (11.1.2) <FD8B7B67-1532-32A1-B369-9D7A6C1EB3ED> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
    0x7fff99be2000 -     0x7fff99dc7ff7  libicucore.A.dylib (531.48) <3CD34752-B1F9-31D2-865D-B5B0F0BE3111> /usr/lib/libicucore.A.dylib
    0x7fff99f8d000 -     0x7fff99f8ffff  com.apple.loginsupport (1.0 - 1) <DAAD7013-A19D-3858-BFF7-DE1DAF664401> /System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport
    0x7fff99f90000 -     0x7fff99f90fff  com.apple.Accelerate (1.10 - Accelerate 1.10) <2C8AF258-4F11-3BEC-A826-22D7199B3975> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
    0x7fff99f91000 -     0x7fff99f9dff7  com.apple.OpenDirectory (10.10 - 187) <D993F138-DAD1-3640-94DE-8C9FEFBF158D> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory
    0x7fff99f9e000 -     0x7fff99fa3ff7  libunwind.dylib (35.3) <BE7E51A0-B6EA-3A54-9CCA-9D88F683A6D6> /usr/lib/system/libunwind.dylib
    0x7fff99fa4000 -     0x7fff99fa4fff  com.apple.ApplicationServices (48 - 48) <5BF7910B-C328-3BF8-BA4F-CE52B574CE01> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
    0x7fff9a6c0000 -     0x7fff9a6caff7  com.apple.NetAuth (5.2 - 5.2) <2BBD749A-8E18-35B8-8E48-A90347C1CCA7> /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth
    0x7fff9a6cb000 -     0x7fff9a6f8fff  com.apple.CoreVideo (1.8 - 145.1) <18DB07E0-B927-3260-A234-636F298D1917> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo
    0x7fff9a6f9000 -     0x7fff9a978ff7  com.apple.CoreData (111 - 526.3) <5A27E0D8-5E5A-335B-B3F6-2601C7B976FA> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
    0x7fff9a9c4000 -     0x7fff9a9f4ff3  com.apple.GSS (4.0 - 2.0) <97F2A028-44CF-3188-B863-F4EEB39CBDBD> /System/Library/Frameworks/GSS.framework/Versions/A/GSS
    0x7fff9a9f5000 -     0x7fff9a9fbff7  libsystem_networkextension.dylib (167.40.3) <BA58B30B-8377-3B0A-8AE3-4F84021D9D4E> /usr/lib/system/libsystem_networkextension.dylib
    0x7fff9b285000 -     0x7fff9b28afff  libsystem_stats.dylib (163.30.2) <D0E96837-3CF6-323D-B711-6DF6F660E530> /usr/lib/system/libsystem_stats.dylib
    0x7fff9b28b000 -     0x7fff9b37dff7  libiconv.2.dylib (42) <2A06D02F-8B76-3864-8D96-64EF5B40BC6C> /usr/lib/libiconv.2.dylib
    0x7fff9b3db000 -     0x7fff9b403fff  libxpc.dylib (559.40.1) <5C829202-962E-3744-8B50-00D38CC88E84> /usr/lib/system/libxpc.dylib
    0x7fff9b599000 -     0x7fff9b5b3ff7  libextension.dylib (55.2) <3BB019CA-199A-36AC-AA22-14B562138545> /usr/lib/libextension.dylib

External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 1
    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: 393
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=147.3M resident=146.4M(99%) swapped_out_or_unallocated=904K(1%)
Writable regions: Total=99.7M written=14.1M(14%) resident=16.9M(17%) swapped_out=0K(0%) unallocated=82.8M(83%)

REGION TYPE                      VIRTUAL
===========                      =======
Dispatch continuations             16.0M
Kernel Alloc Once                     4K
MALLOC                             64.2M
MALLOC (admin)                       32K
MALLOC_LARGE (reserved)             512K        reserved VM address space (unallocated)
STACK GUARD                          24K
Stack                              18.1M
VM_ALLOCATE                         348K
__DATA                             7388K
__LINKEDIT                         72.8M
__TEXT                             74.5M
__UNICODE                           552K
mapped file                        28.2M
shared memory                         4K
===========                      =======
TOTAL                             282.5M
TOTAL, minus reserved VM space    282.0M

Model: MacBookPro11,4, BootROM MBP114.0172.B04, 4 processors, Intel Core i7, 2.5 GHz, 16 GB, SMC 2.29f24
Graphics: Intel Iris Pro, Intel Iris Pro, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1600 MHz, 0x802C, 0x31364B544631473634485A2D314736453120
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x152), Broadcom BCM43xx 1.0 (7.15.166.24.3)
Bluetooth: Version 4.3.6f3 16238, 3 services, 27 devices, 1 incoming serial ports
Network Service: USB Ethernet, Ethernet, en4
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0512G, 500.28 GB
USB Device: Internal Memory Card Reader
USB Device: Apple Internal Keyboard / Trackpad
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1
SimonSapin commented 8 years ago

Could you add this somewhere in the program? import faulthandler; faulthandler.enable() It should print a Python stack trace when crashing, which hopefully will hint at where in the code the problem is.

seehuhn commented 8 years ago

I tried, but not much luck:

voss@flammeri [..roject/jvplot] ./demo1.py
Fatal Python error: Segmentation fault

Current thread 0x00007fff76eba300 (most recent call first):
Segmentation fault: 11
voss@flammeri [..roject/jvplot] cat demo1.py
#! /usr/bin/env python3
import faulthandler; faulthandler.enable()

import numpy as np

from jvplot import Plot

with Plot('demo1.pdf', '4.5in', '4.5in') as fig:
    fig.scatter_plot(np.random.rand(100),
                     np.random.rand(100),
                     aspect=1,
                     margin="1cm")
seehuhn commented 8 years ago

The problem seems to happen during tear-down: if I add a print statement in the last line of the script, this is still executed before the crash. Also, I simplified the code to not use the with statement, and the crash still occurs:

voss@flammeri [..roject/jvplot] ./demo1.py
done
Fatal Python error: Segmentation fault

Current thread 0x00007fff76eba300 (most recent call first):
Segmentation fault: 11
voss@flammeri [..roject/jvplot] cat demo1.py
#! /usr/bin/env python3
import faulthandler; faulthandler.enable()

from jvplot import Plot

fig = Plot('demo1.pdf', '4.5in', '4.5in')
fig.scatter_plot([1,2,3], [1,2,3], aspect=1, margin="1cm")
fig.close()
print("done")

Note that the print("done") did indeed produce output.

SimonSapin commented 8 years ago

By any chance, do any of these libraries use thread locals? Try CFFI master, in case this is https://bitbucket.org/cffi/cffi/issues/223/threadinglocal-segfaults-in-ffigc-callback

If it’s not, I’m out of ideas and I’m afraid you’re gonna need a C debugger to find out where that null pointer comes from. Sounds like something where rr’s “time travel debugging” might help.

seehuhn commented 8 years ago

Hi Simon,

I experimented a bit, and the problem is really hard to nail down. I have now a single script which only imports numpy and cairocffi, and still exhibits the crash. But small changes to this script, e.g. removing some unused elements from a dictionary stored in a global variable, makes the crash disappear. I suspect the problem either depends on timing, or on details of the memory layout.

On 29 Sep 2015, at 14:00, Simon Sapin wrote:

By any chance, do any of these libraries use thread locals? Try CFFI master, in case this is https://bitbucket.org/cffi/cffi/issues/223/threadinglocal-segfaults-in-ffigc-callback

Ok, I'll try this next.

If it’s not, I’m out of ideas and I’m afraid you’re gonna need a C debugger to find out where that null pointer comes from. Sounds like something where rr’s “time travel debugging” might help.

Probably this will require to compile a version of Python with debug symbols included?

By the way: the invalid pointer is not a null pointer, but points just behind the valid range. If I read the MacOS X crash dump correctly, at the time of the crash valid addresses were 105f9a000-105f9b000 and 1061dc000-1061dd000, and the program tries to access 105fa7365 which is in the gap between the two regions. Maybe some use-after-free?

I'll enquire and report back if I find out anything more.

Many thanks,

Jochen

http://seehuhn.de/

SimonSapin commented 8 years ago

I have now a single script which only imports numpy and cairocffi, and still exhibits the crash.

Can you copy that script here?

seehuhn commented 8 years ago

On 30 Sep 2015, at 15:49, Simon Sapin wrote:

I have now a single script which only imports numpy and cairocffi, and still exhibits the crash.

Can you copy that script here?

It's on the computer at home, I'll send it tonight.

seehuhn commented 8 years ago

Here is the script which crashes for me: https://gist.github.com/seehuhn/39a13ef38813d8c10c2f . This was obtained by copying all my code into one file, and removing bits until the crash disappeared. I have reached a dead end with this, though: nearly every modification makes the crash disappear for me, now. For example:

SimonSapin commented 8 years ago

I could reproduce the segfault on CPython 3.4, but not on 2.7, 3.2, or 3.3. (The program terminates normally.)

SimonSapin commented 8 years ago

Since the segfault happens after print("done") and involves libffi, it might be in the destructor of an object returned by ffi.gc.

I tried replace all ffi.gc(some_pointer, some_function) calls in cairocffi by ffi.gc(some_pointer, logging(some_function)), and add:

def logging(f):
    def wrapper(arg):
        print(f, arg)
        return f(arg)
    return wrapper

… but then the program terminated without segfault.

Here is the stack trace I get in gdb:

#0  0x00007ffff1dcec90 in ?? ()
#1  0x00007ffff2ea11f0 in ffi_call_unix64 () from /usr/lib/libffi.so.6
#2  0x00007ffff2ea0c58 in ffi_call () from /usr/lib/libffi.so.6
#3  0x00007ffff26cc5f3 in cdata_call (cd=0x7ffff37ea788, args=<optimized out>, kwds=<optimized out>) at c/_cffi_backend.c:2536
#4  0x00007ffff79a3efb in PyObject_Call (func=func@entry=0x7ffff37ea788, arg=arg@entry=0x7ffff6a43908, kw=kw@entry=0x0)
    at Objects/abstract.c:2040
#5  0x00007ffff79a4ba0 in PyObject_CallFunctionObjArgs (callable=callable@entry=0x7ffff37ea788) at Objects/abstract.c:2332
#6  0x00007ffff26c151e in gc_wref_remove (ffi_wref_tup=<optimized out>, key=0x7ffff57119f8) at c/cgc.c:38
#7  0x00007ffff79a3efb in PyObject_Call (func=func@entry=0x7ffff29a8f88, arg=arg@entry=0x7ffff6a3d0b8, kw=kw@entry=0x0)
    at Objects/abstract.c:2040
#8  0x00007ffff79a4ba0 in PyObject_CallFunctionObjArgs (callable=callable@entry=0x7ffff29a8f88) at Objects/abstract.c:2332
#9  0x00007ffff7a3b25a in handle_callback (ref=ref@entry=0x7ffff57119f8, callback=callback@entry=0x7ffff29a8f88)
    at Objects/weakrefobject.c:868
#10 0x00007ffff7a3e8a2 in PyObject_ClearWeakRefs (object=object@entry=0x7ffff2e57e40) at Objects/weakrefobject.c:915
#11 0x00007ffff26bff30 in cdata_dealloc (cd=0x7ffff2e57e40) at c/_cffi_backend.c:1533
#12 0x00007ffff79e1027 in dict_dealloc (mp=0x7ffff6ba6888) at Objects/dictobject.c:1383
#13 0x00007ffff79fbd23 in subtype_dealloc (self=0x7ffff6a439b0) at Objects/typeobject.c:1186
#14 0x00007ffff79e1027 in dict_dealloc (mp=0x7ffff5714e88) at Objects/dictobject.c:1383
#15 0x00007ffff79fb6f8 in subtype_clear (self=0x7ffff6a43748) at Objects/typeobject.c:1047
#16 0x00007ffff7a9eb7d in delete_garbage (old=<optimized out>, collectable=<optimized out>) at Modules/gcmodule.c:866
#17 collect (generation=generation@entry=2, n_collected=n_collected@entry=0x0, n_uncollectable=n_uncollectable@entry=0x0, 
    nofail=nofail@entry=1) at Modules/gcmodule.c:1032
#18 0x00007ffff7a9f904 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1638
#19 0x00007ffff7a77075 in PyImport_Cleanup () at Python/import.c:483
#20 0x00007ffff7a84158 in Py_Finalize () at Python/pythonrun.c:616
#21 0x00007ffff7a9d3ef in Py_Main (argc=<optimized out>, argv=<optimized out>) at Modules/main.c:771
#22 0x0000555555554c06 in main ()

Note handle_callback in Objects/weakrefobject.c. cairocffi does use weak references in some cases, but this program does not use the corresponding cairocffi features. I still get the segfault when commenting out that cairocffi code.

fijal commented 8 years ago

It might mean you're not keeping callbacks alive for long enough, but I have no time to look in details right now

seehuhn commented 8 years ago

I have now managed to be a Python3 with debug symbols running, so I can reproduce the crash in gdb. So far I have found that self in the call to subtype_clear (frame 15 in your stacktrace) refers to the Plot object:

(gdb) p *self->ob_type
$31 = {ob_base = {ob_base = {ob_refcnt = 1, ob_type = 0x1001b6770}, ob_size = 0}, tp_name = 0x1006588e8 "Plot", tp_basicsize = 32, tp_itemsize = 0,
  tp_dealloc = 0x10005e110 <subtype_dealloc>, tp_print = 0x0, tp_getattr = 0x0, tp_setattr = 0x0, tp_as_async = 0x10077bf78, tp_repr = 0x100061830 <object_repr>,
  tp_as_number = 0x10077bf90, tp_as_sequence = 0x10077c0c8, tp_as_mapping = 0x10077c0b0, tp_hash = 0x1000e9710 <_Py_HashPointer>, tp_call = 0x0,
  tp_str = 0x100063000 <slot_tp_str>, tp_getattro = 0x100051910 <PyObject_GenericGetAttr>, tp_setattro = 0x100051b50 <PyObject_GenericSetAttr>, tp_as_buffer = 0x10077c118,
  tp_flags = 284161,
  tp_doc = 0x10077c170 "The Plot Class repesents a file containing a single figure.\n\n    Args:\n        fname (string): The name of the file the figure wil be stored\n", ' ' <repeats 12 times>, "in.  Any previously existing file with this nam"..., tp_traverse = 0x1000689e0 <subtype_traverse>, tp_clear = 0x100068b20 <subtype_clear>,
  tp_richcompare = 0x100061990 <object_richcompare>, tp_weaklistoffset = 24, tp_iter = 0x0, tp_iternext = 0x100051710 <_PyObject_NextNotImplemented>, tp_methods = 0x0,
  tp_members = 0x10077c148, tp_getset = 0x0, tp_base = 0x10077b0f8, tp_dict = 0x10189e848, tp_descr_get = 0x0, tp_descr_set = 0x0, tp_dictoffset = 16,
  tp_init = 0x100063dc0 <slot_tp_init>, tp_alloc = 0x10005d850 <PyType_GenericAlloc>, tp_new = 0x100061ab0 <object_new>, tp_free = 0x100105a50 <PyObject_GC_Del>,
  tp_is_gc = 0x0, tp_bases = 0x1006586a0, tp_mro = 0x0, tp_cache = 0x0, tp_subclasses = 0x0, tp_weaklist = 0x0, tp_del = 0x0, tp_version_tag = 745, tp_finalize = 0x0}

At this time a log of the final garbage collection already has happened. Some thoughts:

I'll try to inquire further ...

seehuhn commented 8 years ago

The cffi manual states

[ffi.dlopen] returns a “library” object that gets closed when it goes out of scope. Make sure you keep the library object around as long as needed.

How does cairocffi ascertain that cairocffi.cairo is still around by the time the cairo.cairo_surface_destroy destructor for a cairocffi.Surface object is called?

If I run the crashing script with Py_VerboseFlag set to 1, I get the messages

...
# destroy cairocffi.context
# destroy cairocffi.compat
# destroy cairocffi.matrix
# destroy cairocffi._ffi
# destroy cairocffi.fonts
# destroy cairocffi.surfaces
# destroy cairocffi.patterns
# destroy _cffi_backend
# destroy cairocffi.constants
...
# destroy cairocffi
...

before (I believe) the Plot object which holds my cairocffi.Surface object is freed. This makes me think that maybe the code tries to call cairo.cairo_surface_destroy after cairo is already unloaded.

sde1000 commented 8 years ago

I seem to be experiencing something very similar to this with cairocffi on Ubuntu 15.10.

It's similarly difficult to debug! My test program at https://github.com/sde1000/python-wayland reliably segfaults on exit.

sde1000 commented 8 years ago

I think the theory that cairocffi.cairo being unloaded before cairo.cairo_surface_destroy is called by the ffi.gc code is correct. ffi.gc increases the refcount of the destructor, but it looks like ffi functions do not themselves keep a reference to the library.

Doing something like the following to make sure we explicitly have a reference to the library seems to fix the segfault problem for me. I'm sure there's a tidier way of doing this, though — I'm not suggesting this be used as-is!

https://github.com/sde1000/cairocffi/commit/848cf70cd8b8bb6205ac543bf7afaae6c9ca2fde

liZe commented 8 years ago

Should be fixed by 848cf70.