New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running many tests with sqlite in-memory backend fails with Segmentation fault #409
Comments
I'm getting a similar error, althought I just started a project and only have one (very) basic test, and am using the spatialite plugin for SQLite. Interestingly, my DATABASES setting specifies
|
Update: my tests now pass after installing pytest-ipdb, I'm on v0.1dev2:
It installs a fair amount of dependencies -- one of which may have fixed the problem -- but I don't have the time at the moment to dig into which one specifically. Here's the list:
|
Hopefully related: I have a test suite running on sqlite - it passes during normal operation. However if I add |
Not sure if it's related, but after further testing I only experienced segfaults or bus errors with SQLite > 3.13.0 |
I'm on an old sqlite 2.8.17 |
If you are using |
There's a bug in sqlite 3.13 or so which causes segmentation faults, and sadly it's the default version in ubuntu. You should try to update sqlite and see if it fixes your issue : wget https://github.com/ghaering/pysqlite/archive/2.8.3.tar.gz \
&& wget https://www.sqlite.org/2016/sqlite-autoconf-3150200.tar.gz \
&& tar -xzf sqlite-autoconf-3150200.tar.gz \
&& tar -xzvf 2.8.3.tar.gz \
&& cd sqlite-autoconf-3150200 \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& cp /usr/local/lib/libsqlite3.so.0.8.6 /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 \
&& cp -av sqlite-autoconf-3150200/. pysqlite-2.8.3/ \
&& cd ./pysqlite-2.8.3 && python setup.py build_static install \
&& /opt/venv/bin/python setup.py build_static install |
@nMustaki Do you have a link/issue for that bug? I'm curious |
This one if I recall corectly but I cannot check right now :
https://www.sqlite.org/src/info/16c9801ceba49
…On Fri, 27 Jan 2017, 15:25 Jon Miller, ***@***.***> wrote:
@nMustaki <https://github.com/nMustaki> Do you have a link/issue for that
bug? I'm curious
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#409 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA-fUbC400zZ_Tq89EP3tZQlUGTrPMpGks5rWf5mgaJpZM4Kg-gh>
.
|
Nobody provides a stacktrace?! 🤷♂️ |
Not really a pytest-django bug though - closing. Feel free to provide a PR if you have some workaround, and it's relevant though. |
Just FYI I'm seeing a very similar backtrace with Django 2.0 and sqlite 3.8.2, Python 3.6.3 on Ubuntu (Travis CI) and not on my devel workstation which is RHEL 7 with an older sqlite3. From what I can tell the segafult happens on an UPDATE query. I've also dropped pytest and running my tests via |
@atodorov you may want to take a look at Django ticket #24080 which seems to indicate this is likely an issue with SQLite rather than with Django. One commenter points to related ticket on SQLite #7f7f8026eda38 which was fixed in version 3.12.1. I believe I eventually resolved my original issue by upgrading to latest SQLite as well, so I suggest you try that as well. |
thanks for the links. I've seen the Django ticket and indeed an upgrade of sqlite solved the issue. However I don't think I've been hitting the same sqlite issue as you linked. Anyway update solves it. |
In-memory sqlite seems to cause segmentation faults as noted here: pytest-dev/pytest-django#409 Travis-CI gives following error message: Fatal Python error: Segmentation fault
This happen to me a few times since I moved a large test base, of around 450 tests, to
py.test
(fromnose
), changing the django backend to either named sqlite db (test.db
) or another backend does not seg fail. The failure seems to occur around the 390 test mark; even if I remove the specific tests the fault happened on.I tried this with py.test 2.9 and latest 3.0.1 or 3.0.3.
The text was updated successfully, but these errors were encountered: