gasevi/pyreclab

Segmentation Fault while running tests on MacOSX

andersskog opened this issue · 1 comments

While running tests, .predict causes segmentation fault.

Cases:

screen shot 2017-08-10 at 12 16 46 pm

in SublimeText3:

screen shot 2017-08-10 at 12 17 28 pm

Python3.6 was installed via Homebrew.

Issue Report:

Process: Python [27959]
Path: /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 3.6.2 (3.6.2)
Code Type: X86-64 (Native)
Parent Process: plugin_host [27725]
Responsible: Python [27959]
User ID: 501

Date/Time: 2017-08-10 12:18:10.304 -0400
OS Version: Mac OS X 10.11.5 (15F34)
Report Version: 11
Anonymous UUID: 5AFA0164-4608-9D02-83E3-D2C441770E09

Sleep/Wake UUID: FA6B1B35-839F-4C77-A4E7-F4212A14E9C7

Time Awake Since Boot: 250000 seconds
Time Since Wake: 320 seconds

System Integrity Protection: enabled

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

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000090
Exception Note: EXC_CORPSE_NOTIFY

VM Regions Near 0x90:
-->
__TEXT 000000010302b000-000000010302d000 [ 8K] r-x/rwx SM=COW /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 org.python.python 0x000000010307641d PyObject_GetAttr + 65
1 org.python.python 0x00000001030d6c1a _PyEval_EvalFrameDefault + 20093
2 org.python.python 0x00000001030dbace _PyEval_EvalCodeWithName + 1910
3 org.python.python 0x00000001030d1cf4 PyEval_EvalCode + 100
4 org.python.python 0x00000001030fb077 run_mod + 58
5 org.python.python 0x00000001030fb34e PyRun_FileExFlags + 178
6 org.python.python 0x00000001030faa75 PyRun_SimpleFileExFlags + 668
7 org.python.python 0x000000010310ed03 Py_Main + 3575
8 org.python.python 0x000000010302ce19 0x10302b000 + 7705
9 libdyld.dylib 0x00007fff97f1a5ad start + 1

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00000001031bf4a0 rbx: 0x00000001036fa630 rcx: 0x000000010370f730 rdx: 0x000000010371d240
rdi: 0x00000001036fa630 rsi: 0x000000010370f730 rbp: 0x00007fff5cbd46c0 rsp: 0x00007fff5cbd46b0
r8: 0x00007fb450c22168 r9: 0x00007fb450c1b958 r10: 0x000000000000001a r11: 0xfffffffffff18eb8
r12: 0x00007fb450c1b958 r13: 0x000000000000000b r14: 0x0000000000000000 r15: 0x00007fb450c1b7d8
rip: 0x000000010307641d rfl: 0x0000000000010202 cr2: 0x0000000000000090

Logical CPU: 1
Error Code: 0x00000004
Trap Number: 14

