I see advice on how to debug a python module that hangs up the process

JD lists at webcrunchers.com
Tue Dec 16 22:03:05 CET 2003


This is another Python problem,   I think might be unrelated to
the earlier bug I found,  and eventually figured out how to
report it to Sourceforge.

This  is related to a question I have about Python hanging up
either from a shell,  or by importing a module.  This I would not
consider a bug,  but more on my inexperience with Python.

If my code causes Python to just hang up,  and not allowing me
to break out with control-C or control-D,   is there a way to
find out what's going on?    I don't think it's going into some
infinite loop,  because I can usually break out of them with
control-C.    What would cause the Python run-time system
to just loose things?    The console is dead,  but it echo's
carriage returns but that's all it does.  The only way I can
release it,  is to kill the process.

  Is there someone who I might contact
via phone to walk me through this? (Assuming I can't get adequate
information here? Or does anyone care about Python bugs?) This is in
Python 2.3.3c1 on OpenBSD (though I doubt the OS matters). The symptom 
is
that I run my program and Python locks up. I cannot control-C or 
control-D
to get out of it; I have to log in separately and kill -9 the process. 
The
process is listed as "D+" while it is hung, though it doesn't seem to be
accessing the disk, and I'm quite sure there are no disk problems 
(though
I'm not physically next to the server, so I can't check the drive LED).

How should I approach debugging this? Are there Python tools? Or should 
I
use gdb? ktrace? systrace? I'm assuming I have to do this, as a bug 
report
which reads "Python locks up" isn't too useful.

John






More information about the Python-list mailing list