View Issue Details

IDProjectCategoryView StatusLast Update
0000554Other Unix PortBugpublic2012-12-18 19:59
ReporterSteven Levine Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
PlatformeCS/OS2OSeComstation or OS/2OS Version1.x 2.x or 4.5
Summary0000554: python help facility generates exceptions
DescriptionPython help facility traps when module list requested
Steps To Reproduce
Start python

At the prompt, enter

  help()

At the help prompt, enter

  modules

The result is the following output

Please wait a moment while I gather a list of all available modules...

Killed by SIGSEGV
pid=0x1f0b ppid=0x1f03 tid=0x0001 slot=0x00d1 pri=0x0200 mc=0x0001
D:\USR\PYTHON27\PYTHON.EXE
LIBC065 0:0005e37b
cs:eip=005b:1d17e37b ss:esp=0053:007fdb00 ebp=007fdc08
 ds=0053 es=0053 fs=150b gs=0000 efl=00012246
eax=00000000 ebx=1d14b313 ecx=00000000 edx=00000101 edi=2028c34f esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.
TagsNo tags attached.
Attached Files
PDUMP.000.txt (6,335 bytes)   
2012-12-16 SHL
python 2.7.3
help() modules

Formatter is --> Internal revision 14.106_SMP
Dump file is --> Internal revision 14.106_SMP (process dump)

Symbol (d:\devtools\pmdf\14_106_smp_t60\os2krnlr.sym) linked

Current slot number: 00c7
 Slot  Pid  Ppid Csid Ord  Sta Pri  pTSD     pPTDA    pTCB     Disp SG Name
*00c7# 026f 026e 026f 0001 run 0300 f90c6000 fe63a600 f9734234 0b50 1a PYTHON

eax=00000000 ebx=00000000 ecx=00000000 edx=00000001 esi=007fd570 edi=2028c34f
eip=1d8955cb esp=007fd530 ebp=007fd5b8 iopl=0 -- -- -- nv up ei pl nz na po nc
cs=005b ss=0053 ds=0053 es=0053 fs=150b gs=0000 cr2=00000000 cr3=00000000 p=01
005b:1d8955cb 89c3           mov       ebx,eax