Binary Images:
0x10302b000 - 0x10302cfff +org.python.python (3.6.2 - 3.6.2) <8ED149A1-F9E9-3DCF-8851-7653FFB04EC0> /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/Resources/Python.app/Contents/MacOS/Python
0x103030000 - 0x10319cff7 +org.python.python (3.6.2, [c] 2001-2017 Python Software Foundation. - 3.6.2) <1B59DF41-ED24-367D-8C4A-C451E0FC0F22> /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/Python
0x1036ea000 - 0x1036ebfff +_heapq.cpython-36m-darwin.so (0) /usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload/_heapq.cpython-36m-darwin.so
0x103770000 - 0x103798ff7 +libpyreclab.so (0) /usr/local/lib/python3.6/site-packages/pyreclab-0.1.6-py3.6.egg/pyreclab/libpyreclab.so
0x7fff6e8ec000 - 0x7fff6e92325f dyld (360.22) /usr/lib/dyld
0x7fff8939e000 - 0x7fff893bcff7 libsystem_kernel.dylib (3248.50.21) <78E54D59-D2B0-3F54-9A4A-0A68D671F253> /usr/lib/system/libsystem_kernel.dylib
0x7fff893d8000 - 0x7fff893d8ff7 libunc.dylib (29) /usr/lib/system/libunc.dylib
0x7fff8b79f000 - 0x7fff8b7aaff7 libcommonCrypto.dylib (60075.50.1) <93732261-34B4-3914-B7A2-90A81A182DBA> /usr/lib/system/libcommonCrypto.dylib
0x7fff8bde9000 - 0x7fff8bdebfff libsystem_coreservices.dylib (19.2) <1B3F5AFC-FFCD-3ECB-8B9A-5538366FB20D> /usr/lib/system/libsystem_coreservices.dylib
0x7fff8ca72000 - 0x7fff8ca7afef libsystem_platform.dylib (74.40.2) <29A905EF-6777-3C33-82B0-6C3A88C4BA15> /usr/lib/system/libsystem_platform.dylib
0x7fff8cacc000 - 0x7fff8cacdffb libremovefile.dylib (41) <552EF39E-14D7-363E-9059-4565AC2F894E> /usr/lib/system/libremovefile.dylib
0x7fff8cb9c000 - 0x7fff8cbc5fff libsystem_info.dylib (477.50.4) /usr/lib/system/libsystem_info.dylib
0x7fff8d651000 - 0x7fff8d668ff7 libsystem_asl.dylib (323.50.1) <41F8E11F-1BD0-3F1D-BA3A-AA1577ED98A9> /usr/lib/system/libsystem_asl.dylib
0x7fff8e557000 - 0x7fff8e56eff7 libsystem_coretls.dylib (83.40.5) /usr/lib/system/libsystem_coretls.dylib
0x7fff8e897000 - 0x7fff8e899ff7 libsystem_configuration.dylib (802.40.13) <3DEB7DF9-6804-37E1-BC83-0166882FF0FF> /usr/lib/system/libsystem_configuration.dylib
0x7fff8ed15000 - 0x7fff8ed16fff libsystem_blocks.dylib (65) <1244D9D5-F6AA-35BB-B307-86851C24B8E5> /usr/lib/system/libsystem_blocks.dylib
0x7fff8f5d8000 - 0x7fff8f5d8ff7 libkeymgr.dylib (28) <8371CE54-5FDD-3CE9-B3DF-E98C761B6FE0> /usr/lib/system/libkeymgr.dylib
0x7fff8f5d9000 - 0x7fff8f5dcfff libsystem_sandbox.dylib (460.50.4) <150A9D3D-F69E-32F7-8C7B-8E72CAAFF7E4> /usr/lib/system/libsystem_sandbox.dylib
0x7fff916b5000 - 0x7fff916baff3 libunwind.dylib (35.3) /usr/lib/system/libunwind.dylib
0x7fff92f94000 - 0x7fff92f9dff7 libsystem_pthread.dylib (138.10.4) <3DD1EF4C-1D1B-3ABF-8CC6-B3B1CEEE9559> /usr/lib/system/libsystem_pthread.dylib
0x7fff93005000 - 0x7fff93021ff7 libsystem_malloc.dylib (67.40.1) <5748E8B2-F81C-34C6-8B13-456213127678> /usr/lib/system/libsystem_malloc.dylib
0x7fff931ad000 - 0x7fff931b6ff3 libsystem_notify.dylib (150.40.1) /usr/lib/system/libsystem_notify.dylib
0x7fff931b7000 - 0x7fff931e0fff libc++abi.dylib (125) /usr/lib/libc++abi.dylib
0x7fff93a94000 - 0x7fff93ca1fff libicucore.A.dylib (551.51.3) <5BC80F94-C90D-3175-BD96-FF1DC222EC9C> /usr/lib/libicucore.A.dylib
0x7fff93d0f000 - 0x7fff93d75ff7 libsystem_network.dylib (583.50.1) /usr/lib/system/libsystem_network.dylib
0x7fff93d76000 - 0x7fff93d76ff7 liblaunch.dylib (765.50.8) <834ED605-5114-3641-AA4D-ECF31B801C50> /usr/lib/system/liblaunch.dylib
0x7fff9442b000 - 0x7fff94458fff libdispatch.dylib (501.40.12) /usr/lib/system/libdispatch.dylib
0x7fff948b3000 - 0x7fff9492afeb libcorecrypto.dylib (335.50.1) /usr/lib/system/libcorecrypto.dylib
0x7fff94937000 - 0x7fff94960ff7 libxpc.dylib (765.50.8) <54D1328E-054E-3DAA-89E2-375722F9D18F> /usr/lib/system/libxpc.dylib
0x7fff94eae000 - 0x7fff94eaffff libsystem_secinit.dylib (20) <32B1A8C6-DC84-3F4F-B8CE-9A52B47C3E6B> /usr/lib/system/libsystem_secinit.dylib
0x7fff97eb7000 - 0x7fff97ebffff libcopyfile.dylib (127) /usr/lib/system/libcopyfile.dylib
0x7fff97f17000 - 0x7fff97f1affb libdyld.dylib (360.22) /usr/lib/system/libdyld.dylib
0x7fff97f1b000 - 0x7fff97f6eff7 libc++.1.dylib (120.1) <8FC3D139-8055-3498-9AC5-6467CB7F4D14> /usr/lib/libc++.1.dylib
0x7fff9808c000 - 0x7fff9809dff7 libz.1.dylib (61.20.1) /usr/lib/libz.1.dylib
0x7fff988e8000 - 0x7fff988f0ffb libsystem_dnssd.dylib (625.50.5) <4D10E12B-59B5-386F-82DA-326F18028F0A> /usr/lib/system/libsystem_dnssd.dylib
0x7fff988f1000 - 0x7fff98920ffb libsystem_m.dylib (3105) <08E1A4B2-6448-3DFE-A58C-ACC7335BE7E4> /usr/lib/system/libsystem_m.dylib
0x7fff98a14000 - 0x7fff98a15fff libDiagnosticMessagesClient.dylib (100) <4243B6B4-21E9-355B-9C5A-95A216233B96> /usr/lib/libDiagnosticMessagesClient.dylib
0x7fff99e62000 - 0x7fff9a2d8fff com.apple.CoreFoundation (6.9 - 1258.1) <943A1383-DA6A-3DC0-ABCD-D9AEB3D0D34D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff9a311000 - 0x7fff9a673f3f libobjc.A.dylib (680) <7489D2D6-1EFD-3414-B18D-2AECCCC90286> /usr/lib/libobjc.A.dylib
0x7fff9a80b000 - 0x7fff9a81cff7 libsystem_trace.dylib (201.10.3) /usr/lib/system/libsystem_trace.dylib
0x7fff9ae3b000 - 0x7fff9ae40ff7 libmacho.dylib (875.1) <318264FA-58F1-39D8-8285-1F6254EE410E> /usr/lib/system/libmacho.dylib
0x7fff9ae41000 - 0x7fff9ae43ff7 libquarantine.dylib (80) <0F4169F0-0C84-3A25-B3AE-E47B3586D908> /usr/lib/system/libquarantine.dylib
0x7fff9b235000 - 0x7fff9b239fff libcache.dylib (75) <9548AAE9-2AB7-3525-9ECE-A2A7C4688447> /usr/lib/system/libcache.dylib
0x7fff9b54b000 - 0x7fff9b553fff libsystem_networkextension.dylib (385.40.36) <66095DC7-6539-38F2-95EE-458F15F6D014> /usr/lib/system/libsystem_networkextension.dylib
0x7fff9b76b000 - 0x7fff9b772ff7 libcompiler_rt.dylib (62) /usr/lib/system/libcompiler_rt.dylib
0x7fff9c821000 - 0x7fff9c822ffb libSystem.B.dylib (1226.10.1) /usr/lib/libSystem.B.dylib
0x7fff9d813000 - 0x7fff9d859ff7 libauto.dylib (186) <999E610F-41FC-32A3-ADCA-5EC049B65DFB> /usr/lib/libauto.dylib
0x7fff9da30000 - 0x7fff9dabdfff libsystem_c.dylib (1082.50.1) /usr/lib/system/libsystem_c.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: 184848
thread_create: 0
thread_set_state: 0

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

                            VIRTUAL   REGION 

REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 2048K 2
Kernel Alloc Once 4K 2
MALLOC 84.9M 12
MALLOC guard page 16K 4
MALLOC_LARGE (reserved) 128K 2 reserved VM address space (unallocated)
Process Corpse Info 2048K 2
STACK GUARD 4K 2
Stack 16.0M 2
VM_ALLOCATE 2564K 6
__DATA 3420K 50
__LINKEDIT 91.7M 7
__TEXT 15.7M 49
__UNICODE 552K 2
shared memory 12K 4
=========== ======= =======
TOTAL 218.8M 132
TOTAL, minus reserved VM space 218.7M 132

Model: MacBookPro12,1, BootROM MBP121.0167.B16, 2 processors, Intel Core i7, 3.1 GHz, 16 GB, SMC 2.28f7
Graphics: Intel Iris Graphics 6100, Intel Iris Graphics 6100, Built-In
Memory Module: BANK 0/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
Memory Module: BANK 1/DIMM0, 8 GB, DDR3, 1867 MHz, 0x80CE, 0x4B3445424533303445422D45474346202020
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x133), Broadcom BCM43xx 1.0 (7.21.95.175.1a6)
Bluetooth: Version 4.4.5f3 17904, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en0
Serial ATA Device: APPLE SSD SM0512G, 500.28 GB
USB Device: USB 3.0 Bus
USB Device: Bluetooth USB Host Controller
Thunderbolt Bus: MacBook Pro, Apple Inc., 27.1

Hello Anders,

thanks for your report !. There is an issue of Python 3.6 on Max OS 10.11 where certain ways to declare parameters produce the interpreter crashing.
A workarround has been incorporated in order to avoid that condition.
Please, pull and compile the code again, to verify the solution.

Enjoy it!