This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-08-20.02:38:17
SpamBayes Score 0.00030133926
Marked as misclassified No
Message-id <1219199901.39.0.0167623023104.issue3611@psf.upfronthosting.co.za>
In-reply-to
Content
The crash is on ProcError exception raising (line 21):

    20      except IOError as err:
    21          raise ProcError("Unable to open %r: %s" % (filename, 

---

(gdb) where
#0  0x0805bcc7 in PyObject_Hash (v=0x8691034) at Objects/object.c:796
#1  0x08062125 in set_contains_key (so=0x856ec6c, key=0x8691034) at 
Objects/setobject.c:682
#2  0x0806659f in PySet_Contains (anyset=0x856ec6c, key=0x8691034) at 
Objects/setobject.c:2263
#3  0x080def3a in print_exception_recursive (f=0xb7bea654, 
value=0x8656814, seen=0x856ec6c) at Python/pythonrun.c:1432
#4  0x080df0ea in PyErr_Display (exception=0x84542ac, value=0x8656814, 
tb=0x865bc34) at Python/pythonrun.c:1470
#5  0x080e68f6 in sys_excepthook (self=0xb7e013b4, args=0x865b334) at 
Python/sysmodule.c:119
#6  0x08161d29 in PyCFunction_Call (func=0xb7e016c4, arg=0x865b334, 
kw=0x0) at Objects/methodobject.c:81
#7  0x08118cc5 in PyObject_Call (func=0xb7e016c4, arg=0x865b334, 
kw=0x0) at Objects/abstract.c:2181
#8  0x080b2ea8 in PyEval_CallObjectWithKeywords (func=0xb7e016c4, 
arg=0x865b334, kw=0x0) at Python/ceval.c:3283
#9  0x080de463 in PyErr_PrintEx (set_sys_last_vars=1) at 
Python/pythonrun.c:1258
#10 0x080de06f in PyErr_Print () at Python/pythonrun.c:1150
#11 0x080e0007 in Py_FatalError (msg=0xbf9a1498 "Python/ceval.c:2459 
object at 0x865b6b4 has negative ref count -606348326")
    at Python/pythonrun.c:1863
#12 0x0805a821 in _Py_NegativeRefcount 
(fname=0x8197098 "Python/ceval.c", lineno=2459, op=0x865b6b4) at 
Objects/object.c:194
#13 0x080b004f in PyEval_EvalFrameEx (f=0x85b4324, throwflag=0) at 
Python/ceval.c:2459
(...)

(gdb) frame 13
#13 0x080b004f in PyEval_EvalFrameEx (f=0x85c9794, throwflag=0) at 
Python/ceval.c:2459
2459                                            
Py_CLEAR(tstate->exc_traceback);

(gdb) pystack
/home/haypo/ptrace/ptrace/linux_proc.py (21): openProc
/home/haypo/ptrace/ptrace/linux_proc.py (24): readProc
/home/haypo/ptrace/ptrace/linux_proc.py (31): readProcessProc
/home/haypo/ptrace/ptrace/linux_proc.py (74): readProcessStat
(...)

---

linux_proc.py code near line 21:
    (...)
     7  class ProcError(Exception):
     8      pass
    (...)
    16  def openProc(path):
    17      try:
    18          filename = procFilename(path)
    19          return open(filename)
    20      except IOError as err:
    21          raise ProcError("Unable to open %r: %s" % (filename, 
err))
    (...)
    29  def readProcessProc(pid, key):
    30      try:
    31          return readProc(path_join(str(pid), str(key)))
    32      except ProcError as error:
    33          raise ProcError("Process %s doesn't exist: %s" % (
    34              pid, error))
    (...)
    73  def readProcessStat(pid):
    74      stat = readProcessProc(pid, 'stat')
    75      return ProcessState(stat)
    76
History
Date User Action Args
2008-08-20 02:38:21vstinnersetrecipients: + vstinner
2008-08-20 02:38:21vstinnersetmessageid: <1219199901.39.0.0167623023104.issue3611@psf.upfronthosting.co.za>
2008-08-20 02:38:20vstinnerlinkissue3611 messages
2008-08-20 02:38:18vstinnercreate