[sqlite] Memory corruption in a mutilthreaded environment

2012-08-10 Thread Rittick Gupta
I have a program with multiple threads. The threads do not share the same 
handle.Occcasionally the program dies with a core. I see a thread always with 
the following stack:

#3  0x6000d336b7c0:0 in closeDB () at ../lang/sql/generated/sqlite3.c:35553
#4  0x6000d3388c60:0 in btreeInvalidateHandleCache ()
at ../lang/sql/generated/sqlite3.c:37914
#5  0x6000d3387540:0 in sqlite3BtreeBeginTrans ()
at ../lang/sql/generated/sqlite3.c:37987
#6  0x6000d33d2cc0:0 in sqlite3InitOne ()
at ../lang/sql/generated/sqlite3.c:80206
#7  0x6000d33d1b80:0 in sqlite3Init ()
at ../lang/sql/generated/sqlite3.c:80378
#8  0x6000d33d1770:0 in sqlite3LocateTable ()
at ../lang/sql/generated/sqlite3.c:80416
#9  0x6000d33cebb0:0 in selectExpander ()
at ../lang/sql/generated/sqlite3.c:84064
#10 0x6000d33ce780:0 in sqlite3SelectExpand ()
at ../lang/sql/generated/sqlite3.c:60440
#11 0x6000d33ce470:0 in sqlite3SelectPrep ()
at ../lang/sql/generated/sqlite3.c:84343
#12 0x6000d3444580:0 in sqlite3Select ()
at ../lang/sql/generated/sqlite3.c:84599
#13 0x6000d33ab080:0 in yy_reduce ()
---Type  to continue, or q  to quit---
at ../lang/sql/generated/sqlite3.c:95943
#14 0x6000d33a9100:0 in sqlite3Parser ()
at ../lang/sql/generated/sqlite3.c:96910
#15 0x6000d33a3410:0 in sqlite3RunParser ()
   at ../lang/sql/generated/sqlite3.c:97749
#16 0x6000d33e7110:0 in sqlite3Prepare ()
at ../lang/sql/generated/sqlite3.c:80564
#17 0x6000d351b640:0 in sqlite3_prepare_v2 ()


This may or may not anything to do with the problem - my question why is sqlite 
trying to close the database ?

Thanks for your help.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] SQL logic error or missing database error

2012-08-16 Thread Rittick Gupta
I get the following error while opening the database after a system reboot.

SQL logic error or missing database


The problem does not happen with the subsequent open with a new process.

Is there any reason why we get these errors?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] SQL logic error or missing database error

2012-08-16 Thread Rittick Gupta
Why would it work with the subseqyent open if there was a problem with the 
install ?


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] database disk image is malformed - Error

2012-09-24 Thread Rittick Gupta
I have a mult-threaded application. Each thread uses its own database handle. 
One thread got a return value of 11 (disk image malformed) - with the 
sqlite3_step statement (select statement). When we restarted the application 
after the failure the database recovered and did not give any error.

Why did the "sqlite3_step" statement returned a "disk malformed" error when the 
disk is not corrupt ?

Any help will be appreciated.

 
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread Rittick Gupta
David,
  Thanks. Do you still have the problem ? Did you find a workaround to 
avoid the problem - appreciate your response.

regards,

Rittick

___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] database disk image is malformed - Error

2012-09-25 Thread Rittick Gupta
Do you think a retry of the query would help resolve this issue ? Do I have to 
close & reopen the database. 

Thanks for your help.

regards,

Rittick
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Usage of sqlite3_db_release_memory

2012-02-12 Thread Rittick Gupta
What memory does the sqlite3_db_release_memory call release from the heap.
Is it required that this call be made frequently to free up space which is no 
longer used ? Is it applicable in a shared cache environment ?

Will appreciate a response.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Difference between SQLITE_CONFIG_MULTITHREAD & SQLITE_CONFIG_SERIALIZED options

2012-02-13 Thread Rittick Gupta
What is the difference between the SQLITE_CONFIG_MULTITHREAD &  
SQLITE_CONFIG_SERIALIZED options - When a) the same handle is shared between 
multiple threads in a process and when different handles are used by threads in 
a proceses.

Is there any difference in concurrency ? What should be used in a multi 
threaded process with  more than one thread updating and reading the database.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users