Re: [sqlite] why does gperftools shows sqlite3_memory_used as using the largest amount of memory
Thanks Richard, I will use sqlite3_memory_used and get back on this thread. Gperftools was written by google(Sanjay Ghemawat) and is maintained here https://code.google.com/p/gperftools/ I will check on their support list to see if this is a known issue. I have a related question though:- -my application sqlite based runs for months before it might get restarted -while its running there are places we need to execute the following series :- - sqlite3_bind_int64(deleteStmt - sqlite3_step(deleteStmt) - sqlite3_reset(deleteStmt); -note that the prepare and finalize on these happens only once at the time of process start and exit respectively. Do you think this can result in uncontrolled use of memory by sqlite in our application ? Do you think we should always prepare just before using the statement and finalize as soon as we are finished. May be the original authours of our code did this for performance reasons ? Any suggestions here ? -Mayank -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Thursday, October 02, 2014 1:07 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] why does gperftools shows sqlite3_memory_used as using the largest amount of memory On Thu, Oct 2, 2014 at 2:21 PM, Mayank Kumar (mayankum)wrote: > Hi All > I am using sqlite 3.7.7.1 > > When profiling my application using gperftools-2.0, the profile always > shows sqlite3_memory_used as the top user of memory. My first guess: A bug in gperftools-2.0. I'm not familiar with that tool. Is it reliable? > Why would sqlite3_memory_used use so much memory as it just reports > the status of sqlite3_malloc/free. Are there known memory leaks in > this call which have been fixed? > There have been no known memory leaks in SQLite for a very long time. > > Is there a way to just profile the sqlite3 calls to figure out if > there is a leak in those calls or wrt how I may be using it? > Keep calling sqlie3_memory_used() and see if the value keeps going up? > > -Mayank > > > > > ___ > 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 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] why does gperftools shows sqlite3_memory_used as using the largest amount of memory
On Thu, Oct 2, 2014 at 2:21 PM, Mayank Kumar (mayankum)wrote: > Hi All > I am using sqlite 3.7.7.1 > > When profiling my application using gperftools-2.0, the profile always > shows sqlite3_memory_used as the top user of memory. My first guess: A bug in gperftools-2.0. I'm not familiar with that tool. Is it reliable? > Why would sqlite3_memory_used use so much memory as it just reports the > status of sqlite3_malloc/free. Are there known memory leaks in this call > which have been fixed? > There have been no known memory leaks in SQLite for a very long time. > > Is there a way to just profile the sqlite3 calls to figure out if there is > a leak in those calls or wrt how I may be using it? > Keep calling sqlie3_memory_used() and see if the value keeps going up? > > -Mayank > > > > > ___ > 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
[sqlite] why does gperftools shows sqlite3_memory_used as using the largest amount of memory
Hi All I am using sqlite 3.7.7.1 When profiling my application using gperftools-2.0, the profile always shows sqlite3_memory_used as the top user of memory. Why would sqlite3_memory_used use so much memory as it just reports the status of sqlite3_malloc/free. Are there known memory leaks in this call which have been fixed? Is there a way to just profile the sqlite3 calls to figure out if there is a leak in those calls or wrt how I may be using it? -Mayank ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] sqlite3_value_type dereferencing NULL pointer
During the running of the fail2ban daemon, which uses python2.7 bindings for sqlite, the function sqlite3_value_type dereferenced a NULL pointer, thus causing Segmentation fault error. Bellow are attached links to stacktraces leading to this segfault ([1] and more detailed in [2]). [1] https://retrace.fedoraproject.org/faf/reports/445794/ [2] https://bugzilla.redhat.com/attachment.cgi?id=942560 -- Jan Stanek - Red Hat Associate Developer Engineer - Databases Team ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users