On Mon, May 7, 2012 at 9:51 AM, Jerry Lundström <jerry.lundst...@iis.se>wrote:

> Hi,
>
> I've been trying to track a segfault in sqlite3 (3.7.11, ports package)
> when I use OpenDNSSEC 1.3.7 and SoftHSM 1.3.2.
>
> I don't know if the issue is related to sqlite3 or to something in FreeBSD
> libc but it can be replicated by installing SoftHSM and OpenDNSSEC and then
> running "make check" in OpenDNSSEC (see
> https://wiki.opendnssec.org/display/OpenDNSSEC/Platforms#Platforms-FreeBSD9for
>  my setup).
>

Stack traces like this usually indicate heap corruption in the application,
not a problem with SQLite.  We test every release of SQLite on multiple
platforms (big-endian, little-endian, 32- and 64-bit) to 100% branch
coverage with multiple debugging memory allocators that are specifically
designed to catch memory allocation problems, and run 100% branch coverage
tests under valgrind with no warnings.  All this testing does not prove
that SQLite is blameless - testing can only prove that a system is broken
not that it works - bugs can still slip through - but it is a strong hint
that the problem is in some other component.

Let us know if you gather further evidence of a problem with SQLite and we
will look into it.


>
> NOTE: This only happens on amd64 and not 32bit system and I think it has
> something to do with tracking the size of the malloc's that sqlite3
> memstatus needs.
>
> (gdb) bt
> #0  0x0000000801b7d400 in _pthread_mutex_init_calloc_cb () from
> /lib/libc.so.7
> #1  0x0000000801b85ad5 in free () from /lib/libc.so.7
> #2  0x0000000802f6908e in sqlite3HashClear () from
> /usr/local/lib/libsqlite3.so.8
> #3  0x0000000802f74ccd in sqlite3SchemaClear () from
> /usr/local/lib/libsqlite3.so.8
> #4  0x0000000802f76c35 in sqlite3ResetInternalSchema () from
> /usr/local/lib/libsqlite3.so.8
> #5  0x0000000802f9d532 in sqlite3_close () from
> /usr/local/lib/libsqlite3.so.8
> #6  0x0000000802813a4a in ~SoftSession (this=0x802527100) at
> ../../../src/lib/SoftSession.cpp:109
> #7  0x0000000802812f2d in SoftHSMInternal::closeSession (this=0x8024bf600,
> hSession=Variable "hSession" is not available.
> ) at ../../../src/lib/SoftHSMInternal.cpp:180
> #8  0x0000000000404168 in hsm_session_close ()
> #9  0x000000000040427f in hsm_ctx_close ()
> #10 0x0000000000406535 in hsm_close ()
> #11 0x0000000000402c22 in main ()
>
> Turning off MEMSTATUS for the sqlite3 ports package removes the problem.
>
> I've reported this to FreeBSD also.
>
> Cheers,
> Jerry
>
> --
> Jerry Lundström - Software Engineer
> .SE - The Internet Infrastructure Foundation
> http://www.iis.se/
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to