More info on my Python problem...

J

JD

This is more details about my problem, which I already managed
to post as a Python bug to Sourceforge

This problem is not related to the bug I encountered earlier, and
this is related to a question I have about Python hanging up
either from a shell, or my importing a module.

I want to figure out if this really IS a python bug, but I suspect
that if it hangs up the console, it would be a bug.

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 to useful.

John
 
M

Matt Gerrans

JD said:
I want to figure out if this really IS a python bug, but I suspect
that if it hangs up the console, it would be a bug.

That's a bit of a leap. I've had plenty of Python programs that did things
like that and none of it was because of a bug in Python. After all, it is
possible for a module to do any silly thing it wants, entirely out of
Python's purview. I think something stupid like range(100000000) is
sufficient to get this behavior on some platforms/configurations. Is that
a Python bug?
Is there someone who I might contact via phone to walk me through
this? (Assuming I can't get adequate information here? ...

Operators are standing by. If you are not completely satisfied, there is
100% money-back guarantee, too.
... Or does anyone care about Python bugs?)

Seriously, asking sardonic questions is probably not the optimal approach to
generate an outpouring of sympathy and helpfulness. Anyway, it may come as
a shock to you, but there is probably a bit of a chasm between people
"caring about Python bugs" and wanting to give you free phone support.

You might start by fulfilling the promise of your subject and provide "more
info." Such as, what is your Python program doing, what modules is it
using, etc. Common sense stuff, as described here:
http://www.catb.org/~esr/faqs/smart-questions.html
 
P

Peter Otten

JD said:
This is more details about my problem, which I already managed
to post as a Python bug to Sourceforge

This problem is not related to the bug I encountered earlier, and
this is related to a question I have about Python hanging up
either from a shell, or my importing a module.

I want to figure out if this really IS a python bug, but I suspect
that if it hangs up the console, it would be a bug.

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 to useful.

Can you make a small variant of your program that still shows the error/bug?
Chances are that in the process of making such a variant you will find the
error yourself. If not, you have something that lends itself to posting on
c.l.py. Only if no one here can point you to an error in your code, you
should file a bug report.

Here is a script that shows similar behaviour:

import threading, time

def forever():
while True:
print "alive and kicking"
time.sleep(1)

threading.Thread(target=forever).start()

The print statement makes it pretty clear what's going on when you run it.
Putting print before/after access of external resources and into inner
loops should make it clear where your program hangs.

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,167
Messages
2,570,911
Members
47,453
Latest member
MadelinePh

Latest Threads

Top