More info on my Python problem...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JD

    More info on my Python problem...

    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


  • Matt Gerrans

    #2
    Re: More info on my Python problem...

    "JD" wrote:[color=blue]
    > 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.[/color]

    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?
    [color=blue]
    > Is there someone who I might contact via phone to walk me through
    > this? (Assuming I can't get adequate information here? ...[/color]

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

    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:



    Comment

    • Peter Otten

      #3
      Re: More info on my Python problem...

      JD wrote:
      [color=blue]
      > 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.[/color]

      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.Threa d(target=foreve r).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



      Comment

      Working...