Re: [sqlite] Q: When to use sqlite3_shutdown ?
my bad. It was a typo that caused my segfault. Thanks, Brian From: Richard HippTo: General Discussion of SQLite Database Sent: Monday, April 1, 2013 1:35 PM Subject: Re: [sqlite] Q: When to use sqlite3_shutdown ? On Mon, Apr 1, 2013 at 4:31 PM, Patrick Herbst wrote: > When is there a need to use sqlite3_shutdown? > > I don't really see a clear explanation of when/how its needed. > > Any tips, please? > You have to run sqlite3_shutdown() prior to using sqlite3_config() if you have previously started up and closed database connections. Other than that, sqlite3_shutdown() is usually optional. It is theoretically possible that a custom 3rd-party VFS might require sqlite3_shutdown(). But none of the built-in VFSes (for unix and windows) require it. Nor am I aware of any actual VFS implementations that require it. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Q: When to use sqlite3_shutdown ?
I am running sqlite3_config() before opening my db. I am not running sqlite3_initialize() so do I need sqlite3_shutdown(). My c program is now getting a segmentation fault since I added a call to sqlite3_shutdown() before sqlite3_config(). Thanks, Brian From: Richard HippTo: General Discussion of SQLite Database Sent: Monday, April 1, 2013 1:35 PM Subject: Re: [sqlite] Q: When to use sqlite3_shutdown ? On Mon, Apr 1, 2013 at 4:31 PM, Patrick Herbst wrote: > When is there a need to use sqlite3_shutdown? > > I don't really see a clear explanation of when/how its needed. > > Any tips, please? > You have to run sqlite3_shutdown() prior to using sqlite3_config() if you have previously started up and closed database connections. Other than that, sqlite3_shutdown() is usually optional. It is theoretically possible that a custom 3rd-party VFS might require sqlite3_shutdown(). But none of the built-in VFSes (for unix and windows) require it. Nor am I aware of any actual VFS implementations that require it. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Q: When to use sqlite3_shutdown ?
On Mon, Apr 1, 2013 at 4:31 PM, Patrick Herbstwrote: > When is there a need to use sqlite3_shutdown? > > I don't really see a clear explanation of when/how its needed. > > Any tips, please? > You have to run sqlite3_shutdown() prior to using sqlite3_config() if you have previously started up and closed database connections. Other than that, sqlite3_shutdown() is usually optional. It is theoretically possible that a custom 3rd-party VFS might require sqlite3_shutdown(). But none of the built-in VFSes (for unix and windows) require it. Nor am I aware of any actual VFS implementations that require it. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Q: When to use sqlite3_shutdown ?
When is there a need to use sqlite3_shutdown? I don't really see a clear explanation of when/how its needed. Any tips, please? Thanks! ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TCL Test failures on ARM
On 04/01/2013 01:15 PM, Bk wrote: I have updated make file with "TCC = armv7l-timesys-linux-gnueabi-gcc -g -DSQLITE_OS_UNIX=1 -DSQLITE_DISABLE_LFS=1 -I. -I${TOP}/src -I${TOP}/ext/rtree" The test still fails with DSQLITE_DISABLE_LFS=1 with same error sysfault-2.setup... Ok ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large sysfault-2.1-vfsfault-transient.1... Expected: [0 ok] Got: [1 {nfail=1 rc=1 result=disk I/O error}] Below is the debugger screen with value of "sizeof(off_t)" . The values seems different 4 in ts_ftruncate and 8 in robust_ftruncate. That'll be the reason the test is failing. For whatever reason the test_syscall.c file is being compiled with a different definition of off_t (and probably other stuff) than os_unix.c. Find out why and you'll know how to fix the test. It will be (I imagine) something to do with the pre-processor magic at the top of os_unix.c. Perhaps something included there that isn't included in test_syscall.c I would have thought it would be the SQLITE_DISABLE_LFS though. You did a clean build with the new Makefile? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TCL Test failures on ARM
What's the ulimit for file sizes on your system? You might be hitting that. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Bk Sent: Monday, April 01, 2013 1:16 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] TCL Test failures on ARM I have updated make file with "TCC = armv7l-timesys-linux-gnueabi-gcc -g -DSQLITE_OS_UNIX=1 -DSQLITE_DISABLE_LFS=1 -I. -I${TOP}/src -I${TOP}/ext/rtree" The test still fails with DSQLITE_DISABLE_LFS=1 with same error sysfault-2.setup... Ok ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large sysfault-2.1-vfsfault-transient.1... Expected: [0 ok] Got: [1 {nfail=1 rc=1 result=disk I/O error}] Below is the debugger screen with value of "sizeof(off_t)" . The values seems different 4 in ts_ftruncate and 8 in robust_ftruncate. I hope this is what you asked me to check (gdb) break ts_ftruncate Cannot access memory at address 0x0 Breakpoint 1 at 0x455e0: file ./src/test_syscall.c, line 273. (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=5, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $1 = 4 (gdb) break robust_ftruncate Breakpoint 2 at 0x6371c: file sqlite3.c, line 23440. (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $2 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $3 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=8, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $4 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=8, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $5 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $6 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $7 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=5, sz=24576) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $8 = 8 (gdb) -- View this message in context: http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67984.h tml Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TCL Test failures on ARM
I have updated make file with "TCC = armv7l-timesys-linux-gnueabi-gcc -g -DSQLITE_OS_UNIX=1 -DSQLITE_DISABLE_LFS=1 -I. -I${TOP}/src -I${TOP}/ext/rtree" The test still fails with DSQLITE_DISABLE_LFS=1 with same error sysfault-2.setup... Ok ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large ftruncate: : File too large sysfault-2.1-vfsfault-transient.1... Expected: [0 ok] Got: [1 {nfail=1 rc=1 result=disk I/O error}] Below is the debugger screen with value of "sizeof(off_t)" . The values seems different 4 in ts_ftruncate and 8 in robust_ftruncate. I hope this is what you asked me to check (gdb) break ts_ftruncate Cannot access memory at address 0x0 Breakpoint 1 at 0x455e0: file ./src/test_syscall.c, line 273. (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=5, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $1 = 4 (gdb) break robust_ftruncate Breakpoint 2 at 0x6371c: file sqlite3.c, line 23440. (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $2 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $3 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=8, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $4 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=8, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $5 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=7, sz=0) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $6 = 8 (gdb) continue Continuing. Breakpoint 1, ts_ftruncate (fd=7, n=284108) at ./src/test_syscall.c:273 273 if( tsIsFailErrno("ftruncate") ){ (gdb) p sizeof(off_t) $7 = 4 (gdb) continue Continuing. Breakpoint 2, robust_ftruncate (h=5, sz=24576) at sqlite3.c:23440 23440 rc = osFtruncate(h,sz); (gdb) p sizeof(off_t) $8 = 8 (gdb) -- View this message in context: http://sqlite.1065341.n5.nabble.com/TCL-Test-failures-on-ARM-tp67612p67984.html Sent from the SQLite mailing list archive at Nabble.com. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users