#24080: Sqlite segmentation fault regression when running tests (since 1.7.2)
-----------------------------------+------------------------------------
Reporter: stevejalim | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: sqlite nose | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+------------------------------------
Comment (by yakky):
My experience with this issue is mostly related to ManyToMany fields.
I even traced all the SQL queries, and apparently sqlite does not handle
the cleanup phase well and segfaults when truncating the data when
destroying database. I can try reproduce this and post the log, if this
can be useful.
I managed to solve that by clearing many to many fields in `tearDown`:
{{{#!python
def tearDown(self):
self.user.sites.clear()
for post in Post.objects.all():
post.sites.clear()
post.tags.clear()
super(BaseTest, self).tearDown()
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24080#comment:55>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.c5e9d60b301c685081f04d45e7690dff%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.