Closed Bug 1478143 Opened 6 years ago Closed 6 years ago

Adjust default malloc_context_size for ASan builds

Categories

(Core :: mozglue, enhancement)

x86_64
All
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: decoder, Assigned: decoder)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

After discussions with the people from Google we learned that a large part of memory consumption in Firefox ASan builds is probably caused by allocations that happen in deep stacks. Since ASan records the stack on each malloc and free, this can quickly fill up a lot of memory. Hence we decided to limit the amount of stack frames saved by default to 20. This value can still be increased by the ASAN_OPTIONS environment variable if necessary.
Comment on attachment 8994663 [details] Bug 1478143 - Adjust default malloc_context_size for ASan builds. https://reviewboard.mozilla.org/r/259170/#review266196
Attachment #8994663 - Flags: review?(nfroyd) → review+
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f7b56df2e870 Adjust default malloc_context_size for ASan builds. r=froydnj
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/86bf4fd84b05 Adjust default malloc_context_size for ASan builds. r=froydnj
Nathan, I just repushed this with an #ifdef MOZ_ASAN_REPORTER around it because of wpt failures. The failures are LeakSanitizer reports apparently, which means that there is a suppression/whitelist somewhere that uses stack frames higher than the 20th frame to suppress these leaks. Which also means that we are not running these tests with a setting of 5 as you mentioned. Maybe you want to look into that and confirm that is what you expected to be there?
Flags: needinfo?(choller) → needinfo?(nfroyd)
I was going off of: https://searchfox.org/mozilla-central/search?q=malloc_context_size&path= It's not clear to me what suppression file is being used (build/sanitizers/lsan_suppressions.txt doesn't list anything that would obviously be higher on the stack from those leaks), but perhaps wpt doesn't run via any of those Python files that set malloc_context_size?
Flags: needinfo?(nfroyd)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: