Hi there,

there seems to be something wrong with either the SQLite backend, the 
SQLite library itself or Django's transaction handling. Whenever I try to 
run the test suite of a specific project of mine 
(https://github.com/jonashaag/fahrtkostenrechner), using 
`fahrtkostenrechner/manage.py test events`, it shows the following behavior:

* On Linux, it doesn't crash and shows actual test failures.
* On OSX, with SQLite's in-memory database as test database, a segfault (!) 
occurs. (I'm not familiar with the lower-level Python SQLite bindings, but 
I guess a segfault should *never* happen in the first place?!)
* On OSX, with a on-disk test database, a 
"django.db.utils.ProgrammingError: Cannot operate on a closed database." 
(caused by `_cursor()`: 
https://github.com/django/django/blob/4d0f8831a7498ab3b1ebcf4cafa2ee234503e4f8/django/db/backends/base/base.py#L206)
 
occurs.

It looks to me that the cause of this is some unfinished transaction 
rollback, but I'm not sure, so I'm asking for guidance here. In the file 
linked above in L193, is it legitimate for `needs_rollback` to  be True? In 
my debugging I found `connection != None` and `needs_rollback=True` 
whenever `_cursor()` fails in L206, so I figured maybe there might be an 
outstanding rollback for some reason?

I use Python 3.5, SQLite 3.9.2 and I can reproduce the crash on Django 
>=1.8.4,<1.9.

Jonas

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/39e18dc4-7e7d-4e99-a56c-e0e133ff5938%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to