Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3
Hi Richard, On Mon, 23 Jul 2012 12:57:01 -0400 Richard Hippwrote: > On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fish wrote: > > > > > I first suspected svn was the culprit, so I rebuilt it, but it still > > happened. > > Then I tried build SQLite and running its tests and I got this (below). I > > should note that svn works fine after I type "unset MALLOC_CHECK_" in the > > console (don't know about the sqlite tests). > > > > What is the underlying problem and how can it be fixed? > > > > Thanks for the report. > > As best I can tell, this appears to be a bug in MALLOC_CHECK_ in that it > does not play well with malloc_usable_size(). There does not appear to be > anything wrong with SQLite in this respect, at least as not as far as I can > see. > > We test SQLite using a variety of memory allocator that do things similar > to MALLOC_CHECK_. (See http://www.sqlite.org/testing.html#valgrind for > example.) In particular, SQLite tests run clean under valgrind. > > If you edit the "config.h" file generated by the ./configure script and > remove the HAVE_MALLOC_USABLE_SIZE define, then the resulting SQLite will > not attempt to use malloc_usable_size() and it then appears to work fine > with MALLOC_CHECK_. However, if you do this, then SQLite will increase the > size of every memory allocation by 8 bytes and store the allocation size in > those 8 bytes so that it can figure out the allocation size for itself when > it needs it, meaning that the code will run a little slower and use a > little more memory. > Thanks! After running ./configure, I removed the HAVE_MALLOC_USABLE_SIZE line and now svn is working nicely with MALLOC_CHECK_=1. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ "Humanity" - Parody of Modern Life - http://shlom.in/humanity COBOL is the old Java. Please reply to list if it's a mailing list post - http://shlom.in/reply . ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3
On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fishwrote: > > I first suspected svn was the culprit, so I rebuilt it, but it still > happened. > Then I tried build SQLite and running its tests and I got this (below). I > should note that svn works fine after I type "unset MALLOC_CHECK_" in the > console (don't know about the sqlite tests). > > What is the underlying problem and how can it be fixed? > Thanks for the report. As best I can tell, this appears to be a bug in MALLOC_CHECK_ in that it does not play well with malloc_usable_size(). There does not appear to be anything wrong with SQLite in this respect, at least as not as far as I can see. We test SQLite using a variety of memory allocator that do things similar to MALLOC_CHECK_. (See http://www.sqlite.org/testing.html#valgrind for example.) In particular, SQLite tests run clean under valgrind. If you edit the "config.h" file generated by the ./configure script and remove the HAVE_MALLOC_USABLE_SIZE define, then the resulting SQLite will not attempt to use malloc_usable_size() and it then appears to work fine with MALLOC_CHECK_. However, if you do this, then SQLite will increase the size of every memory allocation by 8 bytes and store the allocation size in those 8 bytes so that it can figure out the allocation size for itself when it needs it, meaning that the code will run a little slower and use a little more memory. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3
Hi, On Mon, 23 Jul 2012 12:09:09 -0400 Richard Hippwrote: > On Mon, Jul 23, 2012 at 9:31 AM, Shlomi Fish wrote: > > > > > I first suspected svn was the culprit, so I rebuilt it, but it still > > happened. > > Then I tried build SQLite and running its tests and I got this (below). I > > should note that svn works fine after I type "unset MALLOC_CHECK_" in the > > console (don't know about the sqlite tests). > > > > What is the underlying problem and how can it be fixed? > > > > Which version of SQLite are you using? And where did you get it? > I'm using sqlite-src-3071300.zip , which was contained in Mageia’s sqlite3-3.7.13-1.mga3.src.rpm . The .zip is identical to this one: http://www.sqlite.org/sqlite-src-3071300.zip Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Interview with Ben Collins-Sussman - http://shlom.in/sussman I learned a lot from my teachers, and from my friends more than my teachers, and from my pupils the most. — Rabbi Hanina Please reply to list if it's a mailing list post - http://shlom.in/reply . ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Tests fail with some glibc malloc/realloc/free-related warnings on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3
Hi all, I'm using svn and sqlite3 on Mageia Linux 3/Cauldron with glibc-2.16-2.mga3. today I noticed that svn checkout gave me the following by default: <<< shlomif@telaviv1:~$ svn co http://rpmlint.zarb.org/svn/trunk*** glibc detected *** svn: free(): invalid pointer: 0x00c17820 *** *** glibc detected *** svn: realloc(): invalid pointer: 0x00c18740 *** *** glibc detected *** svn: free(): invalid pointer: 0x00c1e260 *** svn: E200030: SQL logic error or missing database, executing statement 'CREATE TABLE REPOSITORY ( id INTEGER PRIMARY KEY AUTOINCREMENT, root TEXT UNIQUE NOT NULL, uuid TEXT NOT NULL ); CREATE INDEX I_UUID ON REPOSITORY (uuid); CREATE INDEX I_ROOT ON REPOSITORY (root); CREATE TABLE WCROOT ( id INTEGER PRIMARY KEY AUTOINCREMENT, local_abspath TEXT UNIQUE ); CREATE UNIQUE INDEX I_LOCAL_ABSPATH ON WCROOT (local_abspath); CREATE TABLE PRISTINE ( checksum TEXT NOT NULL PRIMARY KEY, compression INTEGER, size INTEGER NOT NULL, refcount INTEGER NOT NULL, md5_checksum TEXT NOT NULL ); CREATE TABLE ACTUAL_NODE ( wc_id INTEGER NOT NULL REFERENCES WCROOT (id), local_relpath TEXT NOT NULL, parent_relpath TEXT, properties BLOB, conflict_old TEXT, conflict_new TEXT, conflict_working TEXT, prop_reject TEXT, changelist TEXT, text_mod TEXT, tree_conflict_data TEXT, conflict_data BLOB, older_checksum TEXT REFERENCES PRISTI NE (checksum), left_checksum TEXT REFERENCES PRISTINE (checksum), right_checksum TEXT REFERENCES PRISTINE (checksum), PRIMARY KEY (wc_id, local_relpath) ); CREATE INDEX I_ACTUAL_PARENT ON ACTUAL_NODE (wc_id, parent_relpath); CREATE INDEX I_ACTUAL_CHANGELIST ON ACTUAL_NODE (changelist); CREATE TABLE LOCK ( repos_id INTEGER NOT NULL REFERENCES REPOSITORY (id), repos_relpath TEXT NOT NULL, lock_token TEXT NOT NULL, lock_owner TEXT, lock_comment TEXT, lock_date INTEGER, PRIMARY KEY (repos_id, repos_relpath) ); CREATE TABLE WORK_QUEUE ( id INTEGER PRIMARY KEY AUTOINCREMENT, work BLOB NOT NULL ); CREATE TABLE WC_LOCK ( wc_id INTEGER NOT NULL REFERENCES WCROOT (id), local_dir_relpath TEXT NOT NULL, locked_levels INTEGER NOT NULL DEFAULT -1, PRIMARY KEY (wc_id, local_dir_relpath) ); PRAGMA user_version = 29; ' shlomif@telaviv1:~$ >>> I first suspected svn was the culprit, so I rebuilt it, but it still happened. Then I tried build SQLite and running its tests and I got this (below). I should note that svn works fine after I type "unset MALLOC_CHECK_" in the console (don't know about the sqlite tests). What is the underlying problem and how can it be fixed? Regards, Shlomi Fish [QUOTE] shlomif@telaviv1:~$ cd ~/progs/Rpms/SOURCES/bld/ shlomif@telaviv1:~/progs/Rpms/SOURCES/bld$ make test ./libtool --mode=link gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I../sqlite/src -I../sqlite/ext/rtree -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_NO_SYNC=1 -DSQLITE_TEMP_STORE=1 -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE -DBUILD_sqlite \ -o testfixture ../sqlite/src/test1.c ../sqlite/src/test2.c ../sqlite/src/test3.c ../sqlite/src/test4.c ../sqlite/src/test5.c ../sqlite/src/test6.c ../sqlite/src/test7.c ../sqlite/src/test8.c ../sqlite/src/test9.c ../sqlite/src/test_autoext.c ../sqlite/src/test_async.c ../sqlite/src/test_backup.c ../sqlite/src/test_btree.c ../sqlite/src/test_config.c ../sqlite/src/test_demovfs.c ../sqlite/src/test_devsym.c ../sqlite/src/test_func.c ../sqlite/src/test_fuzzer.c ../sqlite/src/test_hexio.c ../sqlite/src/test_init.c ../sqlite/src/test_intarray.c ../sqlite/src/test_journal.c ../sqlite/src/test_malloc.c ../sqlite/src/test_multiplex.c ../sqlite/src/test_mutex.c ../sqlite/src/test_onefile.c ../sqlite/src/test_osinst.c ../sqlite/src/test_pcache.c ../sqlite/src/test_quota.c ../sqlite/src/test_rtree.c ../sqlite/src/test_schema.c ../sqlite/src/test_server.c ../sqlite/src/test_superlock.c ../sqlite/src/test_syscall.c ../sqlite/src/test_stat.c ../sqlite/src/test_tclvar.c ../sqlite/sr c/test_thread.c ../sqlite/src/test_vfs.c ../sqlite/src/test_wholenumber.c ../sqlite/src/test_wsd.c ../sqlite/ext/fts3/fts3_term.c ../sqlite/ext/fts3/fts3_test.c ../sqlite/src/tclsqlite.c sqlite3.c -L/usr/lib64 -ltcl8.5 -ldl -lieee -lm -lpthread libtool: link: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I../sqlite/src -I../sqlite/ext/rtree -D_HAVE_SQLITE_CONFIG_H -DBUILD_sqlite -DNDEBUG -I/usr/include -DSQLITE_THREADSAFE=1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -DSQLITE_NO_SYNC=1 -DSQLITE_TEMP_STORE=1 -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1 -DSQLITE_SERVER=1 -DSQLITE_PRIVATE= -DSQLITE_CORE -DBUILD_sqlite -o testfixture ../sqlite/src/test1.c ../sqlite/src/test2.c ../sqlite/src/test3.c ../sqlite/src/test4.c ../sqlite/src/test5.c ../sqlite/src/test6.c