SQLite crash

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

SQLite crash

Robert Weiss
I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.


 
Here are the DDL statements entered previous to the crash:


 
CREATE TABLEd200_on_passport(fn,path,size,serial,pid);

CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);

CREATE VIEW d200 as select * fromd200_on_passport;


 
And here is the statement thatcaused the crash:

create index d200_on_passport_fn ond200_on_passport(fn);


 
The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.


The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.

Robert Weiss
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Simon Slavin-3

On 7 Aug 2015, at 10:11pm, Robert Weiss <[hidden email]> wrote:

> And here is the statement thatcaused the crash:
>
> create index d200_on_passport_fn ond200_on_passport(fn);
>
>
>  
> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.

Are you up for a little detective work ?  The idea is to work out what part of your multi-table many-row database is causing the problem.

First, run "PRAGMA integrity_check()".  I'm going to assume it shows no errors.

Do a VACUUM before creating the index.  Does it still crash ?

Take a copy of the 2 Meg database.  DROP all tables and views except for the "ond200_on_passport" table.  Does the command still crash it ?

If so ...

Take another copy of the 2 Meg database and work out a way to DELETE about half the rows in "ond200_on_passport" but leave the other half.  Then see if the command still crashes.  Then restore the copy and delete the other half of the rows, leaving the first half intact.  Does it crash now ?  Both times ?  Neither time ?  Only on one half of the data ?

Simon.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Dan Kennedy-4
In reply to this post by Robert Weiss
On 08/08/2015 04:11 AM, Robert Weiss wrote:

> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>
>
>  
> Here are the DDL statements entered previous to the crash:
>
>
>  
> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>
> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>
> CREATE VIEW d200 as select * fromd200_on_passport;
>
>
>  
> And here is the statement thatcaused the crash:
>
> create index d200_on_passport_fn ond200_on_passport(fn);
>
>
>  
> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>
>
> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.


Can you send the database to me? Or to drh if that seems more prudent to
you.

Thanks,
Dan.





>
> Robert Weiss
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Jan Nijtmans
In reply to this post by Robert Weiss
Op 7 aug. 2015 16:12 schreef "Robert Weiss" <[hidden email]> het
volgende:
>
> I observed the sqlite command shell version 3.8.11.1 to crash (exit to
the OSwithout an error message) while running in a Cygwin shell under
Windows 7.

Does the same crash occur when using cygwin's SQLite 3.8.10.2 package? In
other words, is this a regression or a longstanding problem?

Regards,
     Jan Nijtmans
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Robert Weiss
In reply to this post by Dan Kennedy-4
Dan Kennedy--
What address, precisely, should I use to send the database to you?  When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals).
BTW, the problem does not seem to occur in version 3.8.10.2.
Robert Weiss


     On Friday, August 7, 2015 11:31 PM, Dan Kennedy <[hidden email]> wrote:
   

 On 08/08/2015 04:11 AM, Robert Weiss wrote:

> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>
>

> Here are the DDL statements entered previous to the crash:
>
>

> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>
> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>
> CREATE VIEW d200 as select * fromd200_on_passport;
>
>

> And here is the statement thatcaused the crash:
>
> create index d200_on_passport_fn ond200_on_passport(fn);
>
>

> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>
>
> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.


Can you send the database to me? Or to drh if that seems more prudent to
you.

Thanks,
Dan.





>
> Robert Weiss
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


 
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Dan Kennedy-4
On 08/11/2015 12:23 AM, Robert Weiss wrote:
> Dan Kennedy--
> What address, precisely, should I use to send the database to you?  When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals).
> BTW, the problem does not seem to occur in version 3.8.10.2.
> Robert Weiss

Thanks for the database. We couldn't reproduce the problem here though.

The crash is repeatable, correct? Are you able to capture a stack trace
from the command line shell with gdb?

Thanks,
Dan.


