FAQ
I'm trying to compile a new extension module (based on mx.TextTools),
and I'm discovering that the programme gets a Fatal Python error after
completing a test suite (likely during cleanup of the various modules).
I'm trying to figure out what the error really means, and in which
crack I should put my finger to stop the dike from bursting. Is there a
guide/guidelines/helpful-elf-who-sneaks-into-the-shop-at-night for
debugging this kind of error anywhere?

S:\sp\simpleparse\tests>mx_flag.py
......
----------------------------------------------------------------------
Ran 6 tests in 0.000s

OK
Fatal Python error: PyThreadState_Get: no current thread

abnormal program termination

Help appreciated,
Mike
_______________________________________
Mike C. Fletcher
http://members.rogers.com/mcfletch/

Search Discussions

  • Tim Peters at Jul 8, 2002 at 4:01 am
    [Mike C. Fletcher]
    I'm trying to compile a new extension module
    Aha! There's your problem <0.4 wink>.
    (based on mx.TextTools), and I'm discovering that the programme gets a
    Fatal Python error after completing a test suite (likely during cleanup
    of the various modules).
    I'm trying to figure out what the error really means, and in which
    crack I should put my finger to stop the dike from bursting. Is there a
    guide/guidelines/helpful-elf-who-sneaks-into-the-shop-at-night for
    debugging this kind of error anywhere?
    No, these are hard, but if Python didn't produce this message, your program
    would die nanoseconds later with a NULL-pointer dereference instead.

    Are you using threads? If so, the most likely cause is that some thread is
    calling back into the Python interpreter (== calling a function in the
    Python C API) without first acquiring the global interpreter lock.

    You didn't say which version of Python you're using, but in older versions
    it's also possibly due to a shutdown race that has since been fixed. You
    also didn't say which OS you're using, and assorted races in practice have
    historically been strongly correlated with OS due to differences in their
    native thread scheduling (e.g., Windows is much happier to swap threads
    frequently than is Linux, and some races discovered on the one proved
    impossible to provoke on the other).

    If you're not using threads, you've got a real mystery on your hands.

    just-another-reason-it-sucks-to-be-you-if-so<wink>-ly y'rs - tim

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJul 7, '02 at 8:35p
activeJul 8, '02 at 4:01a
posts2
users2
websitepython.org

2 users in discussion

Tim Peters: 1 post Mike C. Fletcher: 1 post

People

Translate

site design / logo © 2022 Grokbase