Python segmentation fault?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael B. Trausch

    #1

    Python segmentation fault?

    Is there a way to debug scripts that cause segmentation faults? I can
    do a backtrace in gdb on Python, but that doesn't really help me all
    that much since, well, it has nothing to do with my script... :-P

    Any ideas?

    Thanks,
    Mike
  • Paul Rubin

    #2
    Re: Python segmentation fault?

    "Michael B. Trausch" <"mike$#at^&nos pam!%trauschus" writes:
    Is there a way to debug scripts that cause segmentation faults? I can
    do a backtrace in gdb on Python, but that doesn't really help me all
    that much since, well, it has nothing to do with my script... :-P
    Scripts should never cause segmentation faults. Extension modules can
    cause them. One frequent cause is a refcount management error. There
    are various tools around for checking refcount correctness. Here is one:


    Comment

    • Klaas

      #3
      Re: Python segmentation fault?


      Michael B. Trausch wrote:
      Is there a way to debug scripts that cause segmentation faults? I can
      do a backtrace in gdb on Python, but that doesn't really help me all
      that much since, well, it has nothing to do with my script... :-P
      Yes. If you think it is a python interpreter bug, create a
      self-contained script which reproduces the issue, and file a python bug
      report.

      I'd be interested to see the stack trace--I recently uncovered a
      segfault bug in python2.5 and I might be able to tell you if it is the
      same one.

      -Mike

      Comment

      • Markus Rosenstihl

        #4
        Re: Python segmentation fault?

        On 2006-10-24 02:58:56 +0200, "Michael B. Trausch"
        <"mike$#at^&nos pam!%trauschus" said:
        Is there a way to debug scripts that cause segmentation faults? I can
        do a backtrace in gdb on Python, but that doesn't really help me all
        that much since, well, it has nothing to do with my script... :-P
        >
        Any ideas?
        >
        Thanks,
        Mike
        I had segmentation faults on Mac, they were coming from a unpatched
        readline 5.1
        Once compiled with readline 5.2 it was working flawlessly

        Regards,
        Markus

        Comment

        • Michael B. Trausch

          #5
          Re: Python segmentation fault?

          Klaas wrote:
          Michael B. Trausch wrote:
          >Is there a way to debug scripts that cause segmentation faults? I can
          >do a backtrace in gdb on Python, but that doesn't really help me all
          >that much since, well, it has nothing to do with my script... :-P
          >
          Yes. If you think it is a python interpreter bug, create a
          self-contained script which reproduces the issue, and file a python bug
          report.
          >
          I'd be interested to see the stack trace--I recently uncovered a
          segfault bug in python2.5 and I might be able to tell you if it is the
          same one.
          >
          I finally found out what the problem was -- I was using something that
          was in the wx.* set of classes and functions, and it was the item
          segfaulting. I was apparently making an assumption or doing something
          wrong, though I didn't have this project in Subversion at the time so I
          can't say exactly which changes fixed it. I have it in Subversion now,
          though, so that in the future I can be sure to better find out what is
          going on by having all of the information handy.

          Thanks for the help!

          -- Mike

          Comment

          Working...