>
>
>       On Friday, August 7, 2015 11:31 PM, Dan Kennedy <[hidden email]> wrote:
>    
>
>   On 08/08/2015 04:11 AM, Robert Weiss wrote:
>> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>>
>>
>>    
>> Here are the DDL statements entered previous to the crash:
>>
>>
>>    
>> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>>
>> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>>
>> CREATE VIEW d200 as select * fromd200_on_passport;
>>
>>
>>    
>> And here is the statement thatcaused the crash:
>>
>> create index d200_on_passport_fn ond200_on_passport(fn);
>>
>>
>>    
>> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>>
>>
>> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.
>
> Can you send the database to me? Or to drh if that seems more prudent to
> you.
>
> Thanks,
> Dan.
>
>
>
>
>
>> Robert Weiss
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>    
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

LincolnBurrows
This post has NOT been accepted by the mailing list yet.
In reply to this post by Robert Weiss
use a special test harness that simulates the effects on a database file of operating system crashes and power failures.You might also be interested in the SQLite article Atomic Commit in SQLite if you need to know the specific details on how they protect against crashes such as the above.
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Robert Weiss
In reply to this post by Dan Kennedy-4
The bug seems to be repeatable.  At least, it happened again today.
I haven't used gdb in a long time.  Here's my first crack at it; what else should I do?
$ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.  Type "show copying"and "show warranty" for details.This GDB was configured as "i686-pc-cygwin".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from sqlite...done.(gdb) run /cygdrive/r/errd200.dbStarting program: /usr/local/bin/sqlite /cygdrive/r/errd200.db[New Thread 12300.0x294c][New Thread 12300.0x32f0][New Thread 12300.0x3530][New Thread 12300.0x328c][New Thread 12300.0x389c]SQLite version 3.8.11.1 2015-07-29 20:00:57Enter ".help" for usage hints.sqlite> create index d200_on_passport_fn on d200_on_passport(fn);[New Thread 12300.0xa64]gdb: unknown target exception 0x80000001 at 0x74d66d61
Program received signal ?, Unknown signal.[Switching to Thread 12300.0xa64]0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL(gdb) bt#0  0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()


     On Tuesday, August 11, 2015 1:43 AM, Dan Kennedy <[hidden email]> wrote:
   

 On 08/11/2015 12:23 AM, Robert Weiss wrote:
> Dan Kennedy--
> What address, precisely, should I use to send the database to you?  When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals).
> BTW, the problem does not seem to occur in version 3.8.10.2.
> Robert Weiss

Thanks for the database. We couldn't reproduce the problem here though.

The crash is repeatable, correct? Are you able to capture a stack trace
from the command line shell with gdb?

Thanks,
Dan.


>
>
>      On Friday, August 7, 2015 11:31 PM, Dan Kennedy <[hidden email]> wrote:
>   
>
>  On 08/08/2015 04:11 AM, Robert Weiss wrote:
>> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>>
>>
>>   
>> Here are the DDL statements entered previous to the crash:
>>
>>
>>   
>> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>>
>> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>>
>> CREATE VIEW d200 as select * fromd200_on_passport;
>>
>>
>>   
>> And here is the statement thatcaused the crash:
>>
>> create index d200_on_passport_fn ond200_on_passport(fn);
>>
>>
>>   
>> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>>
>>
>> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.
>
> Can you send the database to me? Or to drh if that seems more prudent to
> you.
>
> Thanks,
> Dan.
>
>
>
>
>
>> Robert Weiss
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>   
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


 
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Dan Kennedy-4
On 08/12/2015 02:15 AM, Robert Weiss wrote:
> The bug seems to be repeatable.  At least, it happened again today.
> I haven't used gdb in a long time.  Here's my first crack at it; what else should I do?
> $ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.  Type "show copying"and "show warranty" for details.This GDB was configured as "i686-pc-cygwin".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from sqlite...done.(gdb) run /cygdrive/r/errd200.dbStarting program: /usr/local/bin/sqlite /cygdrive/r/errd200.db[New Thread 12300.0x294c][New Thread 12300.0x32f0][New Thread 12300.0x3530][New Thread 12300.0x328c][New Thread 12300.0x389c]SQLite version 3.8.11.1 2015-07-29 20:00:57Enter ".help" for usage hints.sqlite> create index d200_on_passport_fn on d200_on_passport(fn);[New Thread 12300.0xa64]gdb: unknown target exception 0x80000001 at 0x74d66d61
> Program received signal ?, Unknown signal.[Switching to Thread 12300.0xa64]0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL(gdb) bt#0  0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()

