On 11/20/19 1:04 PM, Richard Hipp wrote:
On 11/20/19, Dennis Clarke <dcla...@blastwave.org> wrote:

However the tests fail repeatedly with a code dump :


Unable to reproduce the problem.  What do you get when you run:

     ./testfixture test/walvfs.test

What version of TCL are you linking against?

For casual observers, please note that the segfault is in the test
harness, not in SQLite itself.  Probably it is an issue with the test
harness itself and not a problem with the SQLite core.  But we will
see...


boe13$ valgrind --version
valgrind-3.15.0

boe13$ ldd testfixture
        linux-vdso.so.1 =>  (0x00007ffcc0bf0000)
        libtcl8.7.so => /opt/bw/lib/libtcl8.7.so (0x00007fb9c0949000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007fb9c073b000)
        libz.so.1 => /opt/bw/lib/libz.so.1 (0x00007fb9c051d000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fb9c0301000)
        libc.so.6 => /lib64/libc.so.6 (0x00007fb9bff3d000)
        libm.so.6 => /lib64/libm.so.6 (0x00007fb9bfc3b000)
        /lib64/ld-linux-x86-64.so.2 (0x0000556ca7690000)
boe13$
boe13$
boe13$ valgrind --leak-check=full ./testfixture test/walvfs.test
==44169== Memcheck, a memory error detector
==44169== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==44169== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==44169== Command: ./testfixture test/walvfs.test
==44169==
walvfs-1.0... Ok
walvfs-1.1... Ok
walvfs-1.2... Ok
walvfs-1.3... Ok
walvfs-2.0... Ok
walvfs-2.1... Ok
walvfs-2.2... Ok
walvfs-2.3... Ok
walvfs-3.0... Ok
walvfs-3.1... Ok
walvfs-3.2... Ok
walvfs-4.0... Ok
walvfs-4.1... Ok
walvfs-4.2... Ok
walvfs-5.0... Ok
walvfs-5.1... Ok
walvfs-5.2... Ok
walvfs-5.3... Ok
walvfs-5.3... Ok
walvfs-5.4... Ok
walvfs-5.5... Ok
walvfs-5.6... Ok
walvfs-6.0... Ok
walvfs-6.1... Ok
# WARNING: This next test takes around 12 seconds
walvfs-6.2... Ok
walvfs-7.0... Ok
walvfs-7.1... Ok
walvfs-8.0... Ok
walvfs-8.1... Ok
walvfs-8.2... Ok
walvfs-8.3... Ok
==44169== Invalid read of size 8
==44169==    at 0x43C5D8: tvfsFileControl (test_vfs.c:527)
==44169==    by 0x46C4E8: sqlite3OsFileControl (sqlite3.c:22475)
==44169==    by 0x48A47D: databaseIsUnmoved (sqlite3.c:54928)
==44169==    by 0x48A59B: sqlite3PagerClose (sqlite3.c:54969)
==44169==    by 0x49BF11: sqlite3BtreeClose (sqlite3.c:66134)
==44169==    by 0x54EBAB: sqlite3LeaveMutexAndCloseZombie (sqlite3.c:157429)
==44169==    by 0x54EACB: sqlite3Close (sqlite3.c:157372)
==44169==    by 0x54EAEF: sqlite3_close (sqlite3.c:157385)
==44169==    by 0x4611CE: DbDeleteCmd (tclsqlite.c:528)
==44169==    by 0x4E8032F: Tcl_DeleteCommandFromToken (tclBasic.c:3184)
==44169==    by 0x4E80178: Tcl_DeleteCommand (tclBasic.c:3045)
==44169==    by 0x464D44: DbObjCmd (tclsqlite.c:2219)
==44169==  Address 0x7693ed8 is 88 bytes inside a block of size 240 free'd
==44169==    at 0x4C2B27C: free (vg_replace_malloc.c:540)
==44169==    by 0x4E763DC: TclpFree (tclAlloc.c:722)
==44169==    by 0x4E8F8A4: Tcl_DbCkfree (tclCkalloc.c:651)
==44169==    by 0x4E8FA89: Tcl_Free (tclCkalloc.c:769)
==44169==    by 0x43E99F: testvfs_obj_del (test_vfs.c:1393)
==44169==    by 0x4E8032F: Tcl_DeleteCommandFromToken (tclBasic.c:3184)
==44169==    by 0x4E80178: Tcl_DeleteCommand (tclBasic.c:3045)
==44169==    by 0x43E610: testvfs_obj_cmd (test_vfs.c:1296)
==44169==    by 0x4E81E29: Dispatch (tclBasic.c:4418)
==44169==    by 0x4E81EB6: TclNRRunCallbacks (tclBasic.c:4451)
==44169==    by 0x4E81707: Tcl_EvalObjv (tclBasic.c:4181)
==44169==    by 0x4E83BF5: TclEvalEx (tclBasic.c:5320)
==44169==  Block was alloc'd at
==44169==    at 0x4C29EC5: malloc (vg_replace_malloc.c:309)
==44169==    by 0x4E763C2: TclpAlloc (tclAlloc.c:699)
==44169==    by 0x4E8F0E0: Tcl_DbCkalloc (tclCkalloc.c:408)
==44169==    by 0x4E8FA40: Tcl_Alloc (tclCkalloc.c:755)
==44169==    by 0x43EDAD: testvfs_cmd (test_vfs.c:1550)
==44169==    by 0x4E81E29: Dispatch (tclBasic.c:4418)
==44169==    by 0x4E81EB6: TclNRRunCallbacks (tclBasic.c:4451)
==44169==    by 0x4E81707: Tcl_EvalObjv (tclBasic.c:4181)
==44169==    by 0x4E83BF5: TclEvalEx (tclBasic.c:5320)
==44169==    by 0x4E82FC3: Tcl_EvalEx (tclBasic.c:4985)
==44169==    by 0x4E85C67: Tcl_GlobalEval (tclBasic.c:6983)
==44169==    by 0x468E37: main (tclsqlite.c:4008)
==44169==
==44169== Invalid read of size 8
==44169==    at 0x43C71B: tvfsFileControl (test_vfs.c:549)
==44169==    by 0x46C4E8: sqlite3OsFileControl (sqlite3.c:22475)
==44169==    by 0x48A47D: databaseIsUnmoved (sqlite3.c:54928)
==44169==    by 0x48A59B: sqlite3PagerClose (sqlite3.c:54969)
==44169==    by 0x49BF11: sqlite3BtreeClose (sqlite3.c:66134)
==44169==    by 0x54EBAB: sqlite3LeaveMutexAndCloseZombie (sqlite3.c:157429)
==44169==    by 0x54EACB: sqlite3Close (sqlite3.c:157372)
==44169==    by 0x54EAEF: sqlite3_close (sqlite3.c:157385)
==44169==    by 0x4611CE: DbDeleteCmd (tclsqlite.c:528)
==44169==    by 0x4E8032F: Tcl_DeleteCommandFromToken (tclBasic.c:3184)
==44169==    by 0x4E80178: Tcl_DeleteCommand (tclBasic.c:3045)
==44169==    by 0x464D44: DbObjCmd (tclsqlite.c:2219)
==44169== Address 0x6161616161616181 is not stack'd, malloc'd or (recently) free'd
==44169==
==44169==
==44169== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==44169==  General Protection Fault
==44169==    at 0x43C71B: tvfsFileControl (test_vfs.c:549)
==44169==    by 0x46C4E8: sqlite3OsFileControl (sqlite3.c:22475)
==44169==    by 0x48A47D: databaseIsUnmoved (sqlite3.c:54928)
==44169==    by 0x48A59B: sqlite3PagerClose (sqlite3.c:54969)
==44169==    by 0x49BF11: sqlite3BtreeClose (sqlite3.c:66134)
==44169==    by 0x54EBAB: sqlite3LeaveMutexAndCloseZombie (sqlite3.c:157429)
==44169==    by 0x54EACB: sqlite3Close (sqlite3.c:157372)
==44169==    by 0x54EAEF: sqlite3_close (sqlite3.c:157385)
==44169==    by 0x4611CE: DbDeleteCmd (tclsqlite.c:528)
==44169==    by 0x4E8032F: Tcl_DeleteCommandFromToken (tclBasic.c:3184)
==44169==    by 0x4E80178: Tcl_DeleteCommand (tclBasic.c:3045)
==44169==    by 0x464D44: DbObjCmd (tclsqlite.c:2219)
==44169==
==44169== HEAP SUMMARY:
==44169==     in use at exit: 1,953,583 bytes in 13,488 blocks
==44169== total heap usage: 106,175 allocs, 92,687 frees, 16,323,777 bytes allocated
==44169==
==44169== 1,024 bytes in 1 blocks are possibly lost in loss record 3,469 of 3,773
==44169==    at 0x4C29EC5: malloc (vg_replace_malloc.c:309)
==44169==    by 0x46CFCD: sqlite3MemMalloc (sqlite3.c:23047)
==44169==    by 0x428D34: faultsimMalloc (test_malloc.c:97)
==44169==    by 0x46DF7E: mallocWithAlarm (sqlite3.c:26889)
==44169==    by 0x46E018: sqlite3Malloc (sqlite3.c:26919)
==44169==    by 0x482C8C: pcache1Alloc (sqlite3.c:49204)
==44169==    by 0x48305B: sqlite3PageMalloc (sqlite3.c:49345)
==44169==    by 0x49BD19: allocateTempSpace (sqlite3.c:66061)
==44169==    by 0x49EEB5: btreeCursor (sqlite3.c:67779)
==44169==    by 0x49F04B: sqlite3BtreeCursor (sqlite3.c:67821)
==44169==    by 0x4C8F1D: sqlite3VdbeExec (sqlite3.c:87701)
==44169==    by 0x4BDE68: sqlite3Step (sqlite3.c:82300)
==44169==
==44169== LEAK SUMMARY:
==44169==    definitely lost: 0 bytes in 0 blocks
==44169==    indirectly lost: 0 bytes in 0 blocks
==44169==      possibly lost: 1,024 bytes in 1 blocks
==44169==    still reachable: 1,952,559 bytes in 13,487 blocks
==44169==         suppressed: 0 bytes in 0 blocks
==44169== Reachable blocks (those to which a pointer was found) are not shown.
==44169== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==44169==
==44169== For lists of detected and suppressed errors, rerun with: -s
==44169== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)
Segmentation fault
boe13$

Hope that is helpful.


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to