Last Comment Bug 639408 - Suppress sqlite leaks in Valgrind runs
: Suppress sqlite leaks in Valgrind runs
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: Storage (show other bugs)
: Trunk
: All Linux
: -- normal (vote)
: mozilla7
Assigned To: Phil Ringnalda (:philor)
:
Mentors:
Depends on: 573688 631838
Blocks: valgrind-on-tbpl
  Show dependency treegraph
 
Reported: 2011-03-06 19:24 PST by Phil Ringnalda (:philor)
Modified: 2011-06-26 16:05 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Suppress 'em (513 bytes, patch)
2011-06-25 22:52 PDT, Phil Ringnalda (:philor)
n.nethercote: review+
Details | Diff | Splinter Review

Description Phil Ringnalda (:philor) 2011-03-06 19:24:39 PST
Bug 573688 on fixing them, this on suppressing them in the meantime so we can make it visible again. Just needs V running on the tryserver, so I can see what I'm doing.
Comment 1 Nicholas Nethercote [:njn] 2011-06-10 08:41:13 PDT
Bug 573688 has new information -- these are all "possible leaks" and false positives because SQLite moves its pointers to heap blocks 8 bytes in from the start of the block.  The easiest way to fix is to extend Valgrind to suppress "possible leak" reports specifically;  currently you can only suppress all leaks, which would be dangerous as any SQLite leaks would never be caught.  (Though I suppose it could be a reasonable step in the meantime.)
Comment 2 Phil Ringnalda (:philor) 2011-06-14 19:48:02 PDT
Wouldn't want to stand in the way of someone who will do the suppressing without benefit of tryserver.
Comment 3 Phil Ringnalda (:philor) 2011-06-25 22:52:24 PDT
Created attachment 541990 [details] [diff] [review]
Suppress 'em

In rather the Alice in Wonderland trial sense of suppressing, but there you are.
Comment 4 Nicholas Nethercote [:njn] 2011-06-26 01:58:00 PDT
Comment on attachment 541990 [details] [diff] [review]
Suppress 'em

Review of attachment 541990 [details] [diff] [review]:
-----------------------------------------------------------------

r=me with the below nit fixed.

::: build/valgrind/i686-redhat-linux-gnu.sup
@@ +30,5 @@
>  }
> +{
> +   malloc-libmozsqlite3.so
> +   Memcheck:Leak
> +   fun:malloc

The generated suppressions presumably had a "fun:sqlite3MemMalloc" line after the "fun:malloc" line.  It'd be good to include that here, it makes it a tiny bit more specific, which means it won't suppress any malloc() calls in SQLite that don't go through sqlite3MemMalloc (if indeed there are any).
Comment 5 Phil Ringnalda (:philor) 2011-06-26 07:42:50 PDT
While my vague memory tells me that at one time they might have, they do not. The single most detailed one I found was

{
   <insert_a_suppression_name_here>
   Memcheck:Leak
   fun:malloc
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libmozsqlite3.so
   fun:sqlite3_exec
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libxul.so
   obj:/builds/slave/valgrind-linux/objdir/dist/firefox/libxul.so
}

which I suppose means we changed something about how we build sqlite and V no longer understands it at all and suppressing anything now has to wait for someone who actually understands this crap to figure out what changed :(
Comment 6 Nicholas Nethercote [:njn] 2011-06-26 13:23:59 PDT
In that case, your suppression is fine. :)
Comment 7 Phil Ringnalda (:philor) 2011-06-26 16:05:15 PDT
http://hg.mozilla.org/mozilla-central/rev/755257708fa3

Note You need to log in before you can comment on or make changes to this bug.