Closed Bug 977921 Opened 6 years ago Closed 6 years ago

Override ASan malloc_context_size option

Categories

(Release Engineering :: General, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
With the patch for bug 939562, I'm seeing frequent ASan M-bc timeouts because we use more memory. The attached patch sets malloc_context_size to 5, this helps a lot. Memory usage seems to be a bit better than on m-c now; I'll do some more Try pushes to confirm this.

FWIW, Chrome does this too:

//  - set the malloc_context_size (i.e. the size of stack traces collected by
//    ASan for each malloc/free) to 5. These stack traces tend to accumulate
//    very fast in applications using JIT (v8 in Chrome's case), see
//    https://code.google.com/p/address-sanitizer/issues/detail?id=177

Bug 939562 enables the JITs for more code, so it's likely the same issue.
Attachment #8383408 - Flags: review?(choller)
OS: Mac OS X → Linux
Hardware: x86 → x86_64
I triggered 5 M-bc runs with this patch + bug 939562. All 5 are green:

https://tbpl.mozilla.org/?tree=Try&rev=2919a2b34013

Without this patch, at least 4 of them would be bright orange due to timeouts and/or OOM.

I looked at memory usage after the last devtools test (browser_webconsole_view_source.js):

- inbound e931f64fda23:

vsize: 21993105666048, residentFast: 2492571648
vsize: 21992993697792, residentFast: 2291023872

- inbound e931f64fda23 + bug 939562:

vsize: 21993790230528, residentFast: 3095240704
vsize: 21993750212608, residentFast: 2953330688

- inbound e931f64fda23 + bug bug 939562 + this patch:

vsize: 21992741781504, residentFast: 2125574144
vsize: 21992672313344, residentFast: 2121752576
vsize: 21992653754368, residentFast: 2081865728

So with this patch bug 939562 no longer increases our memory usage, it's even a few hundred MB less than before.
Blocks: 939036, MochiMem
Comment on attachment 8383408 [details] [diff] [review]
Patch

Awesome find, Jan :) We'll have to see if 5 frames is enough, but if it's not we can still adjust this later on.

I'm glad we finally found the explanation why ASan memory usage kept growing and growing during m-bc for no apparent reason :) Thanks for that.
Attachment #8383408 - Flags: review?(choller) → review+
https://hg.mozilla.org/mozilla-central/rev/449ad9b73bef
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Component: General Automation → General
You need to log in before you can comment on or make changes to this bug.