Hi Jonas, I wonder if https://code.djangoproject.com/ticket/24080 might be 
related. If you could distill the project you linked into a minimal example 
to reproduce that would be ideal. By the way, "is it a bug?" questions 
normally go to django-users. Tim

On Thursday, December 3, 2015 at 9:02:54 AM UTC-5, Jonas H wrote:
>
> 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 [email protected].
To post to this group, send email to [email protected].
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/32892c49-b999-4b23-a107-334dfb6b9d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to