Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python segmentation error working in shell - Mavericks readline.so bug

I'm working on a small-ish Django system, it uses about 14,000 records. I hadn't used aggregate features before, so wanted to play about with them in shell. When I do from core.models import Match followed by from django.db.models import Avg I get a segmentation error. Background reading suggests this is a memory problem; I've tried closing everything possible and cleaning unused memory, so I'm running with about 4Gb free.

I can import either command, in either order (so Match, the dataset can be imported first or second, doesn't matter) on its own - it's only when I try and import another module, or manipulate it that I get the error. Example:

>>> from core.models import Match
>>> t = match.objects.filter(team_name="Coventry")
Segmentation fault: 11

or

>>> from django.db.models import Avg
>>> from core.models import Match
Segmentation fault: 11

similarly, running in dif order works until the second command:

>>> from core.models import Match
>>> from django.db.models import Avg
Segmentation fault: 11

If relevant, I'm just running the Django devserver on SQLite3 on localhost. I understand from background reading that this could be a result of some unexpected loading into memory, but have no idea where to start trying to troubleshoot - I'm not running any code here, just using the Django ORM in shell.

EDIT: I've since tested this further; I'm getting it a lot on a number of different imports.

>>> from bisect import *
>>> from datetime import date

The console log crash report looks like this:

Process:         Python [28541]
Path:            /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier:      Python
Version:         2.7.5 (2.7.5)
Code Type:       X86-64 (Native)
Parent Process:  bash [28528]
Responsible:     Terminal [2961]
User ID:         501

Date/Time:       2013-11-02 16:24:56.399 +0000
OS Version:      Mac OS X 10.9 (13A603)
Report Version:  11
Anonymous UUID:  DACFC213-DBA4-860A-C887-96B155D16223

Sleep/Wake UUID: 0FCC648C-E20C-41CF-AB70-019F755C62CA

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

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

VM Regions Near 0:
--> 
    __TEXT                 0000000100000000-0000000100001000 [    4K] r-x/rwx SM=COW  /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   readline.so                     0x00000001025ebf97 call_readline + 647
1   org.python.python               0x0000000100008e22 PyOS_Readline + 274
2   org.python.python               0x00000001000b8315 builtin_raw_input + 597
3   org.python.python               0x00000001000c35fd PyEval_EvalFrameEx + 25213
4   org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
5   org.python.python               0x00000001000c31bd PyEval_EvalFrameEx + 24125
6   org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
7   org.python.python               0x00000001000c31bd PyEval_EvalFrameEx + 24125
8   org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
9   org.python.python               0x00000001000c31bd PyEval_EvalFrameEx + 24125
10  org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
11  org.python.python               0x000000010003e510 function_call + 176
12  org.python.python               0x000000010000c932 PyObject_Call + 98
13  org.python.python               0x00000001000be63d PyEval_EvalFrameEx + 4797
14  org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
15  org.python.python               0x000000010003e510 function_call + 176
16  org.python.python               0x000000010000c932 PyObject_Call + 98
17  org.python.python               0x00000001000be63d PyEval_EvalFrameEx + 4797
18  org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
19  org.python.python               0x000000010003e510 function_call + 176
20  org.python.python               0x000000010000c932 PyObject_Call + 98
21  org.python.python               0x00000001000be63d PyEval_EvalFrameEx + 4797
22  org.python.python               0x00000001000c3fed PyEval_EvalFrameEx + 27757
23  org.python.python               0x00000001000c3fed PyEval_EvalFrameEx + 27757
24  org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
25  org.python.python               0x00000001000c31bd PyEval_EvalFrameEx + 24125
26  org.python.python               0x00000001000c58c9 PyEval_EvalCodeEx + 2137
27  org.python.python               0x00000001000c59e6 PyEval_EvalCode + 54
28  org.python.python               0x00000001000ea28e PyRun_FileExFlags + 174
29  org.python.python               0x00000001000ea52a PyRun_SimpleFileExFlags + 458
30  org.python.python               0x00000001001014ed Py_Main + 3101
31  org.python.python               0x0000000100000f14 0x100000000 + 3860

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x000000010074ca40  rcx: 0x0000000100700000  rdx: 0x0000000000001e00
  rdi: 0x0000000000000000  rsi: 0x00000001025ec254  rbp: 0x00007fff5fbfd720  rsp: 0x00007fff5fbfd650
   r8: 0x0000000100700000   r9: 0x000000000000058a  r10: 0x0001000040080003  r11: 0x0000000000000001
  r12: 0x0000000000000001  r13: 0x000000000000001c  r14: 0x00007fff5fbfd6e0  r15: 0x00007fff5fbfd660
  rip: 0x00000001025ebf97  rfl: 0x0000000000010206  cr2: 0x0000000000000000

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


Binary Images:
       0x100000000 -        0x100000fff +org.python.python (2.7.5 - 2.7.5) <29DAB82B-5BC9-56CE-C09D-AE442FB37EF0> /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
       0x100003000 -        0x10016ffff +org.python.python (2.7.5, [c] 2004-2013 Python Software Foundation. - 2.7.5) <CDFB33CA-71DD-B1C2-5262-545F3FA06153> /Library/Frameworks/Python.framework/Versions/2.7/Python
       0x1002f1000 -        0x1002f5fff +_collections.so (???) <C3759257-D3E2-1A2D-5B6D-F5CE2BAD59F1> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so
       0x1002fb000 -        0x1002fcff7 +_heapq.so (???) <E4381E05-EEF3-6948-2616-3133F9266C5B> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so
       0x1005f0000 -        0x1005f4ff7 +operator.so (???) <8203644B-B77C-2E1C-A0AF-614C0E9FA0CC> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
       0x1005fb000 -        0x100602ff7 +itertools.so (???) <8B7B7425-93EC-2588-DEA6-9CBE9FB670E8> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so
       0x10060d000 -        0x100610ff7 +strop.so (???) <EF084977-083D-4241-3E1C-F784D1EC6BC2> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so
       0x100655000 -        0x100656ff7 +_functools.so (???) <B0EB3CA3-1D94-8F0F-C2CE-4FB7651C9EB4> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so
       0x100659000 -        0x10065bfff +_locale.so (???) <C498D276-0D22-5EB7-0332-8FD47164BCC5> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_locale.so
       0x10065f000 -        0x100663fff +_struct.so (???) <C5DCD024-216C-FA09-AE53-F5C308DC7EE0> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so
       0x1006aa000 -        0x1006b8ff7 +datetime.so (???) <6F932ED3-23A3-53F7-CAAB-6E532A327C13> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/datetime.so
       0x1006f1000 -        0x1006f6fff +math.so (???) <DBF975FC-2716-ADD3-6911-5D951CB0DB61> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/math.so
       0x102100000 -        0x102102ff7 +time.so (???) <71BBC363-EB64-7E83-016A-85019ABE11A9> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so
       0x102147000 -        0x102150ff7 +_socket.so (???) <695EB730-7782-CEC0-96D7-C82415A58249> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
       0x10215c000 -        0x102160ff7 +_ssl.so (???) <F11C5431-BBBC-472E-1D78-F3FEAA774381> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so
       0x102166000 -        0x102167fff +cStringIO.so (???) <84827C5D-2394-D102-142B-87FBAD4A785A> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so
       0x10216c000 -        0x10216ffef +binascii.so (???) <B1341D2E-EC17-A209-F850-C3CFDDDFCFD6> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so
       0x1021b3000 -        0x1021b3fff +_scproxy.so (???) <2635F535-7B37-6190-16D7-FAC536366A2D> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so
       0x1021b6000 -        0x1021b9fff +select.so (???) <81AE4135-7CD3-5C92-D8BA-8B6ADF4F866A> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/select.so
       0x1021bf000 -        0x1021c0ff7 +fcntl.so (???) <65448CBF-233E-1A16-976B-7C02357CFAAE> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/fcntl.so
       0x102203000 -        0x102204fff +_hashlib.so (???) <F3E00F49-7684-BCA0-3053-6E36EEED082A> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_hashlib.so
       0x102208000 -        0x102209fff +_random.so (???) <479693CA-BFEF-F888-1CE7-9BD4FD43BBAA> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_random.so
       0x10228c000 -        0x10229bfff +cPickle.so (???) <72BD5DBF-624F-B0F4-0783-F75BB293F602> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so
       0x1022a3000 -        0x1022b8ff7 +_io.so (???) <AC3AF946-5DCF-662C-0DC7-5F57FDD3CD4B> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_io.so
       0x1022d0000 -        0x1022d5fff +_json.so (???) <E4EE27AB-C49E-6A19-B603-1DA85AD3AF1E> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_json.so
       0x1022da000 -        0x1022ddff7 +zlib.so (???) <7627B90E-3DA2-DE67-F574-CBE4F8816949> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so
       0x1022e2000 -        0x1022e7fff +array.so (???) <142AB497-D764-55A8-7FDB-D2A154D3054E> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/array.so
       0x1022ef000 -        0x1022effff +_bisect.so (???) <6FA6B60B-13DC-2E86-D409-628062C08CAC> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so
       0x1022f2000 -        0x1022f2fff +grp.so (???) <0F086696-FDA8-FABD-5051-D2B342BB56A6> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/grp.so
       0x1022f5000 -        0x1022f8fff +_zope_interface_coptimizations.so (???) <897FE7EC-5D39-3C36-9EE1-0D04B10C5D8C> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zope/interface/_zope_interface_coptimizations.so
       0x102480000 -        0x102514fef +unicodedata.so (???) <6C701F70-D60D-E225-74D2-C8A0A7651DA5> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/unicodedata.so
       0x1025ea000 -        0x1025ecff7 +readline.so (???) <6EA1FE1F-B78C-23EF-A4C2-9B7E9FB8B643> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/readline.so
       0x1029c0000 -        0x102a62ff7 +_sqlite3.so (???) <E90E5264-66AD-9194-19E2-74231C7F9B84> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_sqlite3.so
       0x103880000 -        0x10389effb  libedit.2.dylib (39) <1B0596DB-F336-32E7-BB9F-51BF70DB5305> /usr/lib/libedit.2.dylib
       0x103a00000 -        0x103a54fe7 +libncursesw.5.dylib (5) <3F0079C0-01C1-3CB8-19CA-F9B49AA4F4A4> /Library/Frameworks/Python.framework/Versions/2.7/lib/libncursesw.5.dylib
    0x7fff67fb7000 -     0x7fff67fea817  dyld (239.3) <D1DFCF3F-0B0C-332A-BCC0-87A851B570FF> /usr/lib/dyld
    0x7fff87157000 -     0x7fff8715eff3  libcopyfile.dylib (103) <5A881779-D0D6-3029-B371-E3021C2DDA5E> /usr/lib/system/libcopyfile.dylib
    0x7fff884c2000 -     0x7fff884ccfff  libcommonCrypto.dylib (60049) <8C4F0CA0-389C-3EDC-B155-E62DD2187E1D> /usr/lib/system/libcommonCrypto.dylib
    0x7fff8863c000 -     0x7fff88642ff7  libsystem_platform.dylib (24.1.4) <331BA4A5-55CE-3B95-99EB-44E0C89D7FB8> /usr/lib/system/libsystem_platform.dylib
    0x7fff88873000 -     0x7fff88876ff7  libdyld.dylib (239.3) <62F4D752-4089-31A8-8B73-B95A68893B3C> /usr/lib/system/libdyld.dylib
    0x7fff88feb000 -     0x7fff88fecff7  libDiagnosticMessagesClient.dylib (100) <4CDB0F7B-C0AF-3424-BC39-495696F0DB1E> /usr/lib/libDiagnosticMessagesClient.dylib
    0x7fff892ac000 -     0x7fff892b4fff  libsystem_dnssd.dylib (522.1.11) <270DCF6C-502D-389A-AA9F-DE4624A36FF7> /usr/lib/system/libsystem_dnssd.dylib
    0x7fff8937d000 -     0x7fff89382ff7  libunwind.dylib (35.3) <78DCC358-2FC1-302E-B395-0155B47CB547> /usr/lib/system/libunwind.dylib
    0x7fff89909000 -     0x7fff8995bfff  libc++.1.dylib (120) <4F68DFC5-2077-39A8-A449-CAC5FDEE7BDE> /usr/lib/libc++.1.dylib
    0x7fff89aaa000 -     0x7fff89aecff7  libauto.dylib (185.5) <F45C36E8-B606-3886-B5B1-B6745E757CA8> /usr/lib/libauto.dylib
    0x7fff8b5a7000 -     0x7fff8b5aeff7  liblaunch.dylib (842.1.4) <FCBF0A02-0B06-3F97-9248-5062A9DEB32C> /usr/lib/system/liblaunch.dylib
    0x7fff8bad9000 -     0x7fff8baeaff7  libz.1.dylib (53) <42E0C8C6-CA38-3CA4-8619-D24ED5DD492E> /usr/lib/libz.1.dylib
    0x7fff8bbbc000 -     0x7fff8bbbcff7  libkeymgr.dylib (28) <3AA8D85D-CF00-3BD3-A5A0-E28E1A32A6D8> /usr/lib/system/libkeymgr.dylib
    0x7fff8bbd0000 -     0x7fff8bbd1ff7  libsystem_blocks.dylib (63) <FB856CD1-2AEA-3907-8E9B-1E54B6827F82> /usr/lib/system/libsystem_blocks.dylib
    0x7fff8be5e000 -     0x7fff8be62fff  libsystem_stats.dylib (93.1.26) <B9E26A9E-FBBC-3938-B8B7-6CF7CA8C99AD> /usr/lib/system/libsystem_stats.dylib
    0x7fff8be80000 -     0x7fff8be81fff  com.apple.TrustEvaluationAgent (2.0 - 25) <334A82F4-4AE4-3719-A511-86D0B0723E2B> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent
    0x7fff8c51f000 -     0x7fff8c521ff7  libquarantine.dylib (71) <7A1A2BCB-C03D-3A25-BFA4-3E569B2D2C38> /usr/lib/system/libquarantine.dylib
    0x7fff8c522000 -     0x7fff8c5abff7  libsystem_c.dylib (997.1.1) <61833FAA-7281-3FF9-937F-686B6F20427C> /usr/lib/system/libsystem_c.dylib
    0x7fff8ccbe000 -     0x7fff8ccedfd2  libsystem_m.dylib (3047.16) <B7F0E2E4-2777-33FC-A787-D6430B630D54> /usr/lib/system/libsystem_m.dylib
    0x7fff8ce7c000 -     0x7fff8ce83fff  libcompiler_rt.dylib (35) <4CD916B2-1B17-362A-B403-EF24A1DAC141> /usr/lib/system/libcompiler_rt.dylib
    0x7fff8ce87000 -     0x7fff8ce88fff  libunc.dylib (28) <62682455-1862-36FE-8A04-7A6B91256438> /usr/lib/system/libunc.dylib
    0x7fff8ce89000 -     0x7fff8d06eff7  com.apple.CoreFoundation (6.9 - 855.11) <E22C6A1F-8996-349C-905E-96C3BBE07C2F> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
    0x7fff8d81e000 -     0x7fff8d81fff7  libsystem_sandbox.dylib (278.10) <A47E7E11-3C76-318E-B67D-98972B86F094> /usr/lib/system/libsystem_sandbox.dylib
    0x7fff8d876000 -     0x7fff8d87aff7  libcache.dylib (62) <BDC1E65B-72A1-3DA3-A57C-B23159CAAD0B> /usr/lib/system/libcache.dylib
    0x7fff8d905000 -     0x7fff8d9e4fff  libcrypto.0.9.8.dylib (50) <B95B9DBA-39D3-3EEF-AF43-44608B28894E> /usr/lib/libcrypto.0.9.8.dylib
    0x7fff8dc58000 -     0x7fff8dc7fffb  libsystem_info.dylib (449.1.3) <7D41A156-D285-3849-A2C3-C04ADE797D98> /usr/lib/system/libsystem_info.dylib
    0x7fff8dd1b000 -     0x7fff8dec8f27  libobjc.A.dylib (551.1) <AD7FD984-271E-30F4-A361-6B20319EC73B> /usr/lib/libobjc.A.dylib
    0x7fff8dec9000 -     0x7fff8df2cff7  com.apple.SystemConfiguration (1.13 - 1.13) <F05F4149-981B-380B-8F50-51CE804BBB89> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
    0x7fff8e008000 -     0x7fff8e019ff7  libsystem_asl.dylib (217.1.4) <655FB343-52CF-3E2F-B14D-BEBF5AAEF94D> /usr/lib/system/libsystem_asl.dylib
    0x7fff8e461000 -     0x7fff8e488ff7  libsystem_network.dylib (241.3) <8B1E1F1D-A5CC-3BAE-8B1E-ABC84337A364> /usr/lib/system/libsystem_network.dylib
    0x7fff8e508000 -     0x7fff8e50fff7  libsystem_pthread.dylib (53.1.4) <AB498556-B555-310E-9041-F67EC9E00E2C> /usr/lib/system/libsystem_pthread.dylib
    0x7fff8e58d000 -     0x7fff8e596ff3  libsystem_notify.dylib (121) <52571EC3-6894-37E4-946E-064B021ED44E> /usr/lib/system/libsystem_notify.dylib
    0x7fff8ec87000 -     0x7fff8ecabfff  libxpc.dylib (300.1.17) <4554927A-9467-365C-91F1-5A116989DD7F> /usr/lib/system/libxpc.dylib
    0x7fff8fe32000 -     0x7fff8fe4cfff  libdispatch.dylib (339.1.9) <46878A5B-4248-3057-962C-6D4A235EEF31> /usr/lib/system/libdispatch.dylib
    0x7fff90580000 -     0x7fff905a9ff7  libc++abi.dylib (48) <8C16158F-CBF8-3BD7-BEF4-022704B2A326> /usr/lib/libc++abi.dylib
    0x7fff905aa000 -     0x7fff90762ff3  libicucore.A.dylib (511.25) <3ED7B656-416E-3071-AEC8-E85C90232F78> /usr/lib/libicucore.A.dylib
    0x7fff90c0c000 -     0x7fff90c0dffb  libremovefile.dylib (33) <3543F917-928E-3DB2-A2F4-7AB73B4970EF> /usr/lib/system/libremovefile.dylib
    0x7fff90c0e000 -     0x7fff90c1efff  libbsm.0.dylib (33) <2CAC00A2-1352-302A-88FA-C567D4D69179> /usr/lib/libbsm.0.dylib
    0x7fff91c8b000 -     0x7fff91c8dff3  libsystem_configuration.dylib (596.12) <C4F633D9-94C8-35D9-BB2D-84C5122533C7> /usr/lib/system/libsystem_configuration.dylib
    0x7fff91e16000 -     0x7fff91e1bfff  libmacho.dylib (845) <1D2910DF-C036-3A82-A3FD-44FF73B5FF9B> /usr/lib/system/libmacho.dylib
    0x7fff920a5000 -     0x7fff920d5fff  libncurses.5.4.dylib (42) <BF763D62-9149-37CB-B1D2-F66A2510E6DD> /usr/lib/libncurses.5.4.dylib
    0x7fff923d7000 -     0x7fff923f2ff7  libsystem_malloc.dylib (23.1.10) <FFE5C472-B23A-318A-85BF-77CDE61900D1> /usr/lib/system/libsystem_malloc.dylib
    0x7fff93322000 -     0x7fff9333eff7  libsystem_kernel.dylib (2422.1.72) <D14913DB-47F1-3591-8DAF-D4B4EF5F8818> /usr/lib/system/libsystem_kernel.dylib
    0x7fff941e6000 -     0x7fff941e7ff7  libSystem.B.dylib (1197.1.1) <BFC0DC97-46C6-3BE0-9983-54A98734897A> /usr/lib/libSystem.B.dylib
    0x7fff94239000 -     0x7fff94287fff  libcorecrypto.dylib (161.1) <F3973C28-14B6-3006-BB2B-00DD7F09ABC7> /usr/lib/system/libcorecrypto.dylib
    0x7fff94588000 -     0x7fff945bcfff  libssl.0.9.8.dylib (50) <B15F967C-B002-36C2-9621-3456D8509F50> /usr/lib/libssl.0.9.8.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: 991820
    thread_create: 1
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=80.5M resident=22.0M(27%) swapped_out_or_unallocated=58.5M(73%)
Writable regions: Total=61.0M written=15.9M(26%) resident=22.2M(36%) swapped_out=0K(0%) unallocated=38.8M(64%)

REGION TYPE                      VIRTUAL
===========                      =======
Kernel Alloc Once                     4K
MALLOC                             52.5M
MALLOC (admin)                       16K
STACK GUARD                        56.0M
Stack                              8192K
VM_ALLOCATE                          12K
__DATA                             2024K
__LINKEDIT                         66.4M
__TEXT                             14.1M
__UNICODE                           544K
shared memory                         4K
===========                      =======
TOTAL                             199.6M

Further edit: There appears to be a known bug on this. I installed Mavericks about 4 days ago, and this has appeared since then; I suspect I can suppress the problem using that Q's solution if no-one's going to tell me otherwise.

like image 817
Withnail Avatar asked Nov 02 '13 14:11

Withnail


3 Answers

Are you running OS X 10.9 Mavericks? If so, see this bug report. There's a shell script attached to the bug report you can run to worm around the issue. See Ned Deily's msg here for instructions.

like image 140
Tim Peters Avatar answered Nov 14 '22 09:11

Tim Peters


A segmentation fault is an Access Violation in the process. It basically means that the program has attempted to access a memory address that's not its own and has been killed by the operating system. Python does not allow the user to temper with memory at all so this CAN'T be your code in any way.

Considering it seems to happen a lot when you import Match I'd guess that there's either a bug in the module that causes the erroneous memory access or that you have incompatible software dependencies. Try updating to the latest version of the module and related packages and try to google for this problem. If you're running the newest version of the module, you should open a ticket with the developers and attach the core file that the operating system created when the process crashed

like image 23
immortal Avatar answered Nov 14 '22 07:11

immortal


Download to patch the bugs are available and mentioned by Tim Peters. The following link http://bugs.python.org/issue18458#msg201507 will take you right to the note with a link to the downloads for 2.7 and 3.3 that are compatible with Mavericks.

Only posting because this is a little more direct route to the solution that you need.

like image 1
Fred Mitchell Avatar answered Nov 14 '22 09:11

Fred Mitchell