[Twisted-Python] crasher

Andrew Bennetts andrew-twisted at puzzling.org
Tue Oct 29 16:50:57 MST 2002


On Tue, Oct 29, 2002 at 05:24:46PM -0600, Glyph Lefkowitz wrote:
> 
> I am going out of my mind trying to figure out a way to debug this, so extra
> eyes are helpful, but I don't think this bug can be found through normal
> bughunting; you'd have to be pretty familiar with whatever code is causing the
> problem.  I figure it might be either woven, twisted.protocols.http or
> twisted.internet.
> 
> Help? :-)

Isn't there a hack you can do to sys.settracehook (or whatever it is) to
print each python function call entry & exit?  That would help narrow stuff
down.

I've also heard there's a gdb hack which lets it understand Python
tracebacks, so that it correctly displays them intermingled with the C
traceback when you issue a 'bt' command... but I can't seem to find it :(

Also, this url from google looks promising:
    http://groups.google.com/groups?q=gdb+python+traceback&hl=en&lr=&ie=UTF-8&safe=off&selm=14201.27231.1003.466027%40anthem.cnri.reston.va.us&rnum=4

Choice quote:
"""
First, get the pid of the running Python process.  Start up gdb on the
python executable and at the gdb prompt type "attach XXX" where XXX is
the pid.  Now, at the gdb prompt, type the following:

(gdb) call PyRun_SimpleString("import sys, traceback; sys.stderr=open('/tmp/tb','w',0); traceback.print_stack()")
"""

-Andrew.





More information about the Twisted-Python mailing list