# k
005b:1d8952ab 00000003 007fd9d0 1d80df4c 007fd5f0 [LIBC065 __libc_Back_panic + 1a]
005b:1d80dfb9 00000003 007fd9d0 1d80df4c 1d80c794
005b:1d80df13 0000000b 007fd7f0 00000000 00000000
005b:1d80ce33 1685ba80 0000000b 007fd7f0 1d80ce6d [LIBC065 __libc_Back_signalRaise + 147]
005b:1d826653 0000000b 007fd780 007fd7f0 00000005 [LIBC065 _libc_Back_exceptionHandler + 103]
005b:1ffca2ee 007fd9ac 007fffa4 007fd9d0 007fd870 [DOSCALL1 _xcptExecuteUserExceptionHandler + 46]
005b:1ffc9f14 007fd9ac 007fffa4 007fd9d0 007fd870 [DOSCALL1 _xcptR3ExceptionDispatcher + 88]
005b:1ffc9d7c 007fd9ac 007fd9d0 00000053 00000000 [DOSCALL1 DOS32R3EXCEPTIONDISPATCHER + 64]
005b:00000000 0000000e 007fd9ac 007fd9d0 c0000005
005b:1d80b32f 00000000 1d80b310 007fdc48 1c32b652 [LIBC065 __libc_Back_ldrOpen + 1b]
005b:1d82ca9e 00000000 00000002 007fdd7c 007fdd80 [LIBC065 _std_dlopen + 1e]
005b:1c149489 00000000 00000002 007fddec 007fdde8
005b:1c389ac7 00000000 202addcc 00000000 202a9e84
005b:1c38b3db 200edc6c 00000000 202a0bdc 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306755 202a4260 202a0bdc 00000000 202add58 [PYTHON27 PyClassMethod_New + 308]
005b:1c2d8710 202a7d4c 202add4c 00000000 00000002 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 202a7d4c 202add4c 00000000 1c345b4a [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 201cb734 202add0c 00000000 1c3373ec [PYTHON27 PyObject_Call + 40]
005b:1c33ed1e 201cb734 202add0c 00000000 200ed58c [PYTHON27 _PyObject_SlotCompare + 10d]
005b:1c335e72 202add8c 202add0c 00000000 202a0bdc
005b:1c2d8710 200ed58c 202add0c 00000000 1c320410 [PYTHON27 PyObject_Call + 40]
005b:1c38914a 200ed58c 202add0c 00000000 202a9b54
005b:1c38b3db 2027b06c 00000000 202a0bdc 202a0bdc [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c38b508 202a48d8 202a0bdc 202a0bdc 00000000 [PYTHON27 PyEval_EvalCode + 57]
005b:1c39c587 202a48d8 202a0bdc 202a0bdc 00000000 [PYTHON27 PyImport_ExecCodeModuleEx + 97]
005b:1c39f1a6 007fea17 202a48d8 007fe57b 00000000 [PYTHON27 _PyImport_FindModule + 9b6]
005b:1c39f914 00000001 00000000 007fe83c 00000000
005b:1c39fef2 00000005 00000000 007fe988 007fe98c [PYTHON27 PyImport_ReloadModule + 47b]
005b:1c3a0162 007fea17 201f5834 00000006 200a4038 [PYTHON27 PyImport_ReloadModule + 6eb]
005b:1c3a083c 007fea17 007feb1c 00000000 1c318796 [PYTHON27 PyImport_ReloadModule + dc5]
005b:1c3a0d39 00000000 ffffffff 2003c7e0 007feb74 [PYTHON27 PyImport_ImportModuleLevel + 27]
005b:1c382fc5 201f5834 00000000 00000000 00000000
005b:1c389ac7 00000000 201416ac 00000000 00000001
005b:1c2fb513 20195c8c 00000000 20036640 20069654 [PYTHON27 PyGen_NeedsFinalizing + 11a]
005b:1c385673 2013dfcc 201420b4 00000000 201a8964 [PYTHON27 PyEval_EvalFrameEx + b77]
005b:1c38b3db 201a87ec 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c389472 2014eba8 201420b4 00000000 202021b8
005b:1c38b3db 2020206c 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c389472 2014e9b0 201420b4 00000000 2020254c
005b:1c38a5bb 2020240c 00000000 201420b4 00000000
005b:1c38a5bb 201a68ac 00000000 201420b4 00000000
005b:1c38b3db 201b3bec 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306826 2014e578 201420b4 00000000 20141578 [PYTHON27 PyClassMethod_New + 3d9]
005b:1c2d8710 201f6a74 2014156c 20126d74 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 201f6a74 2014156c 20126d74 2006668c [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 200d9a54 2003702c 20126d74 20069a40 [PYTHON27 PyObject_Call + 40]
005b:1c2e873e 200d9a54 2003702c 20126d74 00000180 [PYTHON27 PyMethod_Fini + 118]
005b:1c2d8710 201f538c 2003702c 20126d74 1c320410 [PYTHON27 PyObject_Call + 40]
005b:1c388225 201f538c 2003702c 20126d74 163dd238
005b:1c38b3db 20175e4c 00000000 2006668c 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306755 2005ad58 2006668c 00000000 2012cc38 [PYTHON27 PyClassMethod_New + 308]
005b:1c2d8710 200d2994 2012cc2c 00000000 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 200d2994 2012cc2c 00000000 00000000 [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 200bea04 2003702c 00000000 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c33e7f8 200bea04 2003702c 00000000 2004bc64 [PYTHON27 _PyObject_LookupSpecial + 458]
005b:1c2d8710 2012ca0c 2003702c 00000000 1d7ea9b6 [PYTHON27 PyObject_Call + 40]
005b:1c38914a 2012ca0c 2003702c 00000000 1d7ea843
005b:1c38b3db 2017cd8c 00000000 2006635c 2006635c [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c38b508 200dad58 2006635c 2006635c 00000000 [PYTHON27 PyEval_EvalCode + 57]
005b:1c3ab63f 200dad58 2006635c 2006635c 200305c8 [PYTHON27 PyRun_InteractiveOneFlags + 15f]
005b:1c3ab808 16858fb8 1c3bae22 007fff5c 1c3a0ebb [PYTHON27 PyRun_InteractiveLoopFlags + 46]
005b:1c3abf25 16858fb8 1c3bae22 007fff5c 1c3840f5 [PYTHON27 PyRun_AnyFileExFlags + 3f]
005b:1c3bba5b 16858fb8 1c3bae22 00000000 007fff5c [PYTHON27 Py_Main + ad1]
005b:00010050 00000001 007fffac 5d9dfbe8 5d9dfbe8 [PYTHON main + 20]
005b:00010021 00000001 007fffac 20030180 ffffffff [PYTHON _text + 21]
005b:1d80876b 00000001 1ffece38 00001abd 00000000 [LIBC065 __init_app + b]

# %xcpt
Exception report record at 007fd9ac
ExceptNum c0000005 fHandlerFags 00000000
NestedExceptionReportRecord 00000000
ExceptionAddress 1d83e37b cParameters 00000002
P0 00000001 P1 00000000

Context record at 007fd9d0
ctxflags 00000007
eax 00000000 ebx 1d80b313 ecx 00000000 edx 00000101 edi 2028c34f esi 00000000
esp 007fdb00 ebp 007fdc08 ss  00000053 eip 1d83e37b cs  0000005b
gs  00000000 fs  0000150b es  00000053 ds  00000053 eflags 00010246

Exception registration record at 007fffa4
prev ffffffff handler 1d826550

Found 1 report records on stack

# ln %1d83e37b
%1d83e330 LIBC065 _std_strpbrk + 4b
PDUMP.000.txt (6,335 bytes)   
PDUMP.001.txt (11,005 bytes)   
2012-12-16 SHL
help() modules
extended dump
python 2.7.3

IBM OS/2 Dump Formatter for a retail or an hstrict SMP kernel.
Formatter is --> Internal revision 14.106_SMP

Symbol (d:\devtools\pmdf\14_106_smp_t60\os2krnlr.sym) linked

Current slot number: 00ce

 Slot  Pid  Ppid Csid Ord  Sta Pri  pTSD     pPTDA    pTCB     Disp SG Name
*00ce# 029e 029d 029e 0001 run 0300 f90cd000 fe635488 f9735750 0b50 1b PYTHON

eax=00000000 ebx=00000000 ecx=00000000 edx=00000001 esi=007fd570 edi=2028c34f
eip=1d8955cb esp=007fd530 ebp=007fd5b8 iopl=0 -- -- -- nv up ei pl nz na po nc
cs=005b ss=0053 ds=0053 es=0053 fs=150b gs=0000 cr2=00000000 cr3=00000000 p=01
005b:1d8955cb 89c3           mov       ebx,eax

# k
005b:1d8952ab 00000003 007fd9d0 1d80df4c 007fd5f0 [LIBC065 __libc_Back_panic + 1a]
005b:1d80dfb9 00000003 007fd9d0 1d80df4c 1d80c794
005b:1d80df13 0000000b 007fd7f0 00000000 00000000
005b:1d80ce33 1685ba80 0000000b 007fd7f0 1d80ce6d [LIBC065 __libc_Back_signalRaise + 147]
005b:1d826653 0000000b 007fd780 007fd7f0 00000005 [LIBC065 _libc_Back_exceptionHandler + 103]
005b:1ffca2ee 007fd9ac 007fffa4 007fd9d0 007fd870 [DOSCALL1 _xcptExecuteUserExceptionHandler + 46]
005b:1ffc9f14 007fd9ac 007fffa4 007fd9d0 007fd870 [DOSCALL1 _xcptR3ExceptionDispatcher + 88]
005b:1ffc9d7c 007fd9ac 007fd9d0 00000053 00000000 [DOSCALL1 DOS32R3EXCEPTIONDISPATCHER + 64]
005b:00000000 0000000e 007fd9ac 007fd9d0 c0000005
005b:1d80b32f 00000000 1d80b310 007fdc48 1c32b652 [LIBC065 __libc_Back_ldrOpen + 1b]

005b:1d82ca9e 00000000 00000002 007fdd7c 007fdd80 [LIBC065 _std_dlopen + 1e]
005b:1c0f9489 00000000 00000002 007fddec 007fdde8 in _ctypes.pyd, call dlopen()
005b:1c389ac7 00000000 202addcc 00000000 202a9e84 in python27.dll,  call PyCFunction_Call()

005b:1c38b3db 200edc6c 00000000 202a0bdc 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306755 202a4260 202a0bdc 00000000 202add58 [PYTHON27 PyClassMethod_New + 308]
005b:1c2d8710 202a7d4c 202add4c 00000000 00000002 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 202a7d4c 202add4c 00000000 1c345b4a [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 201cb734 202add0c 00000000 1c3373ec [PYTHON27 PyObject_Call + 40]
005b:1c33ed1e 201cb734 202add0c 00000000 200ed58c [PYTHON27 _PyObject_SlotCompare + 10d]
005b:1c335e72 202add8c 202add0c 00000000 202a0bdc
005b:1c2d8710 200ed58c 202add0c 00000000 1c320410 [PYTHON27 PyObject_Call + 40]
005b:1c38914a 200ed58c 202add0c 00000000 202a9b54
005b:1c38b3db 2027b06c 00000000 202a0bdc 202a0bdc [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c38b508 202a48d8 202a0bdc 202a0bdc 00000000 [PYTHON27 PyEval_EvalCode + 57]
005b:1c39c587 202a48d8 202a0bdc 202a0bdc 00000000 [PYTHON27 PyImport_ExecCodeModuleEx + 97]
005b:1c39f1a6 007fea17 202a48d8 007fe57b 00000000 [PYTHON27 _PyImport_FindModule + 9b6]
005b:1c39f914 00000001 00000000 007fe83c 00000000
005b:1c39fef2 00000005 00000000 007fe988 007fe98c [PYTHON27 PyImport_ReloadModule + 47b]
005b:1c3a0162 007fea17 201f5834 00000006 200a4038 [PYTHON27 PyImport_ReloadModule + 6eb]
005b:1c3a083c 007fea17 007feb1c 00000000 1c318796 [PYTHON27 PyImport_ReloadModule + dc5]
005b:1c3a0d39 00000000 ffffffff 2003c7e0 007feb74 [PYTHON27 PyImport_ImportModuleLevel + 27]
005b:1c382fc5 201f5834 00000000 00000000 00000000
005b:1c389ac7 00000000 201416ac 00000000 00000001
005b:1c2fb513 20195c8c 00000000 20036640 20069654 [PYTHON27 PyGen_NeedsFinalizing + 11a]
005b:1c385673 2013dfcc 201420b4 00000000 201a8964 [PYTHON27 PyEval_EvalFrameEx + b77]
005b:1c38b3db 201a87ec 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c389472 2014eba8 201420b4 00000000 202021b8
005b:1c38b3db 2020206c 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c389472 2014e9b0 201420b4 00000000 2020254c
005b:1c38a5bb 2020240c 00000000 201420b4 00000000
005b:1c38a5bb 201a68ac 00000000 201420b4 00000000
005b:1c38b3db 201b3bec 00000000 201420b4 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306826 2014e578 201420b4 00000000 20141578 [PYTHON27 PyClassMethod_New + 3d9]
005b:1c2d8710 201f6a74 2014156c 20126d74 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 201f6a74 2014156c 20126d74 2006668c [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 200d9a54 2003702c 20126d74 20069a40 [PYTHON27 PyObject_Call + 40]
005b:1c2e873e 200d9a54 2003702c 20126d74 00000180 [PYTHON27 PyMethod_Fini + 118]
005b:1c2d8710 201f538c 2003702c 20126d74 1c320410 [PYTHON27 PyObject_Call + 40]
005b:1c388225 201f538c 2003702c 20126d74 1638d238
005b:1c38b3db 20175e4c 00000000 2006668c 00000000 [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c306755 2005ad58 2006668c 00000000 2012cc38 [PYTHON27 PyClassMethod_New + 308]
005b:1c2d8710 200d2994 2012cc2c 00000000 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c2e94f2 200d2994 2012cc2c 00000000 00000000 [PYTHON27 PyInstance_NewRaw + 3e8]
005b:1c2d8710 200bea04 2003702c 00000000 00000000 [PYTHON27 PyObject_Call + 40]
005b:1c33e7f8 200bea04 2003702c 00000000 2004bc64 [PYTHON27 _PyObject_LookupSpecial + 458]
005b:1c2d8710 2012ca0c 2003702c 00000000 1d7ea9b6 [PYTHON27 PyObject_Call + 40]
005b:1c38914a 2012ca0c 2003702c 00000000 1d7ea843
005b:1c38b3db 2017cd8c 00000000 2006635c 2006635c [PYTHON27 PyEval_EvalCodeEx + 793]
005b:1c38b508 200dad58 2006635c 2006635c 00000000 [PYTHON27 PyEval_EvalCode + 57]
005b:1c3ab63f 200dad58 2006635c 2006635c 200305c8 [PYTHON27 PyRun_InteractiveOneFlags + 15f]
005b:1c3ab808 16858fb8 1c3bae22 007fff5c 1c3a0ebb [PYTHON27 PyRun_InteractiveLoopFlags + 46]
005b:1c3abf25 16858fb8 1c3bae22 007fff5c 1c3840f5 [PYTHON27 PyRun_AnyFileExFlags + 3f]
005b:1c3bba5b 16858fb8 1c3bae22 00000000 007fff5c [PYTHON27 Py_Main + ad1]
005b:00010050 00000001 007fffac 5d9dfbe8 5d9dfbe8 [PYTHON main + 20]
005b:00010021 00000001 007fffac 20030180 ffffffff [PYTHON _text + 21]
005b:1d80876b 00000001 1ffece38 000012fb 00000000 [LIBC065 __init_app + b]

# ln
%1d895490 LIBC065 __libc_Back_panicV + 13b

# %xcpt

Exception report record at 007fd9ac
ExceptNum c0000005 fHandlerFags 00000000
NestedExceptionReportRecord 00000000
ExceptionAddress 1d83e37b cParameters 00000002
P0 00000001 P1 00000000

Context record at 007fd9d0
ctxflags 00000007
eax 00000000 ebx 1d80b313 ecx 00000000 edx 00000101 edi 2028c34f esi 00000000
esp 007fdb00 ebp 007fdc08 ss  00000053 eip 1d83e37b cs  0000005b
gs  00000000 fs  0000150b es  00000053 ds  00000053 eflags 00010246

Exception registration record at 007fffa4
prev ffffffff handler 1d826550

Found 1 report records on stack

# %k 007fdc08 (exh ebp)

007fdc08: Frame 007fdd48 Ret __libc_Back_ldrOpen + 1b
007fdd48: Frame 007fddc8 Ret _std_dlopen + 1e
007fddc8: Frame 007fddf8 Ret 1c0f9489 in _ctypes.pyd, call _std_dlopen
007fddf8: Frame 007fdee8 Ret 1c389ac7 in python27.dll, call PYTHON27 PyCFunction_Call
007fdee8: Frame 007fdf78 Ret PyEval_EvalCodeEx + 793
007fdf78: Frame 007fdff8 Ret PyClassMethod_New + 308
007fdff8: Frame 007fe028 Ret PyObject_Call + 40
007fe028: Frame 007fe278 Ret PyInstance_NewRaw + 3e8
007fe278: Frame 007fe2a8 Ret PyObject_Call + 40
007fe2a8: Frame 007fe2c8 Ret _PyObject_SlotCompare + 10d
007fe2c8: Frame 007fe2f8 Ret 1c335e72
007fe2f8: Frame 007fe328 Ret PyObject_Call + 40
007fe328: Frame 007fe418 Ret 1c38914a
007fe418: Frame 007fe4a8 Ret PyEval_EvalCodeEx + 793
007fe4a8: Frame 007fe4e8 Ret PyEval_EvalCode + 57
007fe4e8: Frame 007fe528 Ret PyImport_ExecCodeModuleEx + 97
007fe528: Frame 007fe708 Ret _PyImport_FindModule + 9b6
007fe708: Frame 007fe858 Ret 1c39f914
007fe858: Frame 007fe9a8 Ret PyImport_ReloadModule + 47b
007fe9a8: Frame 007fe9e8 Ret PyImport_ReloadModule + 6eb
007fe9e8: Frame 007feb38 Ret PyImport_ReloadModule + dc5
007feb38: Frame 007feb58 Ret PyImport_ImportModuleLevel + 27
007feb58: Frame 007febb8 Ret 1c382fc5
007febb8: Frame 007feca8 Ret 1c389ac7
007feca8: Frame 007fece8 Ret PyGen_NeedsFinalizing + 11a
007fece8: Frame 007fedd8 Ret PyEval_EvalFrameEx + b77
007fedd8: Frame 007fee68 Ret PyEval_EvalCodeEx + 793
007fee68: Frame 007fef58 Ret 1c389472
007fef58: Frame 007fefe8 Ret PyEval_EvalCodeEx + 793
007fefe8: Frame 007ff0d8 Ret 1c389472
007ff0d8: Frame 007ff1c8 Ret 1c38a5bb
007ff1c8: Frame 007ff2b8 Ret 1c38a5bb
007ff2b8: Frame 007ff348 Ret PyEval_EvalCodeEx + 793
007ff348: Frame 007ff3c8 Ret PyClassMethod_New + 3d9
007ff3c8: Frame 007ff3f8 Ret PyObject_Call + 40
007ff3f8: Frame 007ff648 Ret PyInstance_NewRaw + 3e8
007ff648: Frame 007ff678 Ret PyObject_Call + 40
007ff678: Frame 007ff6a8 Ret PyMethod_Fini + 118
007ff6a8: Frame 007ff6d8 Ret PyObject_Call + 40
007ff6d8: Frame 007ff7c8 Ret 1c388225
007ff7c8: Frame 007ff858 Ret PyEval_EvalCodeEx + 793
007ff858: Frame 007ff8d8 Ret PyClassMethod_New + 308
007ff8d8: Frame 007ff908 Ret PyObject_Call + 40
007ff908: Frame 007ffb58 Ret PyInstance_NewRaw + 3e8
007ffb58: Frame 007ffb88 Ret PyObject_Call + 40
007ffb88: Frame 007ffbb8 Ret _PyObject_LookupSpecial + 458
007ffbb8: Frame 007ffbe8 Ret PyObject_Call + 40
007ffbe8: Frame 007ffcd8 Ret 1c38914a
007ffcd8: Frame 007ffd68 Ret PyEval_EvalCodeEx + 793
007ffd68: Frame 007ffda8 Ret PyEval_EvalCode + 57
007ffda8: Frame 007ffe08 Ret PyRun_InteractiveOneFlags + 15f
007ffe08: Frame 007ffe58 Ret PyRun_InteractiveLoopFlags + 46
007ffe58: Frame 007ffe98 Ret PyRun_AnyFileExFlags + 3f
007ffe98: Frame 007fff78 Ret Py_Main + ad1
007fff78: Frame 007fff90 Ret main + 20
007fff90: Frame 007fffe0 Ret _text + 21
007fffe0: Frame 00000000 Ret __init_app + b
Can not access 0 - giving up


# ln %1c0f9489
No Symbols Found

# .m %1c0f9489
*har     par      cpg        va    flg next prev link hash hob   hal
 173e %fe3b6f5e 00000020 %1c0f0000 3d9 1705 002e 0000 0cb2 1be7 0000  hco=01711
 hob   har hobnxt flgs own  hmte  sown,cnt lt st xf
 1be7  173e 0000  0838 18cb 18cb  0000 00  00 00 00 shared    d:_ctypes.pyd
 hco=01711 pco=ffd22370  hconext=00000 hptda=07ba f=1d  pid=029e d:python.exe

# u %1c0f9489-5
%1c0f9484 e8f7357301         call      %1d82ca80 ; LIBC065 _std_dlopen
%1c0f9489 85c0               test      eax,eax
%1c0f948b 740a               jz        %1c0f9497
%1c0f948d 890424             mov       dword ptr [esp],eax
%1c0f9490 e8a58c2100         call      %1c31213a
%1c0f9495 c9                 leave
%1c0f9496 c3                 retd

# .m %1c389ac7
*har     par      cpg        va    flg next prev link hash hob   hal
 1686 %fe3b5f8e 000001e0 %1c2d0000 3d9 1663 16c4 0000 0d73 1351 0000  hco=009a5
 hob   har hobnxt flgs own  hmte  sown,cnt lt st xf
 1351  1686 0000  0838 18ac 18ac  0000 00  00 00 00 shared    d:python27.dll
 hco=009a5 pco=ffd1e054  hconext=00000 hptda=07ba f=1d  pid=029e d:python.exe

# u %1c389ac7-5
%1c389ac2 e84d43f9ff         call      %1c31de14
%1c389ac7 8945b8             mov       dword ptr [ebp-48],eax
%1c389aca e9c1feffff         jmp       %1c389990

# ln %1c31de14
%1c31de14 PYTHON27 PyCFunction_Call


# dd 007fddc8
                             pszName  flags
%007fddc8  007fddf8 1c0f9489 00000000 00000002
%007fddd8  007fddec 007fdde8 202addcc 0000017c

dlopen() called to retrieve handle for main application
(python.exe, I assume)

__libc_Back_ldrOpen() assumes pszModuleName is not null
boom
PDUMP.001.txt (11,005 bytes)   

Activities

psmedley

2012-12-16 18:50

administrator   ~0002373

yep, I can reproduce this. libc registers suggest exception is in strpbrk()

Steven Levine

2012-12-16 20:28

manager   ~0002375

Yes, it is. See the attached process dump analysis. It shows the call path.

Running python -v the help() modules traps is reported as

# D:/usr/python27/Lib/ctypes/__init__.pyc matches D:/usr/python27/Lib/ctypes/__init__.py
import ctypes # precompiled from D:/usr/python27/Lib/ctypes/__init__.pyc
dlopen("D:/usr/python27/Lib/lib-dynload/_ctypes.pyd", 0);
import _ctypes # dynamically loaded from D:/usr/python27/Lib/lib-dynload/_ctypes.pyd

Killed by SIGSEGV
pid=0x0288 ppid=0x025e tid=0x0001 slot=0x00c1 pri=0x0200 mc=0x0001
D:\USR\PYTHON27\PYTHON.EXE
LIBC065 0:0005e37b
cs:eip=005b:1d83e37b ss:esp=0053:007fdaf0 ebp=007fdbf8
 ds=0053 es=0053 fs=150b gs=0000 efl=00010246
eax=00000000 ebx=1d80b313 ecx=00000000 edx=00000101 edi=2028c34f esi=00000000
Process dumping was disabled, use DUMPPROC / PROCDUMP to enable it.

I'm not sure, but I would suspect something bad is happening while loading ctypes.pld. It's getting late here. If you don't fixed it before I wake up, I will capture an extended dump and see if I can see why the pointer is null.

psmedley

2012-12-17 06:13

administrator   ~0002377

according to the map file at least, _ctypes.pyd doesn't use strpbrk()

It's only used by python27.dll & readline.pyd - I didn't get time to investigate any further. Will go read your notes now.

Steven Levine

2012-12-17 08:28

manager   ~0002379

Sorry for the confusion. My point was something happened in _ctypes.pyd that caused the dlopen exception to occur. A more verbose dump shows what happened. We have a unimplemented feature in libc's dlopen (src\lib\sys\b_ldrOpen.c). dlopen() accepts a NULL parameter to request the handle of the main executable (python.exe in our case). __libc_Back_ldrOpen() does not yet support this.

I'll submit a libc ticket and see if I can come up with a temporary workaround for the python code.

I suspect the exception is triggered by the code at Modules\_ctypes\callproc.c line 1424.

psmedley

2012-12-18 18:46

administrator   ~0002380

Correct re: line 1424 causing the crash.

I added a printf either side of the call to confirm

Steven Levine

2012-12-18 19:59

manager   ~0002381

If the semantics if dlopen(NULL, flags) is equivalent to dlopen("_ctypes.pyd", flags), this can be fixed in callproc.c pending a proper libc fix.

What I am not sure about yet is if dlopen should have been called with a NULL arg.

Issue History

Date Modified Username Field Change
2012-12-11 18:41 Steven Levine New Issue
2012-12-16 18:50 psmedley Note Added: 0002373
2012-12-16 20:18 Steven Levine File Added: PDUMP.000.txt
2012-12-16 20:28 Steven Levine Note Added: 0002375
2012-12-17 06:13 psmedley Note Added: 0002377
2012-12-17 08:09 Steven Levine File Added: PDUMP.001.txt
2012-12-17 08:28 Steven Levine Note Added: 0002379
2012-12-18 18:46 psmedley Note Added: 0002380
2012-12-18 19:59 Steven Levine Note Added: 0002381