On Tue, 5 Dec 2006, Kees Nuyt wrote:
what would be the best method to dump this db into another one to recover?
sqlite olddb .dump | sqlite newdb
this worked. thanks a million.
I have no idea what could cause the segfault, except perhaps a version
difference between the sqlite command program and the sqlite library.
i've confirmed that the libraries have not been updated:
mussel:~ > ldd /dmsp/reference/lib/ruby/site_ruby/1.8/i686-linux/_sqlite.so
libsqlite.so.0 => /dmsp/reference//lib/libsqlite.so.0 (0x00c3c000)
libdl.so.2 => /lib/libdl.so.2 (0x008bb000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x00df8000)
libm.so.6 => /lib/tls/libm.so.6 (0x00eff000)
libc.so.6 => /lib/tls/libc.so.6 (0x00a40000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00bea000)
mussel:~ > ls -ltarHh /dmsp/reference//lib/libsqlite.so.0 /lib/libdl.so.2
/lib/libcrypt.so.1 /lib/tls/libm.so.6 /lib/tls/libc.so.6
/dmsp/reference/lib/ruby/site_ruby/1.8/i686-linux/_sqlite.so
-rwxr-xrwx 1 nrt nrt 634K Oct 29 2004
/dmsp/reference//lib/libsqlite.so.0
-rwxr-xr-x 1 nrt nrt 25K May 16 2006
/dmsp/reference/lib/ruby/site_ruby/1.8/i686-linux/_sqlite.so
-rwxr-xr-x 1 root root 182K Jun 16 05:32 /lib/tls/libm.so.6
-rwxr-xr-x 1 root root 1.4M Jun 16 05:32 /lib/tls/libc.so.6
-rwxr-xr-x 1 root root 13K Jun 16 05:32 /lib/libdl.so.2
-rwxr-xr-x 1 root root 22K Jun 16 05:32 /lib/libcrypt.so.1
i've included the ruby stuff because that's how i'm using sqlite mainly. note,
however, that i can segfault either a ruby program __or__ the sqlite binary, so
i'm reasonably confident that the problem is un-related to ruby.
nevertheless, here's a stack trace from inside a seg faulting ruby program:
#0 0x0019aeff in raise () from /lib/tls/libc.so.6
#1 0x0019c705 in abort () from /lib/tls/libc.so.6
#2 0x080be1b2 in rb_bug (fmt=0x80d74ad "Segmentation fault") at error.c:214
#3 0x080a20e0 in sigsegv (sig=11) at signal.c:447
#4 <signal handler called>
#5 0x00453ab4 in checkList (pCheck=0xbffeffc0, isFreeList=1, iPage=33916, N=209,
zContext=0x483086 "Main freelist: ") at src/btree.c:3238
#6 0x0045433f in fileBtreeIntegrityCheck (pBt=0x8cc1738, aRoot=0x8cc4a08,
nRoot=4) at src/btree.c:3447
#7 0x00478ed1 in sqliteVdbeExec (p=0x8cc55c0) at src/vdbe.c:3738
#8 0x00472622 in sqlite_step (pVm=0x8cc55c0, pN=0xbfff05c8,
pazValue=0xbfff05cc, pazColName=0xbfff05d0) at src/vdbe.c:128
#9 0x00461811 in sqlite_exec (db=0x8cc15d8, zSql=0x88f6260 "PRAGMA
integrity_check;", xCallback=0xcf5428 <static_ruby_sqlite_callback>,
pArg=0xbfff0620, pzErrMsg=0xbfff061c)
at src/main.c:654
#10 0x00cf5cef in static_database_exec (self=3075567028, sql=147608080,
callback=1, parm=1) at sqlite.c:526
#11 0x08065fdb in call_cfunc (func=0xcf5c20 <static_database_exec>,
recv=3075567028, len=147648012, argc=3, argv=0xbffeffc0) at eval.c:5550
#12 0x0805b6b3 in rb_call0 (klass=3074768412, recv=3075567028, id=8945,
oid=1, argc=3, argv=0xbfff0870, body=0xb7453764, flags=0) at eval.c:5692
and here is one from running sqlite db 'pragma integrity_check'
#0 0x00c04b80 in checkList (pCheck=0xbfffc810, isFreeList=1, iPage=33602, N=209,
zContext=0xc34186 "Main freelist: ") at src/btree.c:3238
#1 0x00c0540b in fileBtreeIntegrityCheck (pBt=0x949b168, aRoot=0x94af5d8,
nRoot=4) at src/btree.c:3447
#2 0x00c29ffd in sqliteVdbeExec (p=0x94af020) at src/vdbe.c:3738
#3 0x00c23762 in sqlite_step (pVm=0x94af020, pN=0xbfffce18,
pazValue=0xbfffce1c, pazColName=0xbfffce20) at src/vdbe.c:128
#4 0x00c12919 in sqlite_exec (db=0x949b008, zSql=0x94af3f0 "PRAGMA
integrity_check;", xCallback=0x80493c0 <callback>, pArg=0xbfffceb0,
pzErrMsg=0xbfffce68) at src/main.c:654
#5 0x0804b18c in process_input (p=0xbfffceb0, in=0x0) at src/shell.c:1061
#6 0x0804b86f in main (argc=2, argv=0xbfffe464) at src/shell.c:1342
while knowing little about the sqlite source, this looks like a bug in sqlite
no? anyone have suggestions on where to go from here?
-a
--
if you want others to be happy, practice compassion.
if you want to be happy, practice compassion. -- the dalai lama
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------