-
Notifications
You must be signed in to change notification settings - Fork 74
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
Python3 crashes on importing sqlite3 - solution included #62
Comments
See also this (very old) issue on the missing mremap() needed by sqlite: cloudius-systems/osv#184 |
@nyh I've seen it. As nice as it would be to get a more optimized version of OSv, I don't have the time to get back into C++ this quarter and have to rely on things that are implemented. My current priority is to reduce the number of OSv patches my application is carrying |
I might be able to pick up #184 given that @pekka Enberg
<penberg@scylladb.com> already submitted patch long time ago and hopefully
it is as easy as fixing issues that Nadav found.
Waldek
…On Thu, Feb 28, 2019 at 5:09 PM pshem ***@***.***> wrote:
@nyh <https://github.com/nyh> I've seen it. As nice as it would be to get
a more optimized version of OSv, I don't have the time to get back into C++
this quarter and have to rely on things that are implemented. My current
priority is to reduce the number of OSv patches my application is carrying
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#62 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFDSITZe2ckxmBGfXUbCGdXK9QD-Ht2Aks5vSFOmgaJpZM4bXsCD>
.
|
@pshem, some answers to your questions/ideas:
|
|
|
by using sqlite compiled without `MREMAP`(see cloudius-systems/osv#184 and cloudius-systems#62)
#64 is a patch using |
When using the python3x image, one of the big no-gos is
![selectionshot_2019-02-07_13 32 15](https://user-images.githubusercontent.com/26800787/53595368-f8fc6580-3b94-11e9-8726-a1fb182c0c82.png)
import sqlite3
. Because it is a standard library module, it is present in every python3x image. However, importing it directly or indirectly causes OSv to crash:I needed sqlite to work after finding out django would insist on importing sqlite even when using a different database as the main data storage. I struck gold when I realized that OSv-apps contained a working sqlite3 application, already compiled as a shared library
sqlite.so
. So I decided to see if they would be compatible... and they were! Here are the steps I took:VERSION=3270200
andYEAR=2019
,sqlite
imagepython3x,httpserver
image/apps/sqlite/sqlite.so
to OSv with the httpserver, placing it as/usr/lib/libsqlite3.so.0
I was wondering what the best way to upstream this python improvement? For personal use, I added
rsync -a $BASEDIR/../sqlite/sqlite.so $ROOTFS/usr/lib/libsqlite3.so.0
at the end of main() in python3x's GET, which works just fine. For upstream use, we probably shouldn't assume sqlite has been build before python was. I tried usingapi.require
in module.py but it only seems to accept a single argument...I would be happy to write a PR fixing sqlite in
python3x
, but I need some help figuring out the proper way to do this. In the meantime, I'd be happy to upstream the version update to sqlite since that seems to work just fine, but I've only tried a few functions from the sqlite shell outside using it in a python project, so I'm not confident it is a non-breaking update.The text was updated successfully, but these errors were encountered: