Fatal Python error: Inconsistent interned string state

Byron Morgan bmorgan at usa.net
Sat Mar 13 01:39:02 EST 2004


Anyone run into this before?

I have a python app that has been reliable, running for days on end
without a crash. Suddenly, It repeatedly crashes with the following
message:

"Fatal Python error: Inconsistent interned string state.
abnormal program termination"

Some background:

Platform is W2K.

My app receives data (short strings, 25 - 40 character in length) from
a telnet connection, using telnetlib. The strings are placed in a
queue (I am using Queue.Queue(). The telnet session runs in a thread.
A second thread gets strings from the queue and does stuff with the
contents, involving queries to a mysql database. The main thread just
watches for keyboard input for a shutdown command. Other than that, it
prints to console and logs to a file.

I cannot find any place in my code that overtly uses the concept of an
interned string (I had never before heard of an interned string). The
crashes began after I started using the following simple construct, to
trap a particular value in the data:

if line[0] == '2': (do something)

Naturally, I assume that the problem may have something to do with
this change, but I cannot fathom how it could cause this problem

Byron Morgan



More information about the Python-list mailing list