Please note: recently the old "Memory" waterfall was renamed to "Memory FYI" waterfall and a new "Memory" waterfall with AddressSanitizer (ASan) bots was set up. Memory sheriffs should watch the "Memory FYI" waterfall. Yes, I don't like this confusion too. Join the funIf you want to help maintain a memory overflow free tree, please contact thestig@. What to watch
Tools on the memory waterfall
sh tools/valgrind/waterfall.sh Please read the chromium-dev thread about this script for the basic idea and some how-to's. What to do with failures on the Memory FYI waterfallThere are two main types of failures you can observe on the memory bots: memory reports detected and test failures. Both are actionable by either fixing the code (probably reverting a recent change) or suppressing/excluding the failures. Recomendation: consider sending your patches to the next sheriff on the schedule. Memory errors are not fixed fast usually, so it's good to be up to date before you start your sheriffing shift. When to close the tree or revertSince the bots on the Memory FYI waterfall cycle slowly, it's hard to keep up with what's happening on these slaves so we don't close the tree automatically as other waterfalls do. You may want to close the tree manually to throttle commits so you can commit your suppressions faster. You can close the tree by typing "Tree is closed (Memory FYI waterfall is too red)" at http://chromium-status.appspot.com/ Please note that some of the reports indicate serious bugs (e.g. "unaddressable access", "use after free", etc. - they are likely to affect stability/security). If you see a new serious report and it's clear which change caused it - go ahead and revert. Also, the same rule applies to not-so-serious reports: if you see a recent commit with an obvious bug which showed up on the Valgrind bots, talk to the commiter if he's OK with reverting and polishing his CL. This is something like an unsolicited code review, right? :) Suppressing memory reportsWe suppress some of the memory reports, either because they are from system libraries we can't do anything about, or because we already have bugs filed in the Chromium issue tracker.By suppressing errors instead of excluding tests we still get coverage for the tests with known memory reports.
The chrome_tests.sh/bat scripts read overall suppressions from several sources:
One exception is HeapChecker which has its own path tools/heapcheck/suppressions.txt In general, any suppression that is there because of a bug in chromium should be named bug_NNNNNN where NNNNNN is the chromium bug number, and the changeset that adds that suppression should include the string BUG=NNNNN in its description. The runner script automatically generates suppressions for all unique errors reported, like this: 22 bytes in 1 blocks are definitely lost in loss record 491 of 3,129 // this is a report malloc (mp/scripts/valgrind-memcheck/coregrind/m_replacemalloc/vg_replace_malloc.c:241) WTF::fastMalloc(unsigned int) (third_party/WebKit/JavaScriptCore/wtf/FastMalloc.cpp:249) WebCore::StringImpl::createUninitialized(unsigned int, unsigned short*&) (third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.cpp:96) WebCore::StringImpl::create(unsigned short const*, unsigned int) (third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.cpp:108) WebCore::StringImpl::substring(unsigned int, unsigned int) (third_party/WebKit/JavaScriptCore/wtf/text/StringImpl.cpp:186) WebCore::String::substring(unsigned int, unsigned int) const (third_party/WebKit/JavaScriptCore/wtf/text/WTFString.cpp:257) WebCore::KURLGooglePrivate::componentString(url_parse::Component const&) const (third_party/WebKit/WebCore/platform/KURLGoogle.cpp:313) [SNIP - some random stuff e.g. MessageLoop, DispatchToMethod etc] The report came from the `AutomationProxyVisibleTest.WindowGetViewBounds` test. Suppression (error hash=#0CAC77B0AD40A91D#): { <insert_a_suppression_name_here> // file a bug and replace it with bug_NNNNN before commiting Memcheck:Leak fun:malloc fun:_ZN3WTF10fastMallocEj fun:_ZN7WebCore10StringImpl19createUninitializedEjRPt fun:_ZN7WebCore10StringImpl6createEPKtj fun:_ZN7WebCore10StringImpl9substringEjj fun:_ZNK7WebCore6String9substringEjj fun:_ZNK7WebCore17KURLGooglePrivate15componentStringERKN9url_parse9ComponentE [SNIP] } First, check there's no similar suppression in the corresponding suppression files. It may just need some wildcarding. If there's no such suppression, copy everything in between {...} and add it to the appropriate suppressions file, e.g.:
{ Memcheck:Leak fun:malloc fun:_ZN3WTF10fastMallocEj fun:_ZN7WebCore10StringImpl19createUninitializedEjRPt fun:_ZN7WebCore10StringImpl6createEPKtj fun:_ZN7WebCore10StringImpl9substringEjj fun:_ZNK7WebCore6String9substringEjj fun:_ZNK7WebCore17KURLGooglePrivate15componentStringERKN9url_parse9ComponentE } Review recommendations:
When the leak gets fixed, make sure to ask the person who fixes it to remove the suppression again -- ideally in the same CL that contains the fix. If they fail even without Valgrind, just add the DISABLED_ prefix to the test case name. If tests are hanging or crashing only on Valgrind, disable them using the files in tools/valgrind/gtest_exclude/test_binary.gtest[_platform].txt, where test_binary is (base_unittests, ui_tests, etc) and platform can be none (both Linux and Mac), linux or mac. Again, HeapChecker is an exception - use tools/heapcheck/test_binary.gtest.txt instead. Please file bug(s) for any tests you disable and point at the bug(s) where you exclude the test(s)! For example, if ExampleTest.PeelOranges from unit_tests fails under Valgrind on both Linux and Mac, add the following to tools/valgrind/gtest_exclude/unit_tests.gtest.txt: # Crashes when run under Valgrind. http://crbug.com/4567ExampleTest.PeelOrangesFiling good memory bugsWhenever you add a suppression to one of the suppression files or exclude a test, you are required to also file a bug to track the error. A good bug report should have the following:
The title of the bug report should indicate the type of error that Valgrind reported (e.g. "Memory leak in Foo.Bar since r123456") WebKit ValgrindThe WebKit Layout tests are run under Valgrind. Due to the vast number of these tests only a portion (1500 or so) are run on each iteration. This implies a couple of things:
Ideally, both the WebKit and Memory sheriffs will log bugs for errors observed. When logging these bugs the best owner may be determined using svn/git blame on the WebKit tree. If no owner is obvious then adding the "Area=WebKit label:Memory label:Valgrind" tags will help these get triaged appropriately. Upcoming sheriffs (not authoritative)This list is meant to be a quick reference, but are not updated automatically and are not authoritative. The authoritative lists are in the calendars. See how to swap if you can't make it.
|
