Closed Bug 696293 Opened 14 years ago Closed 14 years ago

Valgrind builds are missing symbols

Categories

(Release Engineering :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jruderman, Assigned: gkw)

References

Details

Attachments

(1 file)

Normal Tinderbox builds aren't appropriate for Valgrind: * Native symbols are stripped (and Valgrind doesn't read breakpad symbol files). * They aren't built with --enable-valgrind, so Valgrind doesn't see our explanations of arenas and things. * They aren't built with --disable-jemalloc, so Valgrind doesn't see our allocations. The Valgrind jobs should start by building Firefox with --enable-valgrind --disable-jemalloc. While we're at it, we might as well compile with an optimization mode that works well with Valgrind (https://developer.mozilla.org/en/Debugging_Mozilla_with_Valgrind recommends "-g -O -freorder-blocks"). We probably don't need to run debug builds under Valgrind. They're slow, and we're not really worried about having security holes in ifdef-DEBUG sections.
http://hg.mozilla.org/build/tools/file/tip/scripts/valgrind/valgrind.sh is the script that runs the V builds. Looks like --enable-valgrind, --disable-jemalloc to me.
Oh. You're right. Maybe they just need the optimization flags fixed, then. https://tbpl.mozilla.org/php/getParsedLog.php?id=6905176&full=1&branch=mozilla-central { <insert_a_suppression_name_here> Memcheck:Leak fun:memalign fun:__tls_get_addr obj:/builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so obj:* obj:/builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so }
Summary: Valgrind jobs need to make their own builds → Valgrind builds are missing symbols
Blocks: 696305
(In reply to Jesse Ruderman from comment #2) > Oh. You're right. Maybe they just need the optimization flags fixed, then. > > https://tbpl.mozilla.org/php/getParsedLog. > php?id=6905176&full=1&branch=mozilla-central > > { > <insert_a_suppression_name_here> > Memcheck:Leak > fun:memalign > fun:__tls_get_addr > obj:/builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so > obj:* > obj:/builds/slave/m-cen-lnx64-valgrind/objdir/dist/firefox/libxul.so > } What flags need to be changed? The mozconfig is located here: http://hg.mozilla.org/build/tools/file/a54e5c2370f0/scripts/valgrind/valgrind.sh if you'd like to patch it yourself.
The following optimization flags have been added: ac_add_options --enable-optimize="-g -O -freorder-blocks" as per https://developer.mozilla.org/en/Debugging_Mozilla_with_Valgrind Jesse, do we need anything else out of this bug? (e.g. not needing to run debug builds under Valgrind)
Attachment #568683 - Flags: review?(bhearsum)
Let's first see how this patch works, and see what the stacks look like from both opt and debug builds.
Attachment #568683 - Flags: review?(bhearsum) → review+
Assignee: nobody → gary
Status: NEW → ASSIGNED
Keywords: checkin-needed
Gary, feel free to land this at your own convenience. The changes will be picked up at the next run.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: