Fatal Python error: Inconsistent interned string state.

254 views
Skip to first unread message

Ken Schwencke

unread,
Jul 27, 2009, 4:57:21 PM7/27/09
to Django users
I'm working with GeoDjango and PostGIS, and I'm getting "Fatal Python
error: Inconsistent interned string state." errors randomly while
using the development server.

It doesn't happen on any specific view (it's happened on the two main
views), it doesn't happen while doing any specific query, it
just....happens.

I rarely get a tracebacks when it happens, though today I did:

Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_manager(settings)
File "/Users/kschwen/Dev/django_src/django/core/management/
__init__.py", line 340, in execute_manager
utility.execute()
File "/Users/kschwen/Dev/django_src/django/core/management/
__init__.py", line 295, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/kschwen/Dev/django_src/django/core/management/base.py",
line 195, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/kschwen/Dev/django_src/django/core/management/base.py",
line 222, in execute
output = self.handle(*args, **options)
File "/Users/kschwen/Dev/django_src/django/core/management/commands/
runserver.py", line 83, in handle
autoreload.main(inner_run)
File "/Users/kschwen/Dev/django_src/django/utils/autoreload.py",
line 118, in main
reloader(main_func, args, kwargs)
File "/Users/kschwen/Dev/django_src/django/utils/autoreload.py",
line 91, in python_reloader
reloader_thread()
File "/Users/kschwen/Dev/django_src/django/utils/autoreload.py",
line 72, in reloader_thread
if code_changed():
File "/Users/kschwen/Dev/django_src/django/utils/autoreload.py",
line 59, in code_changed
mtime = stat.st_mtime
AttributeError: 'str' object has no attribute 'st_mtime'
Fatal Python error: Inconsistent interned string state.

Generally, if I get a preceding error, I get something along the lines
of this:

Assertion failed: (pool->ref.count > 0), function PyObject_Free, file
Objects/obmalloc.c, line 1109.


Anybody ever hit this error? From Googling, I gather it has something
to do with a C extension either mis-managing memory or encountering
garbage while/after allocating. I'm strapping on my debugging shoes,
but I'm hoping someone can point me in a good direction.

Django version 1.1 pre-alpha SVN-9690, Python version 2.5.1
(r251:54863, Feb 6 2009, 19:02:12)

Alex Robbins

unread,
Jul 28, 2009, 9:11:28 AM7/28/09
to Django users
You mentioned that it just happens sometimes, and I see from your
traceback it happened in the autoreload.py file. Do you still see the
errors if you call runserver --noreload ?
Alex
Reply all
Reply to author
Forward
0 new messages