Hi,

I encountered this segfault problem again and changed the django's database 
backend from sqlite3 to postgresql. Some errors started to show because of 
database constraints for maximum length of a string being checked and enforced 
by postrgresql (for example : "DataError: value too long for type character 
varying(255)") . Inserting a string longer than expected did not cause a 
segfault every time, but it did happen from time to time (See for example the 
minimal project to reproduce that I provided in a previous mail).

I hope this help.

Regards,


-----Message d'origine-----
De : drhsql...@gmail.com [mailto:drhsql...@gmail.com] De la part de Richard 
Hipp Envoyé : lundi 23 janvier 2017 14:25 À : SASSOULAS Pierre 250112 
<pierre.sassou...@cea.fr> Objet : Re: [sqlite] Segfault when inserting ascii 
text using python-Django with Sqlite3

Apparently, a full Django install is required to reproduce the problem.  I do 
not have Django installed anywhere here, and really do not want to do so if not 
necessary.

Do you have some way of reproducing the problem without installing Django?

Can you provide us with a complete stack trace at the point of failure?

Can you retry using a more recent version of SQLite, such as 3.16.2?

On 1/23/17, SASSOULAS Pierre 250112 <pierre.sassou...@cea.fr> wrote:
> Here it is.
>
> I since found that replacing the migration file in myapp/migrations 
> with "python manage.py makemigrations" makes the segfault disappear 
> (for the sanded down version at least). Maybe something to consider 
> during troubleshooting ?
>
> Regards
>
> -----Message d'origine-----
> De : drhsql...@gmail.com [mailto:drhsql...@gmail.com] De la part de 
> Richard Hipp Envoyé : samedi 21 janvier 2017 16:11 À : SASSOULAS 
> Pierre 250112 <pierre.sassou...@cea.fr> Objet : Re: [sqlite] Segfault 
> when inserting ascii text using python-Django with Sqlite3
>
> This mailing list strips attachments.  Please send the attachment via 
> private email directly to me.
>
> On 1/20/17, SASSOULAS Pierre 250112 <pierre.sassou...@cea.fr> wrote:
>> Hi,
>>
>> I've encountered a segfault in a python-django project when inserting 
>> seemingly random innocent looking data into an sqlite3 databse. It 
>> happen while testing a custom command in Django unit-test.
>>
>> Version :
>> python --version
>> Python 2.7.12
>>
>> sqlite3 --version
>> 3.11.0 2016-02-15 17:29:24 3d862f207e3adc00f78066799ac5a8c282430a5f
>>
>> pip freeze
>> Django==1.10.5
>>
>> Here's the error in gdb :
>>
>> gdb python
>> (gdb) run manage.py test
>> Starting program:
>> /home/user/workspace/sqlitesegfaultbug/.env/bin/python
>> manage.py test
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff4545ad8 in ?? () from
>> /usr/lib/x86_64-linux-gnu/libsqlite3.so.0
>>
>> The bug happened specifically for a String between "Sonde de platine"
>> and "Thermohygromètre" initially. I enclosed a sanded down django 
>> project in case you want to reproduce. The problem happen on another 
>> string, but I don't think that a particular string is the problem.
>> There is logging in place that could help diagnose the problem.
>>
>> Step to reproduce once the project is unzipped :
>>             virtualenv .env
>>             source .env/bin/activate
>>             pip install --upgrade pip
>>             pip install --requirement=requirements.txt
>>             python manage.py test
>>
>> Thank in advance and thank you for the time you already invested in 
>> sqlite,
>>
>> Regards,
>>
>> Pierre Sassoulas
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@mailinglists.sqlite.org
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
>


--
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to