[pylucene-dev] Re: PyLucene 2.0.0 crashing Python on the Mac
Andi Vajda
vajda at osafoundation.org
Sat Jun 10 23:17:42 PDT 2006
On Sat, 10 Jun 2006, Bill Janssen wrote:
> I've been noticing a few (4 in the last week) crashes with my Python
> servers since I updated to PyLucene 2.0.0. Always in the PyLucene
> thread. This is with Python 2.3.5 on Mac OS X 10.4.6, using gcj 3.4.4.
>
> The thread that crashes is doing a search (though I'm not sure just
> *what* search).
>
> I've enclosed a sample crash dump. They all have the form (in the
> thread where the crash occurs):
This can be tricky to debug but gdb could help with inspecting the python
stack at the time of the crash. Include the contents of the gdbinit file that
comes with your version of python's sources (in the Misc directory) into your
~/.gdbinit file and at the gdb prompt use these commands to print out python
objects or frames. It doesn't look like any PyLucene function is on the stack
(except for the thread start). This could mean that memory got trashed and
that, later (now), python itself is crashing or it could mean that this crash
is unrelated to PyLucene. A good way to track memory trashers is to run your
application with a python built in debug mode configuring it --with-pydebug to
cause python memory tracking code to be included. If python memory is being
messed with you should be getting assertion failures pretty rapidly and if you
then attach gdb to the crashing process, you should be able to track down the
cause of the problem.
Andi..
>
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> [...]
>
> Thread 2 Crashed:
> 0 <<00000000>> 0x00000000 0 + 0
> 1 org.python.python 0x9867c404 PyDict_New + 432
> 2 org.python.python 0x9867ede0 PyDict_Items + 2064
> 3 org.python.python 0x986b8c24 PyEval_GetFuncDesc + 420
> 4 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 5 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 6 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 7 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> [...frames omitted...]
> 39 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 40 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 41 org.python.python 0x9866e530 PyFunction_SetClosure + 3436
> 42 org.python.python 0x986598e0 PyObject_Call + 48
> 43 org.python.python 0x98661af4 PyMethod_New + 3052
> 44 org.python.python 0x986598e0 PyObject_Call + 48
> 45 _PyLucene.so 0x005cb738 callPython(_object*, char*, ...) + 180
> 46 _PyLucene.so 0x005c30b8 org::osafoundation::util::PythonRunnable::run() + 56
> 47 libgcj.5.dylib 0x0205d69c java::lang::Thread::run() + 80
> 48 libgcj.5.dylib 0x020416b0 Jv_ThreadRun(java::lang::Thread*) + 44
> 49 libgcj.5.dylib 0x022b099c really_start(void*) + 56
> 50 libgcj.5.dylib 0x022c23f0 GC_start_routine + 260
> 51 libSystem.B.dylib 0x9002ba68 _pthread_body + 96
>
> And another:
>
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> [...]
>
> Thread 2 Crashed:
> 0 <<00000000>> 0x00000000 0 + 0
> 1 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 2 org.python.python 0x986b8f90 PyEval_GetFuncDesc + 1296
> 3 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 4 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 5 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 6 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 7 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 8 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> ...
> 46 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 47 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 48 org.python.python 0x9866e530 PyFunction_SetClosure + 3436
> 49 org.python.python 0x986598e0 PyObject_Call + 48
> 50 org.python.python 0x98661af4 PyMethod_New + 3052
> 51 org.python.python 0x986598e0 PyObject_Call + 48
> 52 _PyLucene.so 0x005cb738 callPython(_object*, char*, ...) + 180
> 53 _PyLucene.so 0x005c30b8 org::osafoundation::util::PythonRunnable::run() + 56
> 54 libgcj.5.dylib 0x0205d69c java::lang::Thread::run() + 80
> 55 libgcj.5.dylib 0x020416b0 Jv_ThreadRun(java::lang::Thread*) + 44
> 56 libgcj.5.dylib 0x022b099c really_start(void*) + 56
> 57 libgcj.5.dylib 0x022c23f0 GC_start_routine + 260
> 58 libSystem.B.dylib 0x9002ba68 _pthread_body + 96
>
>
> Bill
> ------------------------------------------------------------
>
> Host Name: archie
> Date/Time: 2006-06-10 17:46:09.472 -0700
> OS Version: 10.4.6 (Build 8I127)
> Report Version: 4
>
> Command: python
> Path: /usr/bin/python
> Parent: launchd [1]
>
> Version: ??? (???)
>
> PID: 10748
> Thread: 2
>
> Exception: EXC_BAD_ACCESS (0x0001)
> Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x00000000
>
> Thread 0:
> 0 libSystem.B.dylib 0x9001f5ec select + 12
> 1 select.so 0x0005e680 initselect + 816
> 2 org.python.python 0x986b8c5c PyEval_GetFuncDesc + 476
> 3 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 4 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 5 org.python.python 0x986b8f90 PyEval_GetFuncDesc + 1296
> 6 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 7 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 8 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 9 org.python.python 0x986b8f90 PyEval_GetFuncDesc + 1296
> 10 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 11 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 12 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 13 org.python.python 0x986b3eb8 PyEval_EvalCode + 48
> 14 org.python.python 0x986d808c PyRun_FileExFlags + 224
> 15 org.python.python 0x986d70b0 PyRun_SimpleFileExFlags + 444
> 16 org.python.python 0x986e1a00 Py_Main + 1996
> 17 python 0x00002574 start + 412
> 18 python 0x00002414 start + 60
>
> Thread 1:
> 0 libSystem.B.dylib 0x9002c128 semaphore_wait_signal_trap + 8
> 1 libSystem.B.dylib 0x90030bec pthread_cond_wait + 480
> 2 libgcj.5.dylib 0x022b03e4 Jv_CondWait(_Jv_ConditionVariable_t*, _Jv_Mutex_t*, long long, int) + 276
> 3 libgcj.5.dylib 0x02030ad8 gnu::gcj::runtime::FinalizerThread::run() + 244
> 4 libgcj.5.dylib 0x020416b0 Jv_ThreadRun(java::lang::Thread*) + 44
> 5 libgcj.5.dylib 0x022b099c really_start(void*) + 56
> 6 libgcj.5.dylib 0x022c23f0 GC_start_routine + 260
> 7 libSystem.B.dylib 0x9002ba68 _pthread_body + 96
>
> Thread 2 Crashed:
> 0 <<00000000>> 0x00000000 0 + 0
> 1 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 2 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 3 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 4 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 5 org.python.python 0x986b8f90 PyEval_GetFuncDesc + 1296
> 6 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 7 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 8 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 9 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 10 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 11 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 12 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 13 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 14 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 15 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 16 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 17 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 18 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 19 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 20 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 21 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 22 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 23 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 24 org.python.python 0x986b8f90 PyEval_GetFuncDesc + 1296
> 25 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 26 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 27 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 28 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 29 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 30 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 31 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 32 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 33 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 34 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 35 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 36 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 37 org.python.python 0x9866e530 PyFunction_SetClosure + 3436
> 38 org.python.python 0x986598e0 PyObject_Call + 48
> 39 org.python.python 0x986b95a4 PyEval_GetFuncDesc + 2852
> 40 org.python.python 0x986b64f4 PyEval_EvalCode + 9836
> 41 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 42 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 43 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 44 org.python.python 0x986b8edc PyEval_GetFuncDesc + 1116
> 45 org.python.python 0x986b8d34 PyEval_GetFuncDesc + 692
> 46 org.python.python 0x986b6414 PyEval_EvalCode + 9612
> 47 org.python.python 0x986b75e4 PyEval_EvalCodeEx + 2132
> 48 org.python.python 0x9866e530 PyFunction_SetClosure + 3436
> 49 org.python.python 0x986598e0 PyObject_Call + 48
> 50 org.python.python 0x98661af4 PyMethod_New + 3052
> 51 org.python.python 0x986598e0 PyObject_Call + 48
> 52 _PyLucene.so 0x005cb738 callPython(_object*, char*, ...) + 180
> 53 _PyLucene.so 0x005c30b8 org::osafoundation::util::PythonRunnable::run() + 56
> 54 libgcj.5.dylib 0x0205d69c java::lang::Thread::run() + 80
> 55 libgcj.5.dylib 0x020416b0 Jv_ThreadRun(java::lang::Thread*) + 44
> 56 libgcj.5.dylib 0x022b099c really_start(void*) + 56
> 57 libgcj.5.dylib 0x022c23f0 GC_start_routine + 260
> 58 libSystem.B.dylib 0x9002ba68 _pthread_body + 96
>
> Thread 2 crashed with PPC Thread State 64:
> srr0: 0x0000000000000000 srr1: 0x000000004200f030 vrsave: 0x0000000000000000
> cr: 0x48004242 xer: 0x0000000000000004 lr: 0x00000000986b45cc ctr: 0x0000000000000001
> r0: 0x00000000003439f0 r1: 0x00000000f00ffee0 r2: 0x000000000e001c98 r3: 0x00000000a864f6ec
> r4: 0x0000000002c5ad50 r5: 0x0000000001184e10 r6: 0x00000000ffffffff r7: 0x0000000002506d44
> r8: 0x0000000002506d44 r9: 0x0000000000000008 r10: 0x0000000000000000 r11: 0x0000000000000000
> r12: 0x0000000000000001 r13: 0x00000000015d88a0 r14: 0x0000000000000000 r15: 0x00000000014765e0
> r16: 0x0000000000000000 r17: 0x0000000000000000 r18: 0x0000000000000000 r19: 0x0000000000000000
> r20: 0x0000000000000001 r21: 0x0000000002d0e5f0 r22: 0x0000000000000003 r23: 0x00000000014bd408
> r24: 0x0000000000000008 r25: 0x0000000000343890 r26: 0x00000000a864f6ec r27: 0x00000000a864f6ec
> r28: 0x0000000000000002 r29: 0x0000000002d0e5f0 r30: 0x00000000a864f6ec r31: 0x00000000986b3ed4
>
> Binary Images Description:
> 0x1000 - 0x2fff python /usr/bin/python
> 0x5d000 - 0x5efff select.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/select.so
> 0xa3000 - 0xa4fff sha.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/sha.so
> 0xad000 - 0xb1fff array.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/array.so
> 0xb5000 - 0xb7fff operator.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/operator.so
> 0xfb000 - 0xfdfff _ssl.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/_ssl.so
> 0x245000 - 0x24bfff _socket.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/_socket.so
> 0x251000 - 0x252fff time.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/time.so
> 0x256000 - 0x257fff fcntl.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/fcntl.so
> 0x25a000 - 0x26afff cPickle.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/cPickle.so
> 0x26e000 - 0x26ffff cStringIO.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/cStringIO.so
> 0x272000 - 0x275fff strop.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/strop.so
> 0x279000 - 0x27bfff zlib.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/zlib.so
> 0x485000 - 0x486fff math.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/math.so
> 0x489000 - 0x48afff _random.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/_random.so
> 0x48d000 - 0x48efff md5.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/md5.so
> 0x491000 - 0x493fff binascii.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/binascii.so
> 0x496000 - 0x499fff struct.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/struct.so
> 0x49c000 - 0x49efff unicodedata.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/unicodedata.so
> 0x4fe000 - 0x65bfff _PyLucene.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/_PyLucene.so
> 0x797000 - 0x79ffff libgcc_s.1.0.dylib /usr/local/lib/libgcc_s.1.0.dylib
> 0x7f8000 - 0x7f9fff termios.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/termios.so
> 0x1008000 - 0x108efff libstdc++.6.dylib /usr/local/lib/libstdc++.6.dylib
> 0x1388000 - 0x13cbfff _imaging.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/PIL/_imaging.so
> 0x1455000 - 0x1457fff itertools.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/itertools.so
> 0x14db000 - 0x14e6fff datetime.so /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/lib-dynload/datetime.so
> 0x2008000 - 0x24d7fff libgcj.5.dylib /usr/local/lib/libgcj.5.dylib
> 0x8fe00000 - 0x8fe51fff dyld 44.4 /usr/lib/dyld
> 0x90000000 - 0x901bbfff libSystem.B.dylib /usr/lib/libSystem.B.dylib
> 0x90213000 - 0x90218fff libmathCommon.A.dylib /usr/lib/system/libmathCommon.A.dylib
> 0x907b9000 - 0x90892fff com.apple.CoreFoundation 6.4.6 (368.27) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> 0x908db000 - 0x908dbfff com.apple.CoreServices 10.4 (???) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
> 0x908dd000 - 0x909dffff libicucore.A.dylib /usr/lib/libicucore.A.dylib
> 0x90a39000 - 0x90abdfff libobjc.A.dylib /usr/lib/libobjc.A.dylib
> 0x90ae7000 - 0x90b57fff com.apple.framework.IOKit 1.4 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
> 0x90b6d000 - 0x90b7ffff libauto.dylib /usr/lib/libauto.dylib
> 0x90b86000 - 0x90e5dfff com.apple.CoreServices.CarbonCore 681.3 (671.2) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore
> 0x90ec3000 - 0x90f43fff com.apple.CoreServices.OSServices 4.1 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices
> 0x90f8d000 - 0x90fcefff com.apple.CFNetwork 4.0 (129.16) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork
> 0x90fe3000 - 0x90ffbfff com.apple.WebServices 1.1.2 (1.1.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/WebServicesCore.framework/Versions/A/WebServicesCore
> 0x9100b000 - 0x9108cfff com.apple.SearchKit 1.0.5 /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit
> 0x910d2000 - 0x910fbfff com.apple.Metadata 10.4.4 (121.36) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata
> 0x9110c000 - 0x9111afff libz.1.dylib /usr/lib/libz.1.dylib
> 0x9111d000 - 0x912d3fff com.apple.security 4.3 (25966) /System/Library/Frameworks/Security.framework/Versions/A/Security
> 0x913d0000 - 0x913d9fff com.apple.DiskArbitration 2.1 /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration
> 0x913e0000 - 0x91407fff com.apple.SystemConfiguration 1.8.2 /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration
> 0x9141a000 - 0x91425fff libgcc_s.1.dylib /usr/lib/libgcc_s.1.dylib
> 0x91a00000 - 0x91ac8fff libcrypto.0.9.7.dylib /usr/lib/libcrypto.0.9.7.dylib
> 0x9290c000 - 0x92b37fff com.apple.Foundation 6.4.5 (567.26) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
> 0x92c55000 - 0x92d33fff libxml2.2.dylib /usr/lib/libxml2.2.dylib
> 0x92d53000 - 0x92e41fff libiconv.2.dylib /usr/lib/libiconv.2.dylib
> 0x94b46000 - 0x94b75fff libssl.0.9.7.dylib /usr/lib/libssl.0.9.7.dylib
> 0x9864f000 - 0x98719fff org.python.python 2.3.3 /System/Library/Frameworks/Python.framework/Versions/2.3/Python
>
More information about the pylucene-dev
mailing list