[pypy-issue] [issue1304] Django 1.4.2 ORM segfaults with PyPy 1.9

dktc tracker at bugs.pypy.org
Mon Oct 29 11:28:17 CET 2012

New submission from dktc <dkruglyak at gmail.com>:

I am trying to migrate a performance-critical Django application to PyPy and running into some weird crashes. After some 
effort I was able to isolate the issues to something easy to reproduce from Django command line.

PyPy was translated on my own CentOS 5.8 system. I've confirmed via command line that MySQLdb works fine and this looks 
like a Django ORM problem. I have no idea how to debug this further. Any thoughts / recommendations?

(pypy-1.9)[root at localhost]# python /home/myapp/manage.py shell --settings=myapp
Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Oct 27 2012, 02:45:53)
[PyPy 1.9.0 with GCC 4.1.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from django.contrib.auth.models import User
>>> u = User.objects.get(id=1)
Fatal error in cpyext, CPython compatibility layer, calling PyTuple_SetItem
Either report a bug or consider not using this particular extension
<OpErrFmt object at 0x2ada72c1f288>
RPython traceback:
  File "module_cpyext_api_1.c", line 39377, in PyTuple_SetItem
  File "module_cpyext_pyobject.c", line 1071, in BaseCpyTypedescr_realize
  File "objspace_std_objspace.c", line 3394, in allocate_instance__W_ObjectObject
  File "objspace_std_typeobject.c", line 2977, in W_TypeObject_check_user_subclass
Segmentation fault

messages: 4916
nosy: dktc, pypy-issue
priority: critical
release: 1.9
status: unread
title: Django 1.4.2 ORM segfaults with PyPy 1.9

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list