What does typing this command at the (gdb) prompt after the crash output?

   thread apply all where 15

Or, if that doesn't work, just "where 15".

Thanks,
Dan.



>
>
>       On Tuesday, August 11, 2015 1:43 AM, Dan Kennedy <[hidden email]> wrote:
>    
>
>   On 08/11/2015 12:23 AM, Robert Weiss wrote:
>> Dan Kennedy--
>> What address, precisely, should I use to send the database to you?  When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals).
>> BTW, the problem does not seem to occur in version 3.8.10.2.
>> Robert Weiss
> Thanks for the database. We couldn't reproduce the problem here though.
>
> The crash is repeatable, correct? Are you able to capture a stack trace
> from the command line shell with gdb?
>
> Thanks,
> Dan.
>
>
>>
>>        On Friday, August 7, 2015 11:31 PM, Dan Kennedy <[hidden email]> wrote:
>>      
>>
>>    On 08/08/2015 04:11 AM, Robert Weiss wrote:
>>> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>>>
>>>
>>>      
>>> Here are the DDL statements entered previous to the crash:
>>>
>>>
>>>      
>>> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>>>
>>> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>>>
>>> CREATE VIEW d200 as select * fromd200_on_passport;
>>>
>>>
>>>      
>>> And here is the statement thatcaused the crash:
>>>
>>> create index d200_on_passport_fn ond200_on_passport(fn);
>>>
>>>
>>>      
>>> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>>>
>>>
>>> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.
>> Can you send the database to me? Or to drh if that seems more prudent to
>> you.
>>
>> Thanks,
>> Dan.
>>
>>
>>
>>
>>
>>> Robert Weiss
>>> _______________________________________________
>>> sqlite-users mailing list
>>> [hidden email]
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>      
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>    
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Robert Weiss
[continuing from previous gdb output]:(gdb) thread apply all where 15
Thread 6 (Thread 12300.0xa64):#0  0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()
Thread 5 (Thread 12300.0x389c):#0  0x77791f92 in ntdll!ZwWaitForWorkViaWorkerFactory () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#1  0x77791f92 in ntdll!ZwWaitForWorkViaWorkerFactory () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#2  0x777c1d63 in ntdll!RtlpQueryDefaultUILanguage () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#3  0x6100626b in _cygtls::call2(unsigned long (*)(void*, void*), void*, void*) () from /usr/bin/cygwin1.dll#4  0x61006306 in _cygtls::call(unsigned long (*)(void*, void*), void*) () from /usr/bin/cygwin1.dll#5  0x610828d8 in threadfunc_fe(void*) () from /usr/bin/cygwin1.dll#6  0x75c4337a in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/Windows/syswow64/kernel32.dll#7  0x777a92e2 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#8  0x777a92b5 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#9  0x00000000 in ?? ()
Thread 4 (Thread 12300.0x328c):#0  0x777901a9 in ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#1  0x777901a9 in ntdll!ZwWaitForMultipleObjects () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#2  0x777b1541 in ntdll!TpIsTimerSet () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#3  0x75c4337a in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/Windows/syswow64/kernel32.dll#4  0x777a92e2 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#5  0x777a92b5 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#6  0x00000000 in ?? ()
Thread 3 (Thread 12300.0x3530):#0  0x7778f951 in ntdll!ZwReadFile () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#1  0x7778f951 in ntdll!ZwReadFile () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#2  0x7549dd62 in ReadFile () from /cygdrive/c/Windows/syswow64/KERNELBASE.dll#3  0x000000a0 in ?? ()#4  0x00000000 in ?? ()
Thread 2 (Thread 12300.0x32f0):#0  0x002c03a3 in ?? ()#1  0x6100626b in _cygtls::call2(unsigned long (*)(void*, void*), void*, void*) () from /usr/bin/cygwin1.dll#2  0x61006306 in _cygtls::call(unsigned long (*)(void*, void*), void*) () from /usr/bin/cygwin1.dll#3  0x610828d8 in threadfunc_fe(void*) () from /usr/bin/cygwin1.dll#4  0x75c4337a in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/Windows/syswow64/kernel32.dll#5  0x777a92e2 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#6  0x777a92b5 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#7  0x00000000 in ?? ()
Thread 1 (Thread 12300.0x294c):#0  0x7778fc66 in ntdll!ZwQueryInformationThread () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#1  0x7778fc66 in ntdll!ZwQueryInformationThread () from /cygdrive/c/Windows/SysWOW64/ntdll.dll#2  0x754a38f6 in KERNELBASE!GetThreadPriority () from /cygdrive/c/Windows/syswow64/KERNELBASE.dll#3  0x6108dcc4 in yield () from /usr/bin/cygwin1.dll#4  0x61106585 in pthread::create(void* (*)(void*), pthread_attr*, void*) () from /usr/bin/cygwin1.dll#5  0x61107d3d in pthread::create(pthread**, pthread_attr* const*, void* (*)(void*), void*) () from /usr/bin/cygwin1.dll#6  0x610e1e15 in _sigfe () from /usr/bin/cygwin1.dll#7  0x00421070 in vdbeSorterListToPMA ()#8  0x8006ae42 in ?? ()Backtrace stopped: previous frame inner to this frame (corrupt stack?)
 


     On Tuesday, August 11, 2015 1:03 PM, Dan Kennedy <[hidden email]> wrote:
   

 On 08/12/2015 02:15 AM, Robert Weiss wrote:
> The bug seems to be repeatable.  At least, it happened again today.
> I haven't used gdb in a long time.  Here's my first crack at it; what else should I do?
> $ gdb sqliteGNU gdb (GDB) 7.8Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.  Type "show copying"and "show warranty" for details.This GDB was configured as "i686-pc-cygwin".Type "show configuration" for configuration details.For bug reporting instructions, please see:<http://www.gnu.org/software/gdb/bugs/>.Find the GDB manual and other documentation resources online at:<http://www.gnu.org/software/gdb/documentation/>.For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from sqlite...done.(gdb) run /cygdrive/r/errd200.dbStarting program: /usr/local/bin/sqlite /cygdrive/r/errd200.db[New Thread 12300.0x294c][New Thread 12300.0x32f0][New Thread 12300.0x3530][New Thread 12300.0x328c][New Thread 12300.0x389c]SQLite version 3.8.11.1 2015-07-29 20:00:57Enter ".help" for usage hints.sqlite> create index d200_on_passport_fn on d200_on_passport(fn);[New Thread 12300.0xa64]gdb: unknown target exception 0x80000001 at 0x74d66d61
> Program received signal ?, Unknown signal.[Switching to Thread 12300.0xa64]0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL(gdb) bt#0  0x74d66d61 in sysfer!FirstHookFunc () from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()

What does typing this command at the (gdb) prompt after the crash output?

  thread apply all where 15

Or, if that doesn't work, just "where 15".

Thanks,
Dan.



>
>
>      On Tuesday, August 11, 2015 1:43 AM, Dan Kennedy <[hidden email]> wrote:
>   
>
>  On 08/11/2015 12:23 AM, Robert Weiss wrote:
>> Dan Kennedy--
>> What address, precisely, should I use to send the database to you?  When I "reply" to your message I get the whole SQLite discussion group, which is what I want to avoid (no offense intended, guys and gals).
>> BTW, the problem does not seem to occur in version 3.8.10.2.
>> Robert Weiss
> Thanks for the database. We couldn't reproduce the problem here though.
>
> The crash is repeatable, correct? Are you able to capture a stack trace
> from the command line shell with gdb?
>
> Thanks,
> Dan.
>
>
>>
>>        On Friday, August 7, 2015 11:31 PM, Dan Kennedy <[hidden email]> wrote:
>>     
>>
>>    On 08/08/2015 04:11 AM, Robert Weiss wrote:
>>> I observed the sqlite command shell version 3.8.11.1 to crash (exit to the OSwithout an error message) while running in a Cygwin shell under Windows 7 when I tried to create anindex.  The source was compiled by gcc 4.9.2.  The same type of crashhappened when I tried the operation from a Lua script linked to the same objectlibrary.
>>>
>>>
>>>     
>>> Here are the DDL statements entered previous to the crash:
>>>
>>>
>>>     
>>> CREATE TABLEd200_on_passport(fn,path,size,serial,pid);
>>>
>>> CREATE INDEX d200_on_passport_serial ond200_on_passport(serial);
>>>
>>> CREATE VIEW d200 as select * fromd200_on_passport;
>>>
>>>
>>>     
>>> And here is the statement thatcaused the crash:
>>>
>>> create index d200_on_passport_fn ond200_on_passport(fn);
>>>
>>>
>>>     
>>> The crash didn’t happen when Itried the CREATE INDEX statement on a test database with the same ddlstatements but containing no data.
>>>
>>>
>>> The compressed version of the database that illustrates the problem is a little smaller than 2 MB.  It contains some semi-personal information (it's part of an attempt to organize my photo library; pathnames hint at where I've been on vacation and so on, but the database contains no images) and I'd prefer not to post it to a list, but I can send it for use by those tracking down the bug.
>> Can you send the database to me? Or to drh if that seems more prudent to
>> you.
>>
>> Thanks,
>> Dan.
>>
>>
>>
>>
>>
>>> Robert Weiss
>>> _______________________________________________
>>> sqlite-users mailing list
>>> [hidden email]
>>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>>     
>> _______________________________________________
>> sqlite-users mailing list
>> [hidden email]
>> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
>
>   
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


 
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Joe Mistachkin-3

Robert Weiss wrote:
>
> [continuing from previous gdb output]:(gdb) thread apply all where 15
> Thread 6 (Thread 12300.0xa64):#0  0x74d66d61 in sysfer!FirstHookFunc ()
> from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()
>

Anyhow, the cause of this appears to be the "sysfer.dll", which belongs to
Symantec Network Threat Protection (NTP):

http://www.symantec.com/connect/forums/weve-found-new-big-one#comment-504141
1

I'm not exactly sure what is causing the bad interaction here; however, it
is possible that Cygwin and Symantec are attempting to hook similar Win32
APIs, with unpredictable results.

Does this issue occur when running a build of SQLite on your machine without
Cygwin (i.e. built using MSVC)?

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Robert Weiss
It will take a little while to compile with MSVC.  In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the compilation flags and the index was created successfully.  Haste makes waste?
Thanks, everyone.Bob Weiss


     On Tuesday, August 11, 2015 1:55 PM, Joe Mistachkin <[hidden email]> wrote:
   

 
Robert Weiss wrote:
>
> [continuing from previous gdb output]:(gdb) thread apply all where 15
> Thread 6 (Thread 12300.0xa64):#0  0x74d66d61 in sysfer!FirstHookFunc ()
> from /cygdrive/c/Windows/SysWOW64/SYSFER.DLL#1  0x00000000 in ?? ()
>

Anyhow, the cause of this appears to be the "sysfer.dll", which belongs to
Symantec Network Threat Protection (NTP):

http://www.symantec.com/connect/forums/weve-found-new-big-one#comment-504141
1

I'm not exactly sure what is causing the bad interaction here; however, it
is possible that Cygwin and Symantec are attempting to hook similar Win32
APIs, with unpredictable results.

Does this issue occur when running a build of SQLite on your machine without
Cygwin (i.e. built using MSVC)?

--
Joe Mistachkin

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

 
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: SQLite crash

Jan Nijtmans
Op 11 aug. 2015 17:06 schreef "Robert Weiss" <[hidden email]> het
volgende:
>
> In the meantime I removed -DSQLITE_DEFAULT_WORKER_THREADS=4 from the
compilation flags and the index was created successfully.  Haste makes
waste?
> Thanks, everyone.Bob Weiss

That explains it! Your build of sqlite starts win32 threads, which don't
work well in a cygwin environment. On cygwin you should configure posix
threads.

I have a fix for that, it's included in the cygwin SQLite package. With
that you can use multiple threads as you wish.

Regards,
    Jan Nijtmans